Skip to content

Commit

Permalink
fix: unshallow a clone for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
hraban committed Jul 7, 2024
1 parent 27df712 commit 2642a86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -eu

# Github by default does shallow clones, where there is only one single commit
# which adds everything. In this action I’m only trying to check what was
# /added/ in this commit, not the entire repo, so we need the diff with the
# previous version.
git fetch --deepen=2
# This works for pull_request and push because on a pr github actions will
# create a synthetic merge commit and run the action on that, so this
# encompasses the entire potential merge.
Expand Down

0 comments on commit 2642a86

Please sign in to comment.