mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
[CI] Improve fetching of changed files
PRs always use a merge into the repo on checkout, so checking for `HEAD^1` will show all the changes regardless of the number of commits in a PR
This commit is contained in:
parent
86415f0245
commit
950743c3d8
2
.github/workflows/static_checks.yml
vendored
2
.github/workflows/static_checks.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
files=$(git diff-tree --no-commit-id --name-only -r HEAD~${{ github.event.pull_request.commits }}..HEAD 2> /dev/null || true)
|
||||
files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
|
||||
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
|
||||
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user