diff --git a/src/api.ts b/src/api.ts index a8886da2..fae82b64 100644 --- a/src/api.ts +++ b/src/api.ts @@ -41,7 +41,7 @@ import { * @param ms Number of milliseconds to wait */ export async function sleep(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise(resolve => setTimeout(resolve, ms)); } /** @@ -120,20 +120,19 @@ export class Api { * @param userId ID of the user * @param accessLevel Access level for the new member in the scope */ - public async addMember(scope: MembershipScope, - id: number, - userId: number, - accessLevel: AccessLevel): Promise { - return this.makeGitLabAPIRequest( - `${scope}/${id}/members`, - { - data: { - access_level: accessLevel, - user_id: userId, - }, - method: 'POST', + public async addMember( + scope: MembershipScope, + id: number, + userId: number, + accessLevel: AccessLevel, + ): Promise { + return this.makeGitLabAPIRequest(`${scope}/${id}/members`, { + data: { + access_level: accessLevel, + user_id: userId, }, - ) as Promise; + method: 'POST', + }) as Promise; } /** @@ -144,16 +143,13 @@ export class Api { * @param description Description of the issue (can contain slash commands) */ public async createIssue(projectId: number, title: string, description: string): Promise { - return this.makeGitLabAPIRequest( - `projects/${projectId}/issues`, - { - data: { - description: description, - title: title, - }, - method: 'POST', + return this.makeGitLabAPIRequest(`projects/${projectId}/issues`, { + data: { + description: description, + title: title, }, - ) as Promise; + method: 'POST', + }) as Promise; } /** @@ -164,23 +160,25 @@ export class Api { * @param description Description of the label to create * @param color Color of the label to create */ - public async createLabel(projectId: number, name: string, description?: string, color?: string): Promise