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

set -e

CHANGELOG_FILE="changelog.md"


git fetch origin $GITHUB_BASE_REF
git fetch

echo $(git branch -a)

# 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