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
1fd1972f
Commit
1fd1972f
authored
Oct 30, 2019
by
Greg Messner
Browse files
Fixed projectIdOrPath parameter type (#461).
parent
aa66eeca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
View file @
1fd1972f
...
...
@@ -69,7 +69,7 @@ public class ProtectedBranchesApi extends AbstractApi {
* @param branchName the name of the branch to un-protect, can be a wildcard
* @throws GitLabApiException if any exception occurs
*/
public
void
unprotectBranch
(
Integer
projectIdOrPath
,
String
branchName
)
throws
GitLabApiException
{
public
void
unprotectBranch
(
Object
projectIdOrPath
,
String
branchName
)
throws
GitLabApiException
{
delete
(
Response
.
Status
.
NO_CONTENT
,
null
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"protected_branches"
,
urlEncode
(
branchName
));
}
...
...
@@ -83,7 +83,7 @@ public class ProtectedBranchesApi extends AbstractApi {
* @return the branch info for the protected branch
* @throws GitLabApiException if any exception occurs
*/
public
ProtectedBranch
protectBranch
(
Integer
projectIdOrPath
,
String
branchName
)
throws
GitLabApiException
{
public
ProtectedBranch
protectBranch
(
Object
projectIdOrPath
,
String
branchName
)
throws
GitLabApiException
{
return
protectBranch
(
projectIdOrPath
,
branchName
,
AccessLevel
.
MAINTAINER
,
AccessLevel
.
MAINTAINER
);
}
...
...
@@ -99,7 +99,7 @@ public class ProtectedBranchesApi extends AbstractApi {
* @return the branch info for the protected branch
* @throws GitLabApiException if any exception occurs
*/
public
ProtectedBranch
protectBranch
(
Integer
projectIdOrPath
,
String
branchName
,
AccessLevel
pushAccessLevel
,
AccessLevel
mergeAccessLevel
)
throws
GitLabApiException
{
public
ProtectedBranch
protectBranch
(
Object
projectIdOrPath
,
String
branchName
,
AccessLevel
pushAccessLevel
,
AccessLevel
mergeAccessLevel
)
throws
GitLabApiException
{
Form
formData
=
new
GitLabApiForm
()
.
withParam
(
"name"
,
branchName
,
true
)
.
withParam
(
"push_access_level"
,
pushAccessLevel
.
toValue
(),
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