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
608c4861
Unverified
Commit
608c4861
authored
Dec 10, 2022
by
Vimsucks
Committed by
GitHub
Dec 09, 2022
Browse files
Add allowMergeOnSkippedPipeline to Project (#846)
parent
3db0a87c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/MergeRequestApi.java
View file @
608c4861
...
...
@@ -331,7 +331,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a list containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public
List
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
int
mergeRequestIid
)
throws
GitLabApiException
{
public
List
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
Long
mergeRequestIid
)
throws
GitLabApiException
{
return
(
getCommits
(
projectIdOrPath
,
mergeRequestIid
,
getDefaultPerPage
()).
all
());
}
...
...
@@ -349,7 +349,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a list containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public
List
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
int
mergeRequestIid
,
int
page
,
int
perPage
)
throws
GitLabApiException
{
public
List
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
Long
mergeRequestIid
,
int
page
,
int
perPage
)
throws
GitLabApiException
{
Form
formData
=
new
GitLabApiForm
().
withParam
(
"owned"
,
true
).
withParam
(
PAGE_PARAM
,
page
).
withParam
(
PER_PAGE_PARAM
,
perPage
);
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"merge_requests"
,
mergeRequestIid
,
"commits"
);
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Commit
>>()
{}));
...
...
@@ -368,7 +368,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a Pager containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public
Pager
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
int
mergeRequestIid
,
int
itemsPerPage
)
throws
GitLabApiException
{
public
Pager
<
Commit
>
getCommits
(
Object
projectIdOrPath
,
Long
mergeRequestIid
,
int
itemsPerPage
)
throws
GitLabApiException
{
return
(
new
Pager
<
Commit
>(
this
,
Commit
.
class
,
itemsPerPage
,
null
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"merge_requests"
,
mergeRequestIid
,
"commits"
));
}
...
...
@@ -385,7 +385,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a Stream containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public
Stream
<
Commit
>
getCommitsStream
(
Object
projectIdOrPath
,
int
mergeRequestIid
)
throws
GitLabApiException
{
public
Stream
<
Commit
>
getCommitsStream
(
Object
projectIdOrPath
,
Long
mergeRequestIid
)
throws
GitLabApiException
{
return
(
getCommits
(
projectIdOrPath
,
mergeRequestIid
,
getDefaultPerPage
()).
stream
());
}
...
...
src/main/java/org/gitlab4j/api/models/MergeRequest.java
View file @
608c4861
...
...
@@ -19,6 +19,7 @@ public class MergeRequest {
private
Author
author
;
private
Boolean
blockingDiscussionsResolved
;
private
List
<
Diff
>
changes
;
private
String
changesCount
;
private
Date
closedAt
;
private
Participant
closedBy
;
private
Date
createdAt
;
...
...
@@ -136,6 +137,14 @@ public class MergeRequest {
this
.
changes
=
changes
;
}
public
String
getChangesCount
()
{
return
changesCount
;
}
public
void
setChangesCount
(
String
changesCount
)
{
this
.
changesCount
=
changesCount
;
}
public
Date
getClosedAt
()
{
return
closedAt
;
}
...
...
src/main/java/org/gitlab4j/api/models/Project.java
View file @
608c4861
...
...
@@ -64,6 +64,7 @@ public class Project {
private
Namespace
namespace
;
private
String
nameWithNamespace
;
private
Boolean
onlyAllowMergeIfPipelineSucceeds
;
private
Boolean
allowMergeOnSkippedPipeline
;
private
Boolean
onlyAllowMergeIfAllDiscussionsAreResolved
;
private
Integer
openIssuesCount
;
private
Owner
owner
;
...
...
@@ -360,6 +361,19 @@ public class Project {
return
(
this
);
}
public
Boolean
getAllowMergeOnSkippedPipeline
()
{
return
allowMergeOnSkippedPipeline
;
}
public
void
setAllowMergeOnSkippedPipeline
(
Boolean
allowMergeOnSkippedPipeline
)
{
this
.
allowMergeOnSkippedPipeline
=
allowMergeOnSkippedPipeline
;
}
public
Project
withAllowMergeOnSkippedPipeline
(
Boolean
allowMergeOnSkippedPipeline
)
{
this
.
allowMergeOnSkippedPipeline
=
allowMergeOnSkippedPipeline
;
return
(
this
);
}
public
Boolean
getOnlyAllowMergeIfAllDiscussionsAreResolved
()
{
return
onlyAllowMergeIfAllDiscussionsAreResolved
;
}
...
...
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