I have a pull request which for some unknown reason I was not allowed to merge from the Stash website. The Merge button is disabled with the error "This pull request cannot be merged automatically". I could not figure out why as it is a fast forward merge without any conflicts...
There were no instructions on how to manually resolve the merge on the Stash pull request page. I remember previous versions provided instructions which would have been helpful.
So I ran the following commands on locally
git checkout master
git merge --no-ff --log cool-feature-branch
The merge commit does include the correct parents (one from master and the other from the single commit on my feature branch) and the merge commit message includes the id of the pull request "Merge pull request #1 in FOO/BarRepo from cool-feature-branch to master". However the pull request remains open and I don't see any way to mark it as resolved and link back the merge commit on master.
Can someone please help me understand why I couldn't merge using the website and how to resolve my pull request?
If you hover over the warning message it will have a link with "More information" that will show you the exact reason(s) that you can't merge. It might not (necessarily) be related to a clean merge, it can also be about other restrictions such as minimum number of reviewers or broken builds if you have any of that configured. If the problem is related to a merge error the instructions will show up as normal on the overview tab saying "This pull request can't be merged".
If you merged and pushed as normal then I would also expect Stash to make the pull request as merged. Is the most recent commit of the PR definitely the same as the commit that you merge locally? That is to say, you haven't done any force pushes that would result in different hashes?
My first thought is that it may be related to this issue:
If that is not the case, or regardless, you may want to raise a support ticket.
Regarding your currently open PR, I would suggest just declining it. There isn't any way to "mark" it as merged but not do any work. I'm not quite sure what you would happen if you merged and the commit was already included in the target branch (it shouldn't be possible to get into that state).
Apologies for the late reply...
Thank you for the suggestion to look for a hover tooltip. It was not at all intuitive that was where the critical information of why I couldn't merge would be located. Hopefully in a later release that information is displayed directly on the screen but at least I know where to find it now. :-)
Funny thing is that when another pull request was merged the other day, that magically marked my open pull request as closed. I guess the branch in that pull request included the commit from the original one that became stuck.
I never did find out why it wasn't closed when I manually merged it but if it happens again, I'll open a support ticket.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs