summaryrefslogtreecommitdiff
path: root/.github/scripts/check-changelog.sh
blob: 8d4ac0dfee13dc8bee2e393294b73316e533a4b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

set -e

CHANGELOG_FILE="changelog.md"

git fetch origin $GITHUB_BASE_REF

# Check if the changelog file was modified in the PR
if git diff --name-only origin/$GITHUB_BASE_REF..$GITHUB_HEAD_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