Add support for group.default_branch_protection_defaults.code_owner_approval_required

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Work on this issue

Add the ability to set code_owner_approval_required in a group's default_branch_protection_defaults.

Implementation Guide

  • Follow the CONTRIBUTING.md guide for setting up your local development environment.
  • Clone the community fork of this project.
  • In groups.go, add CodeOwnerApprovalRequired to the BranchProtectionDefaults and DefaultBranchProtectionDefaultsOptions structs.
  • In groups.go, add encoding for CodeOwnerApprovalRequired to the EncodeValues function.
  • Update the unit tests in groups_test.go to include the new field.
  • Add integration tests to gitlab_test/groups_integration_test.go to verify the new field can be set on group creation, updated on a group, and returned when getting a group.
Edited Jan 31, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading