Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions gitlab4j-api/src/main/java/org/gitlab4j/api/IssuesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -1326,4 +1326,27 @@ public Issue moveIssue(Object projectIdOrPath, Long issueIid, Object toProjectId
"move");
return (response.readEntity(Issue.class));
}

/**
* Get list of merge requests related to an issue.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/related_merge_requests</code></pre>
*
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param issueIid the IID of the issue to get the related merge requests for
* @return a List containing all related merge requests for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public List<MergeRequest> getIssueRelatedMergeRequests(Object projectIdOrPath, Long issueIid)
throws GitLabApiException {
Response response = get(
Response.Status.OK,
null,
"projects",
getProjectIdOrPath(projectIdOrPath),
"issues",
issueIid,
"related_merge_requests");
return (response.readEntity(new GenericType<List<MergeRequest>>() {}));
}
}
Loading