gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

There is no related_merge_requests method in IssuesApi

Open kolybelkin opened this issue 3 years ago • 1 comments

Gitlab has a method for getting all linked merge requests from issue, here is the link for the documentation - https://docs.gitlab.com/ee/api/issues.html#list-merge-requests-related-to-issue

I tried to customize IssueApi class and added the following method which works as expected

fun getRelatedMergeRequests(projectIdOrPath: Any?, issueIid: Long?): List<MergeRequest> {
        return Pager(
            this, MergeRequest::class.java, defaultPerPage, null,
            "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "related_merge_requests"
        ).all()
    }

kolybelkin avatar Aug 12 '22 10:08 kolybelkin

Has it already implemented in some private non-released version? If not, I can create a pull request with these changes, just let me know

kolybelkin avatar Aug 12 '22 10:08 kolybelkin