Automate removal of the ready-for-review label#1568
Open
simongdavies wants to merge 1 commit into
Open
Conversation
Adds a caller workflow that invokes the org-wide reusable manage-ready-for-review workflow to strip the ready-for-review label when a PR is closed or merged, becomes a draft, gains >=2 approvals, or gains >=2 change requests. Documents the label lifecycle in docs/github-labels.md. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated mechanism to remove the ready-for-review label when a pull request is no longer awaiting review, by wiring repository events into a reusable org-wide workflow. It also documents the intended manual-add / automatic-remove behavior in the project’s label documentation.
Changes:
- Adds a new GitHub Actions workflow that calls the shared
hyperlight-dev/.github“manage-ready-for-review” reusable workflow on relevant PR/review events. - Documents the “ready-for-review” label lifecycle (when to add it, and when it will be removed automatically).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/ready-for-review-label.yml |
Adds the caller workflow that triggers on PR closure/draft conversion and review submission/dismissal, and invokes the pinned org-wide reusable workflow. |
docs/github-labels.md |
Documents the ready-for-review label purpose and the automatic removal criteria. |
Comment on lines
+27
to
+30
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Automates removal of the
ready-for-reviewlabel from a pull request once it isno longer awaiting review.
The label is removed when any of the following become true:
Adding the label stays a manual / author action (now documented in
docs/github-labels.md); only removal is automated.How
The reusable engine lives in the organisation's
.githubrepository(
hyperlight-dev/.github) so every repository can share one implementation.This PR adds the hyperlight-side pieces:
.github/workflows/ready-for-review-label.yml— a thin caller thattriggers on
pull_request_target(closed,converted_to_draft) andpull_request_review(submitted,dismissed) and invokes the sharedengine, pinned to commit
12c76e8.docs/github-labels.md— a new "Review readiness" section describing whenthe label is added (manually) and removed (automatically).
pull_request_targetis used so the job has a write-scoped token for pullrequests from forks. This is safe because the engine never checks out or
executes PR code — it only reads PR metadata and removes a label.
Notes
latestOpinionatedReviewsfield, so onlyeach reviewer's most recent approve / request-changes counts (comments are
ignored and a reviewer is never double-counted).
to
2.runscript passesbash -n.