Fix @claude branch push authentication#526
Conversation
Verification PR #525 showed the agent correctly checks out the PR branch and commits, but the push failed: after gh pr checkout (and the agent's own git activity) actions/checkout's persisted credential isn't applied, so git push origin fell back to unsupported password auth. Push with an explicit x-access-token URL instead, for both the PR-branch and issue-branch push steps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 1m 7s —— View job Code Review: PR #526 — Fix
|
There was a problem hiding this comment.
Pull request overview
Fixes authentication failures when the @claude workflow pushes commits back to GitHub after gh pr checkout, by switching both push paths to use an explicit x-access-token HTTPS remote URL instead of relying on actions/checkout persisted credentials.
Changes:
- Update the PR-branch push step to
git pushviahttps://x-access-token:${GH_TOKEN}@github.com/.... - Update the issue-trigger branch push step to use the same explicit token URL.
Codecov Report✅ All modified and coverable lines are covered by tests. |
Summary
Follow-up to #523. The verification PR (#525) confirmed the
@claudeagent correctly checks out the PR branch and commits (the finding #1 concern), but the push failed on auth:After
gh pr checkout(and the agent step's own git activity),actions/checkout's persisted credential extraheader isn't applied, sogit push originfalls back to unsupported password auth.Fix: push with an explicit
https://x-access-token:${GH_TOKEN}@github.com/...URL in both push steps (PR-branch push and issue-branch push).Test plan
@claudeon a PR (e.g. reopen the [verify] @claude PR-trigger path (do not merge) #525 path) and confirm the fix commit lands on the PR branch and a review is re-dispatched.🤖 Generated with Claude Code