anthropics / anthropics/claude-code-action
Claude Code Action fails when called from PR comments with non-ASCII branch names
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.9k
- Forks
- 2.1k
- Ø Merge
- 3 T. 9 Std.
- Gemergte PRs (30 T.)
- 10
Beschreibung
**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:
PR comment:
Job detail:
**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
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.