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
fc4ed45d
Commit
fc4ed45d
authored
Dec 04, 2018
by
Greg Messner
Browse files
Added support for packages_enabled (#278).
parent
82ac043a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
fc4ed45d
...
@@ -751,7 +751,8 @@ public class ProjectApi extends AbstractApi implements Constants {
...
@@ -751,7 +751,8 @@ public class ProjectApi extends AbstractApi implements Constants {
.
withParam
(
"import_url"
,
importUrl
)
.
withParam
(
"import_url"
,
importUrl
)
.
withParam
(
"printing_merge_request_link_enabled"
,
project
.
getPrintingMergeRequestLinkEnabled
())
.
withParam
(
"printing_merge_request_link_enabled"
,
project
.
getPrintingMergeRequestLinkEnabled
())
.
withParam
(
"resolve_outdated_diff_discussions"
,
project
.
getResolveOutdatedDiffDiscussions
())
.
withParam
(
"resolve_outdated_diff_discussions"
,
project
.
getResolveOutdatedDiffDiscussions
())
.
withParam
(
"initialize_with_readme"
,
project
.
getInitializeWithReadme
());
.
withParam
(
"initialize_with_readme"
,
project
.
getInitializeWithReadme
())
.
withParam
(
"packages_enabled"
,
project
.
getPackagesEnabled
());
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
boolean
isPublic
=
(
project
.
getPublic
()
!=
null
?
project
.
getPublic
()
:
project
.
getVisibility
()
==
Visibility
.
PUBLIC
);
boolean
isPublic
=
(
project
.
getPublic
()
!=
null
?
project
.
getPublic
()
:
project
.
getVisibility
()
==
Visibility
.
PUBLIC
);
...
@@ -994,7 +995,8 @@ public class ProjectApi extends AbstractApi implements Constants {
...
@@ -994,7 +995,8 @@ public class ProjectApi extends AbstractApi implements Constants {
.
withParam
(
"repository_storage"
,
project
.
getRepositoryStorage
())
.
withParam
(
"repository_storage"
,
project
.
getRepositoryStorage
())
.
withParam
(
"approvals_before_merge"
,
project
.
getApprovalsBeforeMerge
())
.
withParam
(
"approvals_before_merge"
,
project
.
getApprovalsBeforeMerge
())
.
withParam
(
"printing_merge_request_link_enabled"
,
project
.
getPrintingMergeRequestLinkEnabled
())
.
withParam
(
"printing_merge_request_link_enabled"
,
project
.
getPrintingMergeRequestLinkEnabled
())
.
withParam
(
"resolve_outdated_diff_discussions"
,
project
.
getResolveOutdatedDiffDiscussions
());
.
withParam
(
"resolve_outdated_diff_discussions"
,
project
.
getResolveOutdatedDiffDiscussions
())
.
withParam
(
"packages_enabled"
,
project
.
getPackagesEnabled
());
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
if
(
isApiVersion
(
ApiVersion
.
V3
))
{
formData
.
withParam
(
"visibility_level"
,
project
.
getVisibilityLevel
());
formData
.
withParam
(
"visibility_level"
,
project
.
getVisibilityLevel
());
...
...
src/main/java/org/gitlab4j/api/models/Project.java
View file @
fc4ed45d
...
@@ -89,6 +89,7 @@ public class Project {
...
@@ -89,6 +89,7 @@ public class Project {
private
Boolean
resolveOutdatedDiffDiscussions
;
private
Boolean
resolveOutdatedDiffDiscussions
;
private
ProjectStatistics
statistics
;
private
ProjectStatistics
statistics
;
private
Boolean
initializeWithReadme
;
private
Boolean
initializeWithReadme
;
private
Boolean
packagesEnabled
;
public
Integer
getApprovalsBeforeMerge
()
{
public
Integer
getApprovalsBeforeMerge
()
{
return
approvalsBeforeMerge
;
return
approvalsBeforeMerge
;
...
@@ -622,6 +623,19 @@ public class Project {
...
@@ -622,6 +623,19 @@ public class Project {
return
(
this
);
return
(
this
);
}
}
public
Boolean
getPackagesEnabled
()
{
return
packagesEnabled
;
}
public
void
setPackagesEnabled
(
Boolean
packagesEnabled
)
{
this
.
packagesEnabled
=
packagesEnabled
;
}
public
Project
withPackagesEnabled
(
Boolean
packagesEnabled
)
{
this
.
packagesEnabled
=
packagesEnabled
;
return
(
this
);
}
public
ProjectStatistics
getStatistics
()
{
public
ProjectStatistics
getStatistics
()
{
return
statistics
;
return
statistics
;
}
}
...
...
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