For a PR with number 1 GitHub automatically creates a ref refs/pulls/1/head
and refs/pulls/1/merge
. The latter contains the result of the merge and is especially useful for e.g. CI (because what you want to test is actually the result of the merge).
After merging a PR, the refs/pulls/<number>/merge
is no longer available (I suppose because the PR is no longer mergeable). Currently I want to run a test on a version that was merged a while ago. Is there an easy way to access the result of the merged PR, given just the PR number?