From 8b7665e21407dc2cc583b1c242b95c16156b244f Mon Sep 17 00:00:00 2001 From: Sander van Harmelen Date: Tue, 1 Mar 2022 10:19:11 +0100 Subject: [PATCH] Reordered and fixed the PR --- projects.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/projects.go b/projects.go index 6716d8c09..278f16c21 100644 --- a/projects.go +++ b/projects.go @@ -1739,12 +1739,12 @@ func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, options ...Re // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rules type CreateProjectLevelRuleOptions struct { - ApprovalsRequired *int `url:"approvals_required,omitempty" json:"approvals_required,omitempty"` - GroupIDs *[]int `url:"group_ids,omitempty" json:"group_ids,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"` - ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` + ApprovalsRequired *int `url:"approvals_required,omitempty" json:"approvals_required,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"` + ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` } // CreateProjectApprovalRule creates a new project-level approval rule. @@ -1778,12 +1778,11 @@ func (s *ProjectsService) CreateProjectApprovalRule(pid interface{}, opt *Create // GitLab API docs: // https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-project-level-rules type UpdateProjectLevelRuleOptions struct { + Name *string `url:"name,omitempty" json:"name,omitempty"` ApprovalsRequired *int `url:"approvals_required,omitempty" json:"approvals_required,omitempty"` + UserIDs *[]int `url:"user_ids,omitempty" json:"user_ids,omitempty"` GroupIDs *[]int `url:"group_ids,omitempty" json:"group_ids,omitempty"` - Name *string `url:"name,omitempty" json:"name,omitempty"` ProtectedBranchIDs *[]int `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"` - RuleType *string `url:"rule_type,omitempty" json:"rule_type,omitempty"` - UserIDs *[]int `url:"user_ids,omitempty" json:"user_ids,omitempty"` } // UpdateProjectApprovalRule updates an existing approval rule with new options.