Skip to content

What is the "PR merge branch"? #26819

What is the "PR merge branch"? #26819
Oct 4, 2021 · 2 answers

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.

kartikdc:

Intuitively it sounds like it is just merges target branch into the PR branch and runs the Actions.

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

kartikdc:

I would like to know what happens when there is merge conflict between the target branch and the PR branch.

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

Replies

2 suggested answers
kartikdc:

Intuitively it sounds like it is just merges target branch into the PR branch and runs the Actions.

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

kartikdc:

I would like to know what happens when there is merge conflict between the target branch and the PR branch.

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

0 replies
Answer selected

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

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants