Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3180

Branch access controls cause confusing behaviour for pull request authors and reviewers.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Medium
    • None
    • 2.1.2
    • None
    • None

    Description

      This issue is most relevant to the author, as the author rarely has write access. The primary value of a pull request is to allow somebody who does not have write access to the target branch, to request that somebody who does have write access to the target branch "pull" content. The code review aspects are secondary and relate to quality control before completing the "pull".

      If branch controls are enabled on the target branch, as is a common requirement for pull requests, the following confusing behaviour occurs for the author, and for any secondary reviewers who themselves do not have write access:

      1) A merge button is shown. However, the merge button has a caution icon next to it detailing that "You have insufficient permissions to update 'xxxx'. ...". As the author doesn't expect to be able to merge, this is confusing. It would be strongly preferred for the Merge button to either be clearly disabled or removed altogether.

      2) If you browse around the pull request - for example, from "Overview" to "Diff" and back to "Overview", it shows a warning: "This pull request can't be merged. You will need to resolve conflicts to be able to merge." As the author doesn't expect to be able to merge, this is confusing. The "More information" also seems confusing as all it adds is: "You have insufficient permissions to update 'master'. Check your branch permissions with the project administrator."

      I consider this a bug as I think the branch access controls are not working properly with pull requests.

      I tried to determine whether any special conditions are required to cause this problem and it doesn't seem there are.

      Steps to reproduce:

      1) Set write restrictions on "master" to only allow user A to write to "master".

      2) User B to clone repository and create branch "feature/X" off branch "origin/master". "git clone ...", "git checkout -b feature/X origin/master".

      3) User B to make any simple change, commit ("git commit"), push ("git push origin feature/X").

      4) User B to create pull request from "feature/X" to "master".

      At this point, you will see the Merge button with the caution icon not so helpfully pointing out the lack of permission. If you click on "Diff" then back to "Overview" you will see the not so helpful warning that this pull request can't be merged (which is false).

      Our users are most confused about the second behaviour. I consider both behaviours confusing.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              02b1b11374fa markmielke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: