mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +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 {
|
import {
|
||||||
AccessLevel,
|
AccessLevel,
|
||||||
Branch,
|
Branch,
|
||||||
|
Discussion,
|
||||||
Group,
|
Group,
|
||||||
Issue,
|
Issue,
|
||||||
IssueState,
|
IssueState,
|
||||||
@@ -367,6 +368,18 @@ export class Api {
|
|||||||
return this.makeGitLabAPIRequest(`/projects/${projectId}/merge_requests/${mergeRequestIid}/approvals`);
|
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
|
* Get merge requests of a group or a project
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user