Skip to content

Commit

Permalink
fixup! add validation for dont-land labels
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Dec 19, 2024
1 parent e8bb005 commit 6022db5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-release-proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ jobs:
--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' \
"$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
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.
env:
GH_TOKEN: ${{ github.token }}
4 changes: 2 additions & 2 deletions tools/actions/lint-release-proposal-commit-list.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ for await (const line of stdinLineByLine) {
continue;
}

const lineStart = commitList.indexOf(`\n* \[[\`${smallSha}\`]`);
const lineStart = commitList.indexOf(`\n* [[\`${smallSha}\`]`);
assert.notStrictEqual(lineStart, -1, `Cannot find ${smallSha} on the list`);
const lineEnd = commitList.indexOf('\n', lineStart + 1);

const expectedCommitTitle = `${`**${splitTitle.shift()}`.replace('**Revert \"', '_**Revert**_ "**')}**:${splitTitle.join(':')}`;
const expectedCommitTitle = `${`**${splitTitle.shift()}`.replace('**Revert "', '_**Revert**_ "**')}**:${splitTitle.join(':')}`;
try {
assert(commitList.lastIndexOf(`/${smallSha})] - ${expectedCommitTitle} (`, lineEnd) > lineStart, `Commit title doesn't match`);
} catch (e) {
Expand Down

0 comments on commit 6022db5

Please sign in to comment.