From f9f6a9097a0a2714f6d0fab1c04c5d1f0100d014 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:31:02 +0100 Subject: [PATCH] Add `verified` label to trigger `pre-commit` (#38708) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- .github/workflows/pre-commit.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d64f6ef0f6..bbc55e9532 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -28,6 +28,7 @@ jobs: }); const hasReadyLabel = pr.labels.some(l => l.name === 'ready'); + const hasVerifiedLabel = pr.labels.some(l => l.name === 'verified'); const { data: mergedPRs } = await github.rest.search.issuesAndPullRequests({ q: `repo:${context.repo.owner}/${context.repo.repo} is:pr is:merged author:${pr.user.login}`, @@ -35,10 +36,10 @@ jobs: }); const mergedCount = mergedPRs.total_count; - if (hasReadyLabel || mergedCount >= 4) { - core.info(`Check passed: ready label=${hasReadyLabel}, 4+ merged PRs=${mergedCount >= 4}`); + if (hasReadyLabel || hasVerifiedLabel || mergedCount >= 4) { + core.info(`Check passed: verified label=${hasVerifiedLabel}, ready label=${hasReadyLabel}, 4+ merged PRs=${mergedCount >= 4}`); } else { - core.setFailed(`PR must have the 'ready' label or the author must have at least 4 merged PRs (found ${mergedCount}).`); + core.setFailed(`PR must have the 'verified' or 'ready' (which also triggers tests) label or the author must have at least 4 merged PRs (found ${mergedCount}).`); } pre-commit: