Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Dec 16, 2024
1 parent 2344862 commit 20a2f46
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,15 @@ jobs:
baseSHA=${{github.event.pull_request.base.sha}}
headSHA=${{github.event.pull_request.head.sha}}
echo "Base SHA: $baseSHA"
echo "Head SHA: $headSHA"
echo "${{github.event.pull_request.commits}} commits in PR"
# Loop backward through commits added in the PR, starting from the
# latest.
commitIdx=0
for commit in $(git rev-list $baseSHA..$headSHA)
do
if [ "$commit" = "$baseSHA" ]; then
break
fi
echo "Checking commit: $commit"
git checkout -q $commit
Expand All @@ -180,4 +181,11 @@ jobs:
exit 1
fi
done <<< "$newFiles"
# Stop after going through the number of commits this PR has.
commitIdx=$((commitIdx+1))
if [ "$commitIdx" = "${{github.event.pull_request.commits}}" ]; then
echo "Stopping after $commitIdx commits, on commit $commit"
break
fi
done

0 comments on commit 20a2f46

Please sign in to comment.