Skip to content

Commit 29b3d9e

Browse files
authored
Merge pull request #89980 from AThousandShips/ci_better_fix
[CI] Improve fetching of changed files
2 parents 86415f0 + 950743c commit 29b3d9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/static_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
run: |
3434
if [ "${{ github.event_name }}" == "pull_request" ]; then
35-
files=$(git diff-tree --no-commit-id --name-only -r HEAD~${{ github.event.pull_request.commits }}..HEAD 2> /dev/null || true)
35+
files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
3636
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
3737
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
3838
fi

0 commit comments

Comments
 (0)