Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jmini committed Nov 10, 2023
2 parents 94a9a8f + 58438c6 commit 426f18b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
34 changes: 32 additions & 2 deletions src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ public class ProjectApprovalsConfig {

private Integer approvalsBeforeMerge;
private Boolean resetApprovalsOnPush;
private Boolean selectiveCodeOwnerRemovals;
private Boolean disableOverridingApproversPerMergeRequest;
private Boolean mergeRequestsAuthorApproval;
private Boolean mergeRequestsDisableCommittersApproval;
private Boolean requirePasswordToApprove;

public Integer getApprovalsBeforeMerge() {
return approvalsBeforeMerge;
Expand Down Expand Up @@ -38,6 +40,19 @@ public ProjectApprovalsConfig withResetApprovalsOnPush(Boolean resetApprovalsOnP
return (this);
}

public Boolean getSelectiveCodeOwnerRemovals() {
return selectiveCodeOwnerRemovals;
}

public void setSelectiveCodeOwnerRemovals(Boolean selectiveCodeOwnerRemovals) {
this.selectiveCodeOwnerRemovals = selectiveCodeOwnerRemovals;
}

public ProjectApprovalsConfig withSelectiveCodeOwnerRemovals(Boolean selectiveCodeOwnerRemovals) {
this.selectiveCodeOwnerRemovals = selectiveCodeOwnerRemovals;
return this;
}

public Boolean getDisableOverridingApproversPerMergeRequest() {
return disableOverridingApproversPerMergeRequest;
}
Expand Down Expand Up @@ -77,18 +92,33 @@ public ProjectApprovalsConfig withMergeRequestsDisableCommittersApproval(Boolean
return (this);
}

public Boolean getRequirePasswordToApprove() {
return requirePasswordToApprove;
}

public void setRequirePasswordToApprove(Boolean requirePasswordToApprove) {
this.requirePasswordToApprove = requirePasswordToApprove;
}

public ProjectApprovalsConfig withRequirePasswordToApprove(Boolean requirePasswordToApprove) {
this.requirePasswordToApprove = requirePasswordToApprove;
return this;
}

/**
* Get the form params specified by this instance.
*
* @return a GitLabApiForm instance holding the form parameters for this ProjectApprovalsConfig instance
*/
@JsonIgnore
public GitLabApiForm getForm() {
return new GitLabApiForm()
return new GitLabApiForm()
.withParam("approvals_before_merge", approvalsBeforeMerge)
.withParam("reset_approvals_on_push", resetApprovalsOnPush)
.withParam("selective_code_owner_removals", selectiveCodeOwnerRemovals)
.withParam("disable_overriding_approvers_per_merge_request", disableOverridingApproversPerMergeRequest)
.withParam("merge_requests_author_approval", mergeRequestsAuthorApproval)
.withParam("merge_requests_disable_committers_approval", mergeRequestsDisableCommittersApproval);
.withParam("merge_requests_disable_committers_approval", mergeRequestsDisableCommittersApproval)
.withParam("require_password_to_approve", requirePasswordToApprove);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"approvals_before_merge": 2,
"reset_approvals_on_push": true,
"selective_code_owner_removals": false,
"disable_overriding_approvers_per_merge_request": false,
"merge_requests_author_approval": false,
"merge_requests_disable_committers_approval": false
"merge_requests_disable_committers_approval": false,
"require_password_to_approve": false
}

0 comments on commit 426f18b

Please sign in to comment.