mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-10 03:32:52 +00:00
feat: add method to fetch merge request discussions
This commit is contained in:
13
src/api.ts
13
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<Discussion> {
|
||||
return this.makeGitLabAPIRequest(
|
||||
`projects/${projectId}/merge_requests/${mergeRequestIid}/discussions`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get merge requests of a group or a project
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user