On all of our pending PR's, whenever our target branch (master) gets updated (or a new push happens on the source branch), Bitbucket seems to create an "automatic merge" commit, not directly attached to any branch (at least not by the time we can spot it)
However our CI does pick it up under the branch, and causes the build info to not be visible in the PR, as it's attached to this "automatic merge" commit.
n.b.: The fact that the build happens on the (hidden away) automatic merge isn't a big issue in itself (as it ensures everything builds post-merge); but that it's not showing up in the PR is...
We changed our merge strategy to rebase/FF instead; as we're ok with dealing with changes manually; however this doesn't seem to affect these automatic merges.
Please also note that "branching model", "Enable automatic merging" is turned off.
I suspect you're talking about the merges that happen in the "refs/pull-requests/" internal area of Bitbucket? I talk about that area on my stackoverflow teamcity answer here: Show PR Build status in Bitbucket.
If so, those are not really meant for public consumption. They are internal artifacts used for Bitbucket's own operation. If you try creating a PR that contains a merge conflict, you'll notice this "automatic merge" does not happen in that case.
Most git tools operate against "refs/heads" and "refs/tags". Bitbucket stores these guys under "refs/pull-requests" to keep them essentially hidden from regular tools. But, as you've noticed, they are still there and you can see them if really want!
I suspect that Bitbucket only updates these "automatic merges" when the PR page in question is hit by a browser. If you push commits to either branch of the PR (source or target) I don't think the automatic merge changes UNTIL someone actually brings up the PR page itself in a browser window. Not 100% sure of this behaviour though.
I suspect it's basically a way for Bitbucket to cache whether the PR has conflicts or not (an expensive calculation), since the PR screen needs to know that.
It is actually created as soon as you commit, and our builds run fine against it.
The issue is that build statuses attached to that "automatic merge" commit don't get displayed on the PR page on bitbucket (as the display of build status is based on the head of the source branch, and not (alternatively?) on the automatic merge one.
Even though a build on the automatic merge actually gives us more detail as we'll know our builds should succeed after merge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My stackoverflow answer (" Show PR Build status in Bitbucket") shows how you can use curl to get that build-status to show on the PR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.