Skip to content

Commit bad3f02

Browse files
committed
tools: enforce removal of lts-watch-* labels on release proposals
PR-URL: #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>
1 parent a8f33fd commit bad3f02

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/lint-release-proposal.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ jobs:
9292
"/repos/${GITHUB_REPOSITORY}/compare/v${MAJOR}.x...$GITHUB_SHA" --paginate \
9393
| node tools/actions/lint-release-proposal-commit-list.mjs "$CHANGELOG_PATH" "$GITHUB_SHA" \
9494
| while IFS= read -r PR_URL; do
95-
LABEL="dont-land-on-v${MAJOR}.x" gh pr view \
95+
DONT_LAND_LABEL="dont-land-on-v${MAJOR}.x" LTS_WATCH_LABEL="lts-watch-v${MAJOR}.x" gh pr view \
9696
--json labels,url \
97-
--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' \
97+
--jq '
98+
if (.labels|any(.name==env.DONT_LAND_LABEL)) then
99+
error("\(.url) has the \(env.DONT_LAND_LABEL) label, forbidding it to be in this release proposal")
100+
elif (.labels|any(.name==env.LTS_WATCH_LABEL)) then
101+
error("\(.url) has the \(env.LTS_WATCH_LABEL) label, please remove the label now that the PR is included in a release proposal")
102+
end
103+
' \
98104
"$PR_URL" > /dev/null
99105
done
100106
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.

0 commit comments

Comments
 (0)