-
Suggestion
-
Resolution: Unresolved
-
None
-
-
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
- Create user A and user B
- Create branch restriction for a repository that blocks writes to branch 'master', except by user B
- Have user A raise PR to master on that repository, with user B as a reviewer
- 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