mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: build system
This commit is contained in:
@@ -33,7 +33,9 @@ import {
|
||||
Tag,
|
||||
TreeFile,
|
||||
} from './types.js';
|
||||
import got from "got";
|
||||
import got from 'got';
|
||||
|
||||
export * from './types.js'
|
||||
|
||||
/**
|
||||
* Sleep for a number of milliseconds
|
||||
@@ -300,9 +302,7 @@ export class Api {
|
||||
commitish,
|
||||
)}`;
|
||||
|
||||
return this.makeGitLabAPIRequest(
|
||||
`projects/${projectId}/repository/files/${fileIdentifier}`,
|
||||
);
|
||||
return this.makeGitLabAPIRequest(`projects/${projectId}/repository/files/${fileIdentifier}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -508,17 +508,18 @@ export class Api {
|
||||
retry: {
|
||||
limit: _options.tries,
|
||||
},
|
||||
}).on('response', response => {
|
||||
const xTotalPages = response.headers['x-total-pages'];
|
||||
|
||||
if (typeof xTotalPages === 'string') {
|
||||
totalPages = Number.parseInt(xTotalPages, 10);
|
||||
}
|
||||
}).json<unknown[]>();
|
||||
})
|
||||
.on('response', response => {
|
||||
const xTotalPages = response.headers['x-total-pages'];
|
||||
|
||||
if (typeof xTotalPages === 'string') {
|
||||
totalPages = Number.parseInt(xTotalPages, 10);
|
||||
}
|
||||
})
|
||||
.json<unknown[]>();
|
||||
|
||||
if (_options.method === 'DELETE') {
|
||||
return (void 0) as unknown as T;
|
||||
return void 0 as unknown as T;
|
||||
}
|
||||
|
||||
apiResult =
|
||||
@@ -583,9 +584,12 @@ export class Api {
|
||||
*/
|
||||
public async setMilestoneForIssue(issue: Issue, milestoneId: number): Promise<Issue> {
|
||||
if (milestoneId === null) {
|
||||
return this.makeGitLabAPIRequest<Issue>(`projects/${issue.project_id}/issues/${issue.iid}?milestone_id=`, {
|
||||
method: 'PUT',
|
||||
});
|
||||
return this.makeGitLabAPIRequest<Issue>(
|
||||
`projects/${issue.project_id}/issues/${issue.iid}?milestone_id=`,
|
||||
{
|
||||
method: 'PUT',
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return this.makeGitLabAPIRequest<Issue>(
|
||||
|
||||
Reference in New Issue
Block a user