diff options
Diffstat (limited to '.github/scripts/check-changelog.sh')
-rwxr-xr-x | .github/scripts/check-changelog.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/scripts/check-changelog.sh b/.github/scripts/check-changelog.sh new file mode 100755 index 00000000..ae3b8b11 --- /dev/null +++ b/.github/scripts/check-changelog.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +CHANGELOG_FILE="changelog.md" + +git fetch origin $GITHUB_BASE_REF +git fetch + +# Check if the changelog file was modified in the PR +if git diff --name-only origin/$GITHUB_BASE_REF..remotes/pull/$GITHUB_SOURCE_REF | grep -q $CHANGELOG_FILE; then + echo "Thank you for updating the changelog!" + exit 0 +else + echo "Changelog has not been updated. Please update $CHANGELOG_FILE!" + exit 1 +fi |