anthropics / anthropics/claude-code-action

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

Aperta
#616 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
bug p2 provider:bedrock
Lingua principale
TypeScript
Stelle
8.9k
Fork
2.1k
Merge medio
3g 9h
PR unite (30g)
10

Descrizione

**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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.