Skip to content

Commit

Permalink
fix(ci): fixup commit message checker failing on PR from forks
Browse files Browse the repository at this point in the history
  • Loading branch information
agateau-gg committed Jan 11, 2024
1 parent 2f2c455 commit a7002c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ jobs:
- name: Check commit messages
if: github.event_name == 'pull_request'
run: |
if git log --format=%s "origin/$GITHUB_BASE_REF..origin/$GITHUB_HEAD_REF" | grep '^fixup!' ; then
PR_REF="${GITHUB_REF%/merge}/head"
git fetch origin "$PR_REF"
if git log --format=%s "origin/$GITHUB_BASE_REF..FETCH_HEAD" | grep '^fixup!' ; then
echo 'Error: this pull request contains fixup commits. Squash them.'
exit 1
fi
Expand Down

0 comments on commit a7002c2

Please sign in to comment.