What is the "PR merge branch"?

I have been working on optimising Actions workflows and only today noticed that actions/checkout when called on a PR without any options checks out a merge branch:

git checkout --progress --force refs/remotes/pull/3048/merge

It is also mentioned here:

GITHUB_REF

PR merge branch refs/pull/:prNumber/merge

Can someone tell me what exactly this is? Intuitively it sounds like it is just merges target branch into the PR branch and runs the Actions. But is there some more documentation I can find for this? I would like to know what happens when there is merge conflict between the target branch and the PR branch.

Thanks.

Basically yes, though I’d phrase it the other way around. :slightly_smiling_face:

The pull_request event documentation states that the workflow won’t run in that case.

1 Like

Thank you very much. I should have been more careful reading that documentation.

1 Like