mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
tools: enforce removal of lts-watch-* labels on release proposals
PR-URL: https://github.com/nodejs/node/pull/61672 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im>
This commit is contained in:
1 parent
447fb9a0b5
commit
89ad7dc63b
1 file changed
+8
-2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user