GeezerVison is showing github.com — tools: enforce removal of `lts-watch-*` labels on release proposals · nodejs/node@6059055
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/lint-release-proposal.yml +8-2Lines changed: 8 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
92 | 92 | "/repos/${GITHUB_REPOSITORY}/compare/v${MAJOR}.x...$GITHUB_SHA" --paginate \ |
93 | 93 | | node tools/actions/lint-release-proposal-commit-list.mjs "$CHANGELOG_PATH" "$GITHUB_SHA" \ |
94 | 94 | | 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 \ |
96 | 96 | --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 | + ' \ |
98 | 104 | "$PR_URL" > /dev/null |
99 | 105 | done |
100 | 106 | 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. |
|