Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ysawa0 committed Nov 6, 2023
1 parent 6f136c7 commit 9bd416d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ jobs:
git fetch
CUR_SHA=$(git log --pretty=tformat:"%H" -n1 . | tail -n1)
LAST_SHA=$(git log --pretty=tformat:"%H" -n3 . | tail -n1)
echo "Default branch is $DEFAULT_BRANCH"
echo "Current SHA is $CUR_SHA"
echo "Last SHA is $LAST_SHA"
if [[ $GITHUB_REF == "refs/heads/$DEFAULT_BRANCH" ]]; then
git pull origin $DEFAULT_BRANCH
LAST_SHA=$(git log --pretty=tformat:"%H" -n2 . | tail -n1)
echo "Last SHA is $LAST_SHA"
pre-commit run --from-ref $LAST_SHA --to-ref $CUR_SHA
else
pre-commit run --from-ref origin/$DEFAULT_BRANCH --to-ref $CUR_SHA
Expand Down

0 comments on commit 9bd416d

Please sign in to comment.