fix(ci): add pull-requests: write permission for Draft PR Label Cleanup - #2651
fix(ci): add pull-requests: write permission for Draft PR Label Cleanup#2651yunaremaia wants to merge 1 commit into
Conversation
GitHub routes removeLabel API calls through the pull-requests permission even when using the issues endpoint. Without write access, the workflow fails with 403 when stripping queue labels from draft PRs. Fixes hiero-ledger#2592
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe workflow now grants ChangesDraft label cleanup
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~2 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The draft-label cleanup workflow can now remove managed queue labels from draft pull requests instead of receiving a 403 error. The permission change is narrowly aligned with that behavior and has no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Hi @yunaremaia, could you please comment |
|
Hi there! I'm the LinkedIssueBot.
Thank you, |
Summary
The workflow fails with 403 Resource not accessible by integration when stripping queue labels from a PR converted to draft.
GitHub routes API calls through the pull-requests permission even when using the issues endpoint. The workflow declared which is insufficient for label removal.
Fixes #2592.
Changes
Verification
The issue description confirms that performs the same operation successfully because it declares . This change aligns the draft-label-cleanup workflow with that pattern.