Skip to content

Commit 603d958

Browse files
committed
removes ready-for-review label when PR is merged/approved etc.
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 81e72f5 commit 603d958

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Ready-for-review label
2+
3+
# Caller workflow that wires this repository's pull-request events up to the
4+
# reusable `manage-ready-for-review.yml` workflow, which removes the
5+
# "ready-for-review" label once a PR is no longer awaiting review.
6+
#
7+
# `pull_request_target` (rather than `pull_request`) is required so that the job
8+
# has a read/write token for pull requests opened from forks. This is safe here
9+
# because the reusable workflow never checks out or executes pull-request code.
10+
#
11+
# The label logic lives in the organisation's `.github` repository so that every
12+
# repository consumes the same engine. To roll this out to another repository,
13+
# copy this file verbatim - the `uses:` reference below already points at the
14+
# shared engine.
15+
on:
16+
pull_request_target:
17+
types: [closed, converted_to_draft]
18+
pull_request_review:
19+
types: [submitted, dismissed]
20+
21+
# Serialise runs per pull request so that concurrent events (for example, a
22+
# review submitted at the same moment the PR is closed) cannot race on the label.
23+
concurrency:
24+
group: ready-for-review-${{ github.event.pull_request.number }}
25+
cancel-in-progress: false
26+
27+
permissions:
28+
contents: read
29+
pull-requests: read
30+
issues: write
31+
jobs:
32+
manage-label:
33+
# Shared engine in the org-wide `.github` repository, pinned to a commit SHA
34+
# (matching this repository's action-pinning convention).
35+
uses: hyperlight-dev/.github/.github/workflows/manage-ready-for-review.yml@8eaae4229db908ea64fff06c31dbf5677611ce5e
36+
with:
37+
pr-number: ${{ github.event.pull_request.number }}

docs/github-labels.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ We use GitHub labels to categorize PRs. Before a PR can be merged, it must be as
77
- **kind/enhancement** - For PRs that introduce new features or improve existing functionality. This label also applies to improvements in documentation, testing, and similar areas. Any changes must be backward-compatible.
88
- **kind/refactor** - For PRs that restructure or remove code without adding new functionality. This label also applies to changes that affect user-facing APIs.
99

10+
## Review readiness
11+
12+
We use the **ready-for-review** label to signal that a PR is waiting for a (re-)review:
13+
14+
- **Add** `ready-for-review` when you open a PR that is ready for review, or when a PR is ready for re-review (for example, once you have addressed requested changes and re-requested review).
15+
- The label is **removed automatically** by the [`Ready-for-review label`](../.github/workflows/ready-for-review-label.yml) workflow once the PR is no longer awaiting that review, specifically when any of the following become true:
16+
- the PR is closed or merged,
17+
- the PR is converted to a draft,
18+
- the PR has two or more approvals, or
19+
- the PR has two or more change requests.
20+
21+
You only ever need to add the label; removal is fully automated.
22+
1023
---
1124

1225
# **Issues**

0 commit comments

Comments
 (0)