Skip to content

Commit b3d018d

Browse files
committed
Automatically deletes ready-for-review label
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 915608f commit b3d018d

1 file changed

Lines changed: 37 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 }}

0 commit comments

Comments
 (0)