From 1ca6b8e3fdc516e7cdfd5cb2d2e08dbc0c063a0c Mon Sep 17 00:00:00 2001 From: lapla-cogito Date: Fri, 24 Jan 2025 09:02:00 +0900 Subject: [PATCH] set default changelog messages to fail the changelog CI --- .github/workflows/clippy_changelog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy_changelog.yml b/.github/workflows/clippy_changelog.yml index 6df5a48c75ff..e7033ca3ded3 100644 --- a/.github/workflows/clippy_changelog.yml +++ b/.github/workflows/clippy_changelog.yml @@ -26,8 +26,8 @@ jobs: run: | body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \ python -c "import sys, json; print(json.load(sys.stdin)['body'])") - output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || { - echo "ERROR: pull request message must contain 'changelog: ...'. Please add it." + output=$(grep "awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g") || { + echo "ERROR: pull request message must contain 'changelog: ...' with your changelog. Please add it." exit 1 } echo "changelog: $output"