From b3d018deda8480fc48b3c120d514b5d3c9d1d24b Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Tue, 23 Jun 2026 12:17:59 +0100 Subject: [PATCH 1/2] Automatically deletes ready-for-review label Signed-off-by: Simon Davies --- .github/workflows/ready-for-review-label.yml | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/ready-for-review-label.yml diff --git a/.github/workflows/ready-for-review-label.yml b/.github/workflows/ready-for-review-label.yml new file mode 100644 index 0000000..e63389a --- /dev/null +++ b/.github/workflows/ready-for-review-label.yml @@ -0,0 +1,37 @@ +name: Ready-for-review label + +# Caller workflow that wires this repository's pull-request events up to the +# reusable `manage-ready-for-review.yml` workflow, which removes the +# "ready-for-review" label once a PR is no longer awaiting review. +# +# `pull_request_target` (rather than `pull_request`) is required so that the job +# has a read/write token for pull requests opened from forks. This is safe here +# because the reusable workflow never checks out or executes pull-request code. +# +# The label logic lives in the organisation's `.github` repository so that every +# repository consumes the same engine. To roll this out to another repository, +# copy this file verbatim - the `uses:` reference below already points at the +# shared engine. +on: + pull_request_target: + types: [closed, converted_to_draft] + pull_request_review: + types: [submitted, dismissed] + +# Serialise runs per pull request so that concurrent events (for example, a +# review submitted at the same moment the PR is closed) cannot race on the label. +concurrency: + group: ready-for-review-${{ github.event.pull_request.number }} + cancel-in-progress: false + +permissions: + contents: read + pull-requests: read + issues: write +jobs: + manage-label: + # Shared engine in the org-wide `.github` repository, pinned to a commit SHA + # (matching this repository's action-pinning convention). + uses: hyperlight-dev/.github/.github/workflows/manage-ready-for-review.yml@8eaae4229db908ea64fff06c31dbf5677611ce5e + with: + pr-number: ${{ github.event.pull_request.number }} From cdb1dc8c9fa0393f1cdcd64b08fc9bacac096075 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Tue, 30 Jun 2026 21:40:34 +0100 Subject: [PATCH 2/2] update workflow Signed-off-by: Simon Davies --- .github/workflows/ready-for-review-label.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ready-for-review-label.yml b/.github/workflows/ready-for-review-label.yml index e63389a..bbbc850 100644 --- a/.github/workflows/ready-for-review-label.yml +++ b/.github/workflows/ready-for-review-label.yml @@ -1,25 +1,22 @@ name: Ready-for-review label -# Caller workflow that wires this repository's pull-request events up to the -# reusable `manage-ready-for-review.yml` workflow, which removes the -# "ready-for-review" label once a PR is no longer awaiting review. +# When a pull-request changes state (closed, converted to draft) or a review is submitted/dismissed, +# run the `manage-ready-for-review.yml` workflow, to remove the +# "ready-for-review" label from a PR if its no longer needed. # # `pull_request_target` (rather than `pull_request`) is required so that the job # has a read/write token for pull requests opened from forks. This is safe here # because the reusable workflow never checks out or executes pull-request code. # -# The label logic lives in the organisation's `.github` repository so that every -# repository consumes the same engine. To roll this out to another repository, -# copy this file verbatim - the `uses:` reference below already points at the -# shared engine. +# The label removal workflow lives in hyperlight-dev's `.github` repository. To apply this workflow +# to another repository, copy this file to that repo. on: pull_request_target: types: [closed, converted_to_draft] pull_request_review: types: [submitted, dismissed] -# Serialise runs per pull request so that concurrent events (for example, a -# review submitted at the same moment the PR is closed) cannot race on the label. +# Serialise runs per pull request so that concurrent events cannot race. concurrency: group: ready-for-review-${{ github.event.pull_request.number }} cancel-in-progress: false @@ -30,8 +27,7 @@ permissions: issues: write jobs: manage-label: - # Shared engine in the org-wide `.github` repository, pinned to a commit SHA - # (matching this repository's action-pinning convention). - uses: hyperlight-dev/.github/.github/workflows/manage-ready-for-review.yml@8eaae4229db908ea64fff06c31dbf5677611ce5e + # Shared workflow in the org-wide `.github` repository, pinned to a commit SHA + uses: hyperlight-dev/.github/.github/workflows/manage-ready-for-review.yml@55e0ed4457b40f371ec9b6f2828397b09a833a43 with: pr-number: ${{ github.event.pull_request.number }}