Skip to content

Automate removal of the ready-for-review label #3

Automate removal of the ready-for-review label

Automate removal of the ready-for-review label #3

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:

Check failure on line 32 in .github/workflows/ready-for-review-label.yml

View workflow run for this annotation

GitHub Actions / Ready-for-review label

Invalid workflow file

The workflow is not valid. .github/workflows/ready-for-review-label.yml (Line: 32, Col: 3): Error calling workflow 'hyperlight-dev/.github/.github/workflows/manage-ready-for-review.yml@8eaae4229db908ea64fff06c31dbf5677611ce5e'. The workflow is requesting 'pull-requests: write', but is only allowed 'pull-requests: read'.
# 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 }}