Add a `merge_request.assignee` git push option
Problem to solve
When merge requests are created programmatically they are assigned to the merge request creator. This is often not the desired behavior, especially if the creator is a bot. There should be an easy way to create merge requests that are assigned to other users.
Intended users
Anyone who uses git push -o merge_request.create
.
Further details
Our team has a bot that performs automated housekeeping tasks and creates merge requests as part of this process. We need these MRs to be assigned to humans in order to review them and merge them in. (We have approval requirements enabled in our projects, which also means we can’t auto-merge when the pipeline succeeds -- a different users needs to do it. Sometimes the pipeline also fails as a result of these changes, and manual edits need to be made.)
Proposal
Add a new push option, `merge_request.assignee”. Its value would be a comma-separated list of GitLab usernames. When included, this would be the assignee list for the new MR. When omitted the current behavior of using the creator as the assignee would be used.
Permissions and Security
Documentation
Testing
Workaround
As such git push -o
commands are often used in scripts, creation of an MR could be followed-up by a call to the Update MR API to set the intended assignee.