ci: use GITHUB_TOKEN to create hotfix candidate PR#2327
Conversation
Run 25715374303 failed at the 'Open PR against hotfix branch' step
with:
pull request create failed: GraphQL: Resource not accessible by
personal access token (createPullRequest)
The step was using RELEASE_PAT, which apparently lacks
pull_requests:write on the repo. The workflow already declares
permissions:
contents: write
pull-requests: write
so GITHUB_TOKEN has the right scope for this PR-create call without
expanding RELEASE_PAT. RELEASE_PAT remains in use on the steps that
genuinely need it (push to the protected hotfix branch; close
superseded PRs).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release-hotfix workflow's PR-creation step transitions from using a personal access token ( ChangesGitHub Token Authentication in Hotfix Workflow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 actionlint (1.7.12).github/workflows/release-hotfix.yamlcould not read ".github/workflows/release-hotfix.yaml": open .github/workflows/release-hotfix.yaml: no such file or directory 🔧 YAMLlint (1.38.0).github/workflows/release-hotfix.yaml[Errno 2] No such file or directory: '.github/workflows/release-hotfix.yaml' 🔧 Checkov (3.2.528).github/workflows/release-hotfix.yaml2026-05-12 05:34:30,934 [MainThread ] [ERROR] Template file not found: .github/workflows/release-hotfix.yaml ... [truncated 9216 characters] ... process file .github/workflows/release-hotfix.yaml Comment |
Run 25715374303 failed at Open PR against hotfix branch with:
The step was using
RELEASE_PAT, which apparently lackspull_requests: writeon this repo. Rather than expand the PAT's scope, switch this single step toGITHUB_TOKEN— the workflow already declares:so
GITHUB_TOKENhas exactly the scope needed forgh pr create.RELEASE_PATis intentionally left in place on the two steps that genuinely need it:hotfix/X.Y.x, whichGITHUB_TOKENcannot do.Minimal change, scoped to the failing step.
Summary by CodeRabbit