diff --git a/src/api.ts b/src/api.ts index 91dbffd1..2757d087 100644 --- a/src/api.ts +++ b/src/api.ts @@ -17,6 +17,7 @@ import * as request from 'request-promise-native'; import { AccessLevel, Branch, + Discussion, Group, Issue, IssueState, @@ -367,6 +368,18 @@ export class Api { return this.makeGitLabAPIRequest(`/projects/${projectId}/merge_requests/${mergeRequestIid}/approvals`); } + /** + * Get discussions of a merge request + * + * @param projectId ID of the project the merge request belongs to + * @param mergeRequestIid IID of the merge request + */ + public getMergeRequestDiscussions(projectId: number, mergeRequestIid: number): Promise { + return this.makeGitLabAPIRequest( + `projects/${projectId}/merge_requests/${mergeRequestIid}/discussions`, + ); + } + /** * Get merge requests of a group or a project *