From 43ad213be8155bc6d45a83a372bd42e110c2b1fd Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Wed, 19 Aug 2026 12:55:25 +0800 Subject: [PATCH] Update bypass label handling in PR template check --- util/check-pr-template.cjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/check-pr-template.cjs b/util/check-pr-template.cjs index 0c691a5060..51a8b8ec23 100644 --- a/util/check-pr-template.cjs +++ b/util/check-pr-template.cjs @@ -5,10 +5,10 @@ const authorUsername = process.env.PR_AUTHOR || ""; const authorId = Number(process.env.PR_AUTHOR_ID); const labels = JSON.parse(process.env.PR_LABELS || "[]"); -const BYPASS_LABEL = "ci: bypass-template-check"; +const BYPASS_LABELS = ["ci: bypass-template-check", "maintainer"]; const isTrustedUser = trustedUsers.some((u) => u.id === authorId); -const hasBypassLabel = labels.includes(BYPASS_LABEL); +const hasBypassLabel = labels.some((l) => BYPASS_LABELS.includes(l)); if (isTrustedUser) { console.log(`PR author "${authorUsername}" is a trusted user. Skipping template validation.`); @@ -16,7 +16,7 @@ if (isTrustedUser) { } if (hasBypassLabel) { - console.log(`PR has the "${BYPASS_LABEL}" label. Skipping template validation.`); + console.log(`PR has a label which bypasses this check. Skipping template validation.`); process.exit(0); }