Skip to content

fix(ci): add pull-requests: write permission for Draft PR Label Cleanup - #2651

Closed
yunaremaia wants to merge 1 commit into
hiero-ledger:mainfrom
yunaremaia:fix-draft-label-cleanup-permissions
Closed

fix(ci): add pull-requests: write permission for Draft PR Label Cleanup#2651
yunaremaia wants to merge 1 commit into
hiero-ledger:mainfrom
yunaremaia:fix-draft-label-cleanup-permissions

Conversation

@yunaremaia

Copy link
Copy Markdown

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

  • : change to

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.

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
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ea9cee92-a856-4fd4-a08b-0c0fbfbafe48

📥 Commits

Reviewing files that changed from the base of the PR and between 043dbb7 and b54666a.

📒 Files selected for processing (1)
  • .github/workflows/draft-label-cleanup.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The workflow now grants pull-requests: write permission. This allows the draft label cleanup operation to remove labels from pull requests without a 403 error.

Changes

Draft label cleanup

Layer / File(s) Summary
Enable pull request label removal
.github/workflows/draft-label-cleanup.yml
The workflow changes pull-requests permission from read to write.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~2 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to b5466

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)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: granting pull-requests write permission to the Draft PR Label Cleanup workflow.
Description check ✅ Passed The description explains the 403 failure, identifies the permission cause, and describes the one-line workflow fix.
Linked Issues check ✅ Passed The change satisfies issue #2592 by changing pull-requests: read to pull-requests: write in the specified workflow, which addresses label-removal authorization failures.
Out of Scope Changes check ✅ Passed The pull request contains only the permission change required by issue #2592. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added open to community review PR is open for community review and feedback queue:junior-committer PR awaiting initial quality review labels Sep 9, 2026
@MonaaEid

MonaaEid commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Hi @yunaremaia, could you please comment /assign on the issue #2592 if you want to work on it?

@github-actions

Copy link
Copy Markdown

Hi there! I'm the LinkedIssueBot.
This pull request has been automatically closed due to the following reason(s):

Thank you,
From Python SDK team

@github-actions github-actions Bot closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open to community review PR is open for community review and feedback queue:junior-committer PR awaiting initial quality review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): Draft PR Label Cleanup workflow lacks pull-requests: write, label removal 403s

3 participants