Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
9aae1d86
Unverified
Commit
9aae1d86
authored
Nov 11, 2023
by
Christoph Brill
Committed by
GitHub
Nov 11, 2023
Browse files
Add allow_force_push in ProtectedBranch (#1051)
--------- Co-authored-by:
Jeremie Bresson
<
jeremie.bresson@unblu.com
>
parent
30f18d6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/models/ProtectedBranch.java
View file @
9aae1d86
...
...
@@ -13,6 +13,7 @@ public class ProtectedBranch {
private
List
<
BranchAccessLevel
>
mergeAccessLevels
;
private
List
<
BranchAccessLevel
>
unprotectAccessLevels
;
private
Boolean
codeOwnerApprovalRequired
;
private
Boolean
allowForcePush
;
public
Long
getId
()
{
return
id
;
...
...
@@ -86,6 +87,19 @@ public class ProtectedBranch {
return
this
;
}
public
Boolean
getAllowForcePush
()
{
return
allowForcePush
;
}
public
void
setAllowForcePush
(
Boolean
allowForcePush
)
{
this
.
allowForcePush
=
allowForcePush
;
}
public
ProtectedBranch
withAllowForcePush
(
Boolean
allowForcePush
)
{
this
.
allowForcePush
=
allowForcePush
;
return
this
;
}
@Override
public
String
toString
()
{
return
(
JacksonJson
.
toJsonString
(
this
));
...
...
src/test/resources/org/gitlab4j/api/protected-branch.json
View file @
9aae1d86
...
...
@@ -20,5 +20,7 @@
{
"group_id"
:
2
}
]
],
"allow_force_push"
:
false
,
"code_owner_approval_required"
:
false
}
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