Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
3b42ed38
Commit
3b42ed38
authored
Jul 22, 2013
by
Tim Olshansky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1 from Ebolon/merge-state
Fixed to check only merge request with state "closed" or "open".
parents
840002c5
6f9248af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+1
-3
GitlabMergeRequest.java
src/main/java/org/gitlab/api/models/GitlabMergeRequest.java
+4
-0
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
3b42ed38
...
...
@@ -104,11 +104,9 @@ public class GitlabAPI {
List
<
GitlabMergeRequest
>
openMergeRequests
=
new
ArrayList
<
GitlabMergeRequest
>();
for
(
GitlabMergeRequest
mergeRequest
:
allMergeRequests
)
{
boolean
closedState
=
(
mergeRequest
.
getState
()
!=
null
&&
mergeRequest
.
getState
().
equals
(
"closed"
));
if
(
closedState
||
mergeRequest
.
isClosed
())
{
if
(
mergeRequest
.
isMerged
()
||
mergeRequest
.
isClosed
())
{
continue
;
}
openMergeRequests
.
add
(
mergeRequest
);
}
...
...
src/main/java/org/gitlab/api/models/GitlabMergeRequest.java
View file @
3b42ed38
...
...
@@ -100,5 +100,9 @@ public class GitlabMergeRequest {
public
void
setState
(
String
state
)
{
_state
=
state
;
if
(
state
!=
null
)
{
_closed
=
state
.
equals
(
"closed"
);
_merged
=
state
.
equals
(
"merged"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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