Skip to content

Commit

Permalink
Automate feature changelog checking (hashicorp#27450)
Browse files Browse the repository at this point in the history
* Automate feature changelog checking

* Add changelog for testing

* Simplify check

* Forgot the end of line thing

* Escape the characters

* More testing

* Last test?

* Delete test changelog
  • Loading branch information
VioletHynes authored Jun 12, 2024
1 parent 405a3f4 commit 2db5d6a
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 '^\*\*' "$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 2db5d6a

Please sign in to comment.