@venturialstd/gitlab 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { GitlabClient } from
|
|
2
|
-
import { GitlabMergeRequest } from
|
|
1
|
+
import { GitlabClient } from "../client/gitlab.client";
|
|
2
|
+
import { GitlabMergeRequest } from "../interfaces/gitlab-project.interface";
|
|
3
3
|
export declare class GitlabProjectService {
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: GitlabClient);
|
|
6
|
-
getMergeRequests(projectId:
|
|
7
|
-
getMergeRequestDiff(projectId:
|
|
8
|
-
getFile(projectId:
|
|
6
|
+
getMergeRequests(projectId: number): Promise<GitlabMergeRequest[]>;
|
|
7
|
+
getMergeRequestDiff(projectId: number, mrId: number): Promise<string>;
|
|
8
|
+
getFile(projectId: number, filePath: string, ref?: string): Promise<string>;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=gitlab-project.service.d.ts.map
|
|
@@ -61,7 +61,7 @@ let GitlabProjectService = (() => {
|
|
|
61
61
|
getMergeRequestDiff(projectId, mrId) {
|
|
62
62
|
return this.client.request(gitlab_client_constant_1.GITLAB_CLIENT_METHOD.GET, `/projects/${projectId}/merge_requests/${mrId}/raw_diffs`);
|
|
63
63
|
}
|
|
64
|
-
getFile(projectId, filePath, ref =
|
|
64
|
+
getFile(projectId, filePath, ref = "main") {
|
|
65
65
|
const encoded = encodeURIComponent(filePath);
|
|
66
66
|
return this.client.request(gitlab_client_constant_1.GITLAB_CLIENT_METHOD.GET, `/projects/${projectId}/repository/files/${encoded}/raw?ref=${ref}`);
|
|
67
67
|
}
|