-
-
Notifications
You must be signed in to change notification settings - Fork 313
Fix GitHub Action permissions for Files Changed Label workflow #4303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: DonnieBLT <[email protected]>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@copilot this fix didn't work please try again |
…-BLT#4303) * Initial plan for issue * Add issues:write permission to files changed label workflow Co-authored-by: DonnieBLT <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: DonnieBLT <[email protected]>
Issue
The Files Changed Label GitHub Action was failing with a 403 error:
Root Cause
GitHub treats pull requests as special issues, and the workflow was trying to add labels through the issues API endpoint (
repos/$REPO_OWNER/$REPO_NAME/issues/$PR_NUMBER/labels). The workflow hadpull-requests: writeandcontents: readpermissions, but was missingissues: writepermission needed to modify PR labels through this endpoint.Fix
Added the missing
issues: writepermission to the workflow file:This simple change grants the GitHub token the necessary permissions to add labels to PRs through the issues API.
Fixes #4302.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.