Commit 7c69d7a4 authored by Tim Olshansky's avatar Tim Olshansky

Ensure that for newer versions of Gitlab we use the state property

to determine if the merge request is closed. References: timols/jenkins-gitlab-merge-request-builder-plugin#10
parent ff717f8c
......@@ -104,7 +104,8 @@ public class GitlabAPI {
List<GitlabMergeRequest> openMergeRequests = new ArrayList<GitlabMergeRequest>();
for (GitlabMergeRequest mergeRequest : allMergeRequests) {
if (mergeRequest.isClosed()) {
boolean closedState = (mergeRequest.getState() != null && mergeRequest.getState().equals("closed"));
if (closedState || mergeRequest.isClosed()) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment