Skip to content

Commit a7002c2

Browse files
committed
fix(ci): fixup commit message checker failing on PR from forks
1 parent 2f2c455 commit a7002c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/test-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
- name: Check commit messages
6060
if: github.event_name == 'pull_request'
6161
run: |
62-
if git log --format=%s "origin/$GITHUB_BASE_REF..origin/$GITHUB_HEAD_REF" | grep '^fixup!' ; then
62+
PR_REF="${GITHUB_REF%/merge}/head"
63+
git fetch origin "$PR_REF"
64+
if git log --format=%s "origin/$GITHUB_BASE_REF..FETCH_HEAD" | grep '^fixup!' ; then
6365
echo 'Error: this pull request contains fixup commits. Squash them.'
6466
exit 1
6567
fi

0 commit comments

Comments
 (0)