From e055283d9367d83f50e5a0b878f13a21026d0ee7 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 20 Nov 2024 12:28:48 +0100 Subject: [PATCH] fixup! tools: add linter for release commit proposals --- .github/workflows/lint-release-proposal.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index ee66a081554d8e..7ef9dba52225f5 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -25,14 +25,15 @@ jobs: persist-credentials: false - name: Lint release commit title format run: | - git log -1 HEAD --format=%s | grep -q -E '^\d{4}-\d{2}-\d{2}, Version \d+\.\d+\.\d+ (\(Current|'.+' \(LTS)\)$' + git --no-pager log -1 --format=%s + git --no-pager log -1 --format=%s | grep -q -E '^\d{4}-\d{2}-\d{2}, Version \d+\.\d+\.\d+ (\(Current|'.+' \(LTS)\)$' - name: Lint release commit message trailers run: | - git log -1 HEAD --format=%b | git interpret-trailers --parse --no-divider | grep -E -q "^PR-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[0-9]+$" + git --no-pager log -1 --format=%b | git interpret-trailers --parse --no-divider | grep -E -q "^PR-URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/[0-9]+$" - name: Extract releaser info id: releaser-info run: | - COMMIT_SUBJECT="$(git log -1 HEAD --format=%s)" + COMMIT_SUBJECT="$(git --no-pager log -1 --format=%s)" CHANGELOG_TITLE_INTRO="## $COMMIT_SUBJECT, @" CHANGELOG_TITLE="$(grep "$CHANGELOG_TITLE_INTRO" "doc/changelogs/CHANGELOG_V${COMMIT_SUBJECT:20:2}.md")" [[ "${CHANGELOG_TITLE%@*}@" == "$CHANGELOG_TITLE_INTRO" ]]