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.
Maybe this will help fixing this issue:
I had exactly the same problem. I created a branch A and created another branch AB from that. After a manual merge of Branch A, Bitbucket did not recognize the change. After pressing the merge button in the PR I got the following error message:
The merge could not be completed automatically. Please clone 'NAME_OF_THE_REPO', checkout 'develop' and merge 'BRANCH_A' (or commit '7408b10a34f1faa4e047ff42cd9ab315faba72c6') manually, resolving any conflicts, and push the result.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
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