From 3ff466f553b6a6a29a92db776373d76c8248adb3 Mon Sep 17 00:00:00 2001 From: Taka Nishida Date: Thu, 14 Sep 2023 21:10:21 +0900 Subject: [PATCH] Add report_type to CreateProjectLevelRuleOptions Add missing report_type. Ref: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule --- projects.go | 1 + projects_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/projects.go b/projects.go index 6d4cfe77a..00a0dee68 100644 --- a/projects.go +++ b/projects.go @@ -1809,6 +1809,7 @@ func (s *ProjectsService) GetProjectApprovalRule(pid interface{}, ruleID int, op type CreateProjectLevelRuleOptions struct { Name *string `url:"name,omitempty" json:"name,omitempty"` ApprovalsRequired *int `url:"approvals_required,omitempty" json:"approvals_required,omitempty"` + ReportType *string `url:"report_type,omitempty" json:"report_type,omitempty"` RuleType *string `url:"rule_type,omitempty" json:"rule_type,omitempty"` UserIDs *[]int `url:"user_ids,omitempty" json:"user_ids,omitempty"` GroupIDs *[]int `url:"group_ids,omitempty" json:"group_ids,omitempty"` diff --git a/projects_test.go b/projects_test.go index 7500357a4..b31d0df77 100644 --- a/projects_test.go +++ b/projects_test.go @@ -1194,6 +1194,7 @@ func TestCreateProjectApprovalRule(t *testing.T) { ApprovalsRequired: Int(3), UserIDs: &[]int{5, 50}, GroupIDs: &[]int{5}, + ReportType: String("code_coverage"), } rule, _, err := client.Projects.CreateProjectApprovalRule(1, opt)