I have a main branch, which has a branch a from it. This branch in turn has b branching off of it. a has already been merged through a pull request and b has an open one merging into a. I have pulled new changes from main to a after it has been merged, to update the diff of b's PR. For some reason this PR is now considered merged for BitBucket. The merge commit mentioned is an entirely different one that has nothing to do with these branches.
Here is a picture of the PR that somehow is marked as merged: (not PR #96)
And here is the PR which the merge commit actually belongs to: (PR #96)
Hello @Friedrich and welcome to the Community!
The way that Bitbucket Cloud validates if a Pull Request is already merged is by checking the diffs between the source and destination branches. If the diff is empty, the pull request will be considered merged.
If all the commits that a pull request A was planning to merge are already part of another pull request B that was merged, the pull request A will also be considered merged by Bitbucket, even though you have not directly merged it in the UI.
This behavior is explained more in detail in the following article, along with the commands you can use locally to check the diffs between the branches involved in those pull requests:
If after going through that article you have any questions, feel free to ask.
Thank you, @Friedrich !
Patrik S
Thank you!
This at least explains how a pull rquest could be considered merged even if no one manually merged it. But there were commits that did not exist on the source branch. They somehow got lost during a branch merge, which caused the diff to be empty. I "resolved" this by restoring the changes and opening a new pull request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.