summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2024-03-28 19:06:55 +0100
committerGitHub <noreply@github.com>2024-03-28 19:06:55 +0100
commit29b3d9e9e538f0aa8effc8ad8bf19a2915292a89 (patch)
treeda0ebac235468280e70828d13613d7445ef11708
parent86415f02452dbf6de85325d3321fd7ec7fba9e94 (diff)
parent950743c3d87275a65a99fd9dffc9250669eefec1 (diff)
downloadredot-engine-29b3d9e9e538f0aa8effc8ad8bf19a2915292a89.tar.gz
Merge pull request #89980 from AThousandShips/ci_better_fix
[CI] Improve fetching of changed files
-rw-r--r--.github/workflows/static_checks.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml
index 74935bb618..0ed7432833 100644
--- a/.github/workflows/static_checks.yml
+++ b/.github/workflows/static_checks.yml
@@ -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