ci: allow ready-for-review label mutation#811
Conversation
|
Warning Review limit reached
More reviews will be available in 45 minutes and 27 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesReady-for-Review Workflow Permission Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 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)
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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ready-for-review.yml:
- Line 19: Move the `issues: write` permission from the workflow-level
permissions block (currently at the top of the file) to the `evaluate` job's
permissions block only. Remove `issues: write` from the workflow-level
permissions since only the `evaluate` job needs this permission for label
manipulation operations, while the `validate-triggers` job does not require it.
This follows the principle of least privilege by restricting unnecessary
permissions from the workflow level.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 692d46a0-e238-499c-bfe4-1f6f108d3311
📒 Files selected for processing (1)
.github/workflows/ready-for-review.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #811 +/- ##
==========================================
+ Coverage 72.67% 72.94% +0.26%
==========================================
Files 322 323 +1
Lines 71363 71989 +626
==========================================
+ Hits 51866 52511 +645
+ Misses 19497 19478 -19
|
53a1128 to
2b1effc
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Motivation
Fixes #809.
The
Ready for Review Labelworkflow usesgh pr edit --add-label/--remove-labelto mutate PR labels after CI and CodeRabbit checks pass. PR labels are issue labels in GitHub's API, so the workflow token needsissues: writein addition to the existing pull-request/check permissions.Changes
issues: writeto.github/workflows/ready-for-review.yml.Validation
ruby -e 'require "yaml"; YAML.load_file(ARGV[0]); puts "yaml ok"' .github/workflows/ready-for-review.ymlgit diff --check origin/dev...HEADSummary by CodeRabbit