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

Prevent requesting auto-merge for users without write perms to target branch

XMLWordPrintable

    • 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.
    • CtB - Improve Existing

      Issue Summary

      Users who don't have write perms to a repo's target branch (due to branch permissions) can request auto-merge, but the PR remains in a pending stage and auto-merge will never complete, as they don't have write perms (and are unlikely to be granted write perms in the branch permissions).

      Steps to Reproduce

      1. Create user A and user B
      2. Create branch restriction for a repository that blocks writes to branch 'master', except by user B
      3. Have user A raise PR to master on that repository, with user B as a reviewer
      4. User A requests auto-merge

      Expected Results

      User A is blocked from requesting auto-merge as they don't have write perms to the target branch.

      Or user A is allowed to request auto-merge but there's more clear messaging that the PR cannot merge until they have the required write perms, as auto-merge will attempt to merge on their behalf.

      Actual Results

      User A is able to request auto-merge. Regardless if user B approves, the PR remains un-mergeable as auto-merge will attempt to merge on user A's behalf, but user A does not have write perms to 'master' (and it's probably unlikely that they'll get access in most scenarios).

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              c95a692b3157 Stanley Su
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: