Conversation
The consume workflow has been failing on every run since it was added: removing a label from a PR needs pull-requests: write, not issues: write. The gh issue edit route worked against the Issues REST API because PRs share numbering, but authorization checked against the wrong scope and returned "Resource not accessible by integration". Swapping to gh pr edit with the correct permission fixes it.
📝 WalkthroughWalkthroughThe workflow's GitHub Actions permissions are updated from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
🚥 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)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/consume_ci_run_label.yml (1)
11-15: Optional: add job-level concurrency to avoid duplicate consume runs.If the label is toggled quickly, multiple consume jobs can run concurrently. A small concurrency guard would make this more deterministic.
Suggested diff
jobs: consume: + concurrency: + group: consume-ci-run-label-${{ github.event.pull_request.number }} + cancel-in-progress: false if: ${{ github.event.label.name == 'ci:run' }} runs-on: ubuntu-latestAs per coding guidelines,
.github/workflows/**: Check workflow syntax, appropriate use of self-hosted vs ubuntu-latest runners, secret references, and concurrency settings.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/consume_ci_run_label.yml around lines 11 - 15, The consume job can be triggered multiple times rapidly; add a job-level concurrency stanza under jobs.consume (use the concurrency key on the "consume" job) to serialize runs and set cancel-in-progress: true; use a stable group expression such as "consume-${{ github.repository }}-${{ github.event.issue.number || github.event.pull_request.number || github.sha }}" so only one consume job for the same PR/issue/ref runs at a time.
🤖 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/consume_ci_run_label.yml:
- Around line 11-15: The consume job can be triggered multiple times rapidly;
add a job-level concurrency stanza under jobs.consume (use the concurrency key
on the "consume" job) to serialize runs and set cancel-in-progress: true; use a
stable group expression such as "consume-${{ github.repository }}-${{
github.event.issue.number || github.event.pull_request.number || github.sha }}"
so only one consume job for the same PR/issue/ref runs at a time.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a3c27d83-5b48-44f6-8991-c79277c8e24a
📒 Files selected for processing (1)
.github/workflows/consume_ci_run_label.yml
The consume workflow has been failing on every invocation since it was added — all three recorded runs show
failurewithGraphQL: Resource not accessible by integration (removeLabelsFromLabelable). Removing labels from a pull request needspull-requests: write; the workflow was declaringissues: write. Thegh issue editroute worked against the Issues REST API because PRs share numbering with issues, but GitHub's authorization check looks at the scope that matches the target resource, and for a PR that'spull-requests. I've swapped the permission and moved the command togh pr editso the intent lines up with the scope.The practical effect of the bug: the
ci:runlabel was never being auto-stripped after a run started. Heavy CI still fired (because thepull_request: types: [labeled]trigger on the test workflows doesn't depend on consume), but the label lingered, which meant subsequent pushes needed a manual remove-then-re-add to re-trigger. This fix restores the intended "label-then-forget" flow.Summary by CodeRabbit