Skip to content

Commit 3711bc7

Browse files
ci: Snapshot API against the PR head, not the merge ref
actions/checkout defaults to the pull_request merge ref (PR + target branch), so the matrix job was running ApiApprovalTests against a tree that differed from the PR head. The accept job then committed those .verified.txt files onto the PR head — which doesn't contain target's changes — guaranteeing the next run would fail again. Pin the matrix checkout to pull_request.head.sha so both jobs operate on the same tree.
1 parent 910cb56 commit 3711bc7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/verify-api.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ jobs:
3535
slnf: Sentry-CI-Build-Windows.slnf
3636

3737
steps:
38+
# Check out the PR head sha, not the GitHub-synthesized pull_request merge
39+
# ref. Otherwise we'd snapshot the API surface of (PR + main) and commit
40+
# those .verified.txt files back to the PR head, which doesn't contain
41+
# main's changes — the next run would fail again.
3842
- name: Checkout
3943
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4044
with:
45+
ref: ${{ github.event.pull_request.head.sha }}
4146
submodules: recursive
4247

4348
- name: Remove unused applications

0 commit comments

Comments
 (0)