Skip to content

Commit

Permalink
set default changelog messages to fail the changelog CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lapla-cogito committed Jan 24, 2025
1 parent 396de57 commit 1ca6b8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clippy_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1ca6b8e

Please sign in to comment.