Skip to content

Decouple group and project level merge request approval settings

The GitLab API docs for merge request approval settings made it seem like selective_code_owner_removals was available at group and project level. See the discussion here: gitlab-org/terraform-provider-gitlab!2588 (comment 2688878372)

In order to remove selective_code_owner_removals as a option for the group endpoints, we will need to have a different struct for UpdateMergeRequestApprovalSettingsOptions .

This would be a breaking change so would be in the 1.0 milestone.

Implementation Guide

  • Rename UpdateMergeRequestApprovalSettingsOptions to UpdateProjectMergeRequestApprovalSettingsOptions.
  • Create a copy of UpdateProjectMergeRequestApprovalSettingsOptions called UpdateGroupRequestApprovalSettingsOptions but without the SelectiveCodeOwnerRemovals field.
  • Update UpdateGroupMergeRequestApprovalSettings to use UpdateGroupRequestApprovalSettingsOptions.
  • Update UpdateProjectMergeRequestApprovalSettings to use UpdateProjectMergeRequestApprovalSettingsOptions.
  • Update remaining test and interface references to use the new struct names.
Edited by Heidi Berry
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information