Skip to content

Commit 4360ae7

Browse files
authored
Fix coverage diffs for PRs that aren't up to date (#2263)
1 parent 26cbe02 commit 4360ae7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/test_coverage.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v2
15+
with:
16+
# If this is a pull request, make sure we check out its head rather than the
17+
# automatically generated merge commit, so that the coverage diff excludes
18+
# unrelated changes in the base branch
19+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
1520

1621
- name: Yarn cache
1722
uses: c-hive/gha-yarn-cache@v2

0 commit comments

Comments
 (0)