File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,10 +15,14 @@ jobs:
1515 permissions :
1616 pull-requests : write
1717 steps :
18- - uses : actions/checkout@v5
18+ - uses : actions/checkout@v6
1919 with :
2020 persist-credentials : false
21- - uses : actions/setup-node@v3
21+ # When running a pull_request job, GitHub generates a merge commit that merges the PR
22+ # with the latest commit on the target branch. By default, actions/checkout shallowly
23+ # checks out only the merge commit. We want to fetch the two parent commits as well.
24+ fetch-depth : 2
25+ - uses : actions/setup-node@v6
2226 with :
2327 node-version : ' 16.x'
2428 - run : npm ci
@@ -38,11 +42,10 @@ jobs:
3842 run : |
3943 tools/validate --print-case-count-report src/webgpu > case-count-report-after.txt
4044 - name : checkout before PR
41- env :
42- PR_BASE_REF : ${{ github.event.pull_request.base.ref }}
4345 run : |
44- git fetch origin "${PR_BASE_REF}"
45- git checkout "${PR_BASE_REF}"
46+ # HEAD will always be a merge commit with 2 parents.
47+ # HEAD^1 will be the target branch. HEAD^2 will be the PR branch.
48+ git checkout HEAD^1
4649 - name : compute case count before PR and diff
4750 id : case_count_diff
4851 run : |
You can’t perform that action at this time.
0 commit comments