fix: use personal token for auto-merge workflow#152
Conversation
WalkthroughA GitHub Actions workflow configuration was updated to replace Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/auto-merge.yml (1)
34-35: Use a fine-grained PAT with minimal permissions and short expiry.Since Line 35 and Line 41 rely on a PAT for
gh pr review --approveandgh pr merge --auto --merge, ensure the token is fine-grained, scoped to only this repository, with minimum permissions: Pull requests (Read and Write) and Contents (Read and Write). Set a short expiry date. Note that workflowpermissionsdo not constrain PAT scope.Also applies to: 41-41
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/auto-merge.yml around lines 34 - 35, Update the GH_TOKEN secret used by the workflow (env var GH_TOKEN) to be a fine-grained personal access token limited to this repository with minimal scopes: Pull requests (Read & Write) and Contents (Read & Write), and set a short expiry; ensure the token used by the `gh pr review --approve` and `gh pr merge --auto --merge` steps is this fine‑grained PAT so downstream workflows can run while minimizing permissions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/auto-merge.yml:
- Around line 34-35: Update the GH_TOKEN secret used by the workflow (env var
GH_TOKEN) to be a fine-grained personal access token limited to this repository
with minimal scopes: Pull requests (Read & Write) and Contents (Read & Write),
and set a short expiry; ensure the token used by the `gh pr review --approve`
and `gh pr merge --auto --merge` steps is this fine‑grained PAT so downstream
workflows can run while minimizing permissions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0a90f8e4-9022-4454-9579-271eff345b67
📒 Files selected for processing (1)
.github/workflows/auto-merge.yml
Summary by CodeRabbit