Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
426f18b3
Commit
426f18b3
authored
1 year ago
by
Jeremie Bresson
Browse files
Options
Download
Plain Diff
Merge remote-tracking branch 'origin/main' into 6.x
parents
94a9a8f3
58438c60
6.x
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
+32
-2
.../java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
src/test/resources/org/gitlab4j/api/project-approvals-config.json
+3
-1
.../resources/org/gitlab4j/api/project-approvals-config.json
with
35 additions
and
3 deletions
+35
-3
src/main/java/org/gitlab4j/api/models/ProjectApprovalsConfig.java
+
32
-
2
View file @
426f18b3
...
...
@@ -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
;
...
...
@@ -38,6 +40,19 @@ public class ProjectApprovalsConfig {
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
;
}
...
...
@@ -77,6 +92,19 @@ public class ProjectApprovalsConfig {
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.
*
...
...
@@ -84,11 +112,13 @@ public class ProjectApprovalsConfig {
*/
@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
);
}
}
This diff is collapsed.
Click to expand it.
src/test/resources/org/gitlab4j/api/project-approvals-config.json
+
3
-
1
View file @
426f18b3
{
"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
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets