Skip to content

Pass GitHub App token to add-and-commit for branch protection#1448

Merged
hua7450 merged 2 commits into
mainfrom
fix/versioning-push-auth
Mar 19, 2026
Merged

Pass GitHub App token to add-and-commit for branch protection#1448
hua7450 merged 2 commits into
mainfrom
fix/versioning-push-auth

Conversation

@hua7450
Copy link
Copy Markdown
Collaborator

@hua7450 hua7450 commented Mar 19, 2026

Summary

  • Fixes the versioning workflow push failure: GH006: Protected branch update failed for refs/heads/main
  • The EndBug/add-and-commit@v9 action defaults to GITHUB_TOKEN, which can't push to the protected main branch
  • Passes the GitHub App installation token via github_token parameter so the push is authorized

Test plan

  • Merge this PR — the versioning workflow will trigger on the merge commit and should now push successfully

🤖 Generated with Claude Code

hua7450 and others added 2 commits March 19, 2026 09:59
The EndBug/add-and-commit action defaults to GITHUB_TOKEN which lacks
permission to push directly to the protected main branch. Pass the
GitHub App installation token via github_token parameter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The workflow triggers on push to main, but checkout was referencing
github.event.pull_request which doesn't exist on push events. Also
bumps actions/checkout from v3 to v4.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hua7450 hua7450 merged commit ff4c305 into main Mar 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant