mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 10:42:49 +00:00
feat: add merge request assignment
This commit is contained in:
19
src/api.ts
19
src/api.ts
@@ -564,8 +564,8 @@ export class Api {
|
||||
/**
|
||||
* Set assignee for an issue
|
||||
*
|
||||
* @param issue Issue to set milestone for
|
||||
* @param userId ID of the milestone to set for the issue
|
||||
* @param issue Issue to set assignee for
|
||||
* @param userId ID of the assignee to set for the issue
|
||||
*/
|
||||
public async setAssigneeForIssue(issue: Issue, userId: number): Promise<Issue> {
|
||||
return this.makeGitLabAPIRequest(
|
||||
@@ -576,6 +576,21 @@ export class Api {
|
||||
) as Promise<Issue>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set assignee for an merge request
|
||||
*
|
||||
* @param mergeRequest Merge request to set assignee for
|
||||
* @param userId ID of the assignee to set for the merge request
|
||||
*/
|
||||
public async setAssigneeForMergeRequest(mergeRequest: MergeRequest, userId: number): Promise<MergeRequest> {
|
||||
return this.makeGitLabAPIRequest(
|
||||
`projects/${mergeRequest.project_id}/merge_requests/${mergeRequest.iid}?assignee_ids=${userId}`,
|
||||
{
|
||||
method: 'PUT',
|
||||
},
|
||||
) as Promise<MergeRequest>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set milestone for an issue
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user