anthropics / anthropics/claude-code-action

Claude Code Action fails when called from PR comments with non-ASCII branch names

オープン
#616 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug p2 provider:bedrock
主要言語
TypeScript
スター
8.9k
フォーク
2.1k
平均マージ
3日 9時間
マージ済み PR(30日)
10

説明

**Describe the bug**
When calling Claude Code Actions via PR comments with Japanese (non-ASCII characters) in branch names, it fails with the error "fatal: depth ?\_\_bunstr_0 is not a positive number".

**To Reproduce**
Steps to reproduce the behavior:

1. Create a PR with a branch containing non-ASCII characters as either source or target branch (e.g., feature/テスト)
2. Call Claude Code Action via PR comment
3. Receive a comment response: "Claude encountered an error —— View job Failed with exit code 128"
4. In the job detail, it fails with the error: "fatal: depth ?\_\_bunstr_0 is not a positive number Error: Prepare step failed with error: Failed with exit code 128 Error: Process completed with exit code 1."

**Expected behavior**
Claude Code Action should successfully handle branch names containing non-ASCII characters.

**Screenshots**
branch:

Image

PR comment:

Image

Job detail:

Image

**Workflow yml file**

```
name: Claude Assistant

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude-response:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
actions: read

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Configure AWS Credentials (OIDC)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ap-northeast-1

- name: Run Claude Code Action
uses: anthropics/claude-code-action@v1
with:
use_bedrock: "true"
claude_args: |
--model apac.anthropic.claude-sonnet-4-20250514-v1:0
--allowedTools Edit,Read,Write

```

**API Provider**

[ ] Anthropic First-Party API (default)
[×] AWS Bedrock
[ ] GCP Vertex

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。