From 89ad7dc63bb231a001d2bc71f02cab6ce7fa49c8 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 6 Feb 2026 11:40:11 +0100 Subject: [PATCH] tools: enforce removal of `lts-watch-*` labels on release proposals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61672 Reviewed-By: Michaƫl Zasso Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Marco Ippolito Reviewed-By: Rafael Gonzaga Reviewed-By: Tierney Cyren --- .github/workflows/lint-release-proposal.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index ec7482d501b..51636bd583a 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -92,9 +92,15 @@ jobs: "/repos/${GITHUB_REPOSITORY}/compare/v${MAJOR}.x...$GITHUB_SHA" --paginate \ | node tools/actions/lint-release-proposal-commit-list.mjs "$CHANGELOG_PATH" "$GITHUB_SHA" \ | while IFS= read -r PR_URL; do - LABEL="dont-land-on-v${MAJOR}.x" gh pr view \ + DONT_LAND_LABEL="dont-land-on-v${MAJOR}.x" LTS_WATCH_LABEL="lts-watch-v${MAJOR}.x" gh pr view \ --json labels,url \ - --jq 'if (.labels|map(.name==env.LABEL)|any) then error("\(.url) has the \(env.LABEL) label, forbidding it to be in this release proposal") end' \ + --jq ' + if (.labels|any(.name==env.DONT_LAND_LABEL)) then + error("\(.url) has the \(env.DONT_LAND_LABEL) label, forbidding it to be in this release proposal") + elif (.labels|any(.name==env.LTS_WATCH_LABEL)) then + error("\(.url) has the \(env.LTS_WATCH_LABEL) label, please remove the label now that the PR is included in a release proposal") + end + ' \ "$PR_URL" > /dev/null done shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option.