fix(ci): grant contributors workflow permission to open PRs#56
Merged
Conversation
The first run of Update contributors on main failed with "Resource not accessible by integration" because the action's auto_detect_branch_protection logic detected the protection on main, fell back to opening a PR with the regenerated table, and the workflow's GITHUB_TOKEN lacked pull-requests:write. Repo-level "Allow GitHub Actions to create and approve pull requests" has also been enabled (can_approve_pull_request_reviews=true). With both in place the action can now open the docs(contributor) PR instead of pushing directly to main.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds ChangesWorkflow Permissions Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
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)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update contributorsworkflow failed on its first run after #55 merged tomain, withResource not accessible by integration.maintriggers the action'sauto_detect_branch_protectionfallback (open a PR instead of pushing directly), but the workflow only hadcontents: write— it lackedpull-requests: write.pull-requests: writeto the workflow permissions block.Repo-level setting also flipped
The repo-level switch "Allow GitHub Actions to create and approve pull requests" was previously off (
can_approve_pull_request_reviews: false). It has been enabled — without that, no per-workflowpull-requests: writecan take effect.Both conditions are now in place:
can_approve_pull_request_reviews: truepull-requests: write(this PR)Test plan
main:Update contributorsworkflow runs successfully and opens adocs(contributor): contributors readme action updatePR with the populated HTML table for @mohanagy and @jamemacksonmainv0.11.0frommainso the npm package ships with a real contributors tableNotes
contributors-readme-action-e8pGzCw-Oxleft by the failed first run has already been deleted.v0.11.0tag is held until this lands and the contributors table is populated.Summary by CodeRabbit