Ability in GitLab API to control "Enable self approval of merge requests"

Problem to solve

Presently there is no method to programmatically control via the API the option of "Enable self approval of merge requests" as documented in https://docs.gitlab.com/ee/api/merge_request_approvals.html

In the 11.10 release with the implementation of #10441 (closed) there are two replacement options that eliminate "Enable self approval of merge requests" with:

  • Prevent approval of merge requests by merge request author
  • Prevent approval of merge requests by merge request committers

Intended users

The method we use to ensure certain standards for Merge Request Approvals across our 200+ git repositories is to run a daily cron job that sets our desired permissions.

Further details

The need to control this setting became vital to our organization after https://about.gitlab.com/2019/01/22/gitlab-11-7-released/#stricter-self-approval-restrictions

The workflow impact of of the stricter self approval can be seen in issues like #10043 as many people have needed to allow "Enable self approval of merge requests" but cannot do so programmatically.

The ability to control all options of Merge Request Approvals should be available for consumption via the API.

Edited May 03, 2019 by Andrew Price
Assignee Loading
Time tracking Loading