Skip to content

Commit

Permalink
Automate feature changelog checking
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletHynes committed Jun 11, 2024
1 parent 64316fa commit 10c005e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/changelog-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
echo "Not found."
echo ""
echo "Did not find a changelog entry named ${expected_changelog_file}"
echo "If your changelog file is correct, skip this check with the 'pr/no-changelog' label"
echo "Reference - https://github.com/hashicorp/vault/pull/10363 and https://github.com/hashicorp/vault/pull/11894"
echo "If your changelog file is correct, or this change does not need a changelog, skip this check with the 'pr/no-changelog' label"
echo "Reference - https://github.com/hashicorp/vault/blob/main/CONTRIBUTING.md#changelog-entries"
exit 1
fi
Expand All @@ -76,6 +76,12 @@ jobs:
elif grep -q ':fix$' "$changelog_files"; then
echo "Found invalid type (fix) in changelog - did you mean bug?"
exit 1
elif grep -q ':feature' "$changelog_files"; then
if ! grep -q 'feature\n**' "$changelog_files"; then
echo "Feature changelogs must be formatted like the following:"
echo "**Feature Name**: Feature description"
exit 1
fi
elif ! grep -q '```release-note:' "$changelog_files"; then
# People often make changelog files like ```changelog:, which is incorrect.
echo "Changelog file did not contain 'release-note' heading - check formatting."
Expand Down

0 comments on commit 10c005e

Please sign in to comment.