diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml index 82d4b63..93423f5 100644 --- a/.github/workflows/check-changelog.yml +++ b/.github/workflows/check-changelog.yml @@ -9,7 +9,8 @@ jobs: - name: Check for changelog entry run: | - if ! git diff --name-only origin/main | grep -q 'CHANGELOG.md'; then - echo "No changelog entry found. Please add an entry to CHANGELOG.md." - exit 1 - fi + BASE_BRANCH=$(jq -r .base.ref < $GITHUB_EVENT_PATH) + if ! git diff --name-only $BASE_BRANCH | grep -q 'CHANGELOG.md'; then + echo "No changelog entry found. Please add an entry to CHANGELOG.md." + exit 1 + fi