Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Reordered and fixed the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Mar 1, 2022
1 parent dc87c88 commit 8b7665e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8b7665e

Please sign in to comment.