Closed2

【Claude Code x GitHub Actions】Error creating branch

kathmandukathmandu
Run grll/claude-code-action@beta
Run oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76
Downloading a new version of Bun: https://bun.sh/download/1.2.11/linux/x64?avx2=true&profile=false
/usr/bin/unzip -o -q /home/runner/work/_temp/b54c7e2d-a526-4982-987f-1a44a6371466.zip
/home/runner/.bun/bin/bun --revision
1.2.11+cb6abd211
Run cd ${GITHUB_ACTION_PATH}
bun install v1.2.11 (cb6abd21)

+ @types/bun@1.2.11
+ @types/node@20.17.44
+ @types/node-fetch@2.6.12
+ prettier@3.5.3
+ typescript@5.8.3
+ @actions/core@1.11.1
+ @actions/github@6.0.1
+ @modelcontextprotocol/sdk@1.11.0
+ @octokit/graphql@8.2.2
+ @octokit/rest@21.1.1
+ @octokit/webhooks-types@7.6.1
+ node-fetch@3.3.2
+ zod@3.24.4

141 packages installed [388.00ms]
Run bun run ${GITHUB_ACTION_PATH}/src/entrypoints/prepare.ts
Requesting OIDC token...
Attempt 1 of 3...
OIDC token successfully obtained
Exchanging OIDC token for app token...
Attempt 1 of 3...
App token successfully obtained
Using GITHUB_TOKEN from OIDC
Checking permissions for actor: xxxx
Permission level retrieved: admin
Actor has write access: admin
Comment contains exact trigger phrase '@claude'
Actor type: User
Verified human actor: xxxx
✅ Created initial comment with ID: 2976341178
Successfully fetched issue #41 data
Creating new branch for issue #41 from source branch: main...
Current SHA: 6e9de8484beb885989dae10854ae7e654d9ac803
POST /repos/xxxx/xxxx/git/refs - 422 with id 0440:1E4480:723C22:E59CCE:68500870 in 287ms
Error creating branch: 11 |   /**
12 |    * Response object if a response was received
13 |    */
14 |   response;
15 |   constructor(message, statusCode, options) {
16 |     super(message);
         ^
HttpError: Reference update failed - https://docs.github.com/rest/git/refs#create-a-reference
   status: 422,
  request: {
  method: "POST",
  url: "https://api.github.com/repos/xxxx/xxxx/git/refs",
  headers: [Object ...],
  body: [Object ...],
  request: [Object ...],
},
 response: {
  url: "https://api.github.com/repos/xxxx/xxxx/git/refs",
  status: 422,
  headers: [Object ...],
  data: [Object ...],
},

      at new RequestError (/home/runner/work/_actions/grll/claude-code-action/beta/node_modules/@octokit/rest/node_modules/@octokit/core/node_modules/@octokit/request-error/dist-src/index.js:16:5)
      at fetchWrapper (/home/runner/work/_actions/grll/claude-code-action/beta/node_modules/@octokit/rest/node_modules/@octokit/core/node_modules/@octokit/request/dist-bundle/index.js:122:11)

Error: Process completed with exit code 1.
Run bun run ${GITHUB_ACTION_PATH}/src/entrypoints/update-comment-link.ts
Fetching issue comment 2976341178
Successfully fetched as issue comment
✅ Updated issue comment 2976341178 with job link
Run curl -L \
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
kathmandukathmandu

✅ ”claude" というブランチが存在することが問題

→ claude ブランチを削除する

このスクラップは4ヶ月前にクローズされました