Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-7561

Improve merge conflict resolution instructions



    • 55
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.


      Problem Definition

      The merge conflict resolution instructions are not very helpful for cross repository pull requests. They can also give instructions that the user simply cannot fulfil because of lack of permissions.

      Suggested Solution

      • if the pull request is created because of an auto-merge failure, show the auto-merge conflict resolution instructions.
      • if the source branch is a feature, bugfix or hotfix branch, show the old merge instructions that tells the user to merge the target branch back into the source branch and resolve the conflicts.
      • If the source branch is a release branch, the production branch or the main development branch, tell the user to manually merge the pull request.
      • If we cannot determine the type of the release branch, err on the side of caution and tell the user to manually merge the pull request.

      Currently, different instructions are given in different circumstances

      The goal of this logic is to not provide potentially dangerous merge instructions as described in STASH-5443.

      However, consider cross repository pull requests where the pull request author wants to contribute changes from his/her fork to the main repository. In these cases, the author may not have permissions to manually merge the pull request in the target repository. Likewise, the maintainer of the central repository may not have access to the fork and cannot resolve the conflicts.

      For cross repository pull requests it should always be safe to merge the target branch back into the source branch and update the pull request. For cross repository pull requests, the onus should be on the contributor to resolve the conflicts.

      That leaves the question of permissions. If the current user does not have sufficient permissions to resolve the conflicts, the instructions should reflect this. Perhaps they could say something like "The pull request is conflicted and cannot be merged. <Pull request author> will need to resolve the conflicts before it can be merged"


        Issue Links



              Unassigned Unassigned
              mheemskerk Michael Heemskerk
              42 Vote for this issue
              37 Start watching this issue