@venturialstd/gitlab 0.0.3 → 0.0.4
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.
- package/dist/interfaces/gitlab-project.interface.d.ts +79 -0
- package/dist/interfaces/gitlab-project.interface.d.ts.map +1 -0
- package/dist/interfaces/gitlab-project.interface.js +3 -0
- package/dist/interfaces/gitlab-project.interface.js.map +1 -0
- package/dist/services/gitlab-project.service.d.ts +5 -4
- package/dist/services/gitlab-project.service.d.ts.map +1 -1
- package/dist/services/gitlab-project.service.js +1 -1
- package/dist/services/gitlab-project.service.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface GitlabUser {
|
|
2
|
+
id: number;
|
|
3
|
+
username: string;
|
|
4
|
+
public_email: string | null;
|
|
5
|
+
name: string;
|
|
6
|
+
state: string;
|
|
7
|
+
locked: boolean;
|
|
8
|
+
avatar_url: string;
|
|
9
|
+
web_url: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GitlabReferences {
|
|
12
|
+
short: string;
|
|
13
|
+
relative: string;
|
|
14
|
+
full: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GitlabTimeStats {
|
|
17
|
+
time_estimate: number;
|
|
18
|
+
total_time_spent: number;
|
|
19
|
+
human_time_estimate: string | null;
|
|
20
|
+
human_total_time_spent: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface GitlabTaskCompletionStatus {
|
|
23
|
+
count: number;
|
|
24
|
+
completed_count: number;
|
|
25
|
+
}
|
|
26
|
+
export interface GitlabMergeRequest {
|
|
27
|
+
id: number;
|
|
28
|
+
iid: number;
|
|
29
|
+
project_id: number;
|
|
30
|
+
title: string;
|
|
31
|
+
description: string;
|
|
32
|
+
state: string;
|
|
33
|
+
created_at: string;
|
|
34
|
+
updated_at: string;
|
|
35
|
+
merged_by: GitlabUser | null;
|
|
36
|
+
merge_user: GitlabUser | null;
|
|
37
|
+
merged_at: string | null;
|
|
38
|
+
closed_by: GitlabUser | null;
|
|
39
|
+
closed_at: string | null;
|
|
40
|
+
target_branch: string;
|
|
41
|
+
source_branch: string;
|
|
42
|
+
user_notes_count: number;
|
|
43
|
+
upvotes: number;
|
|
44
|
+
downvotes: number;
|
|
45
|
+
author: GitlabUser;
|
|
46
|
+
assignees: GitlabUser[];
|
|
47
|
+
assignee: GitlabUser | null;
|
|
48
|
+
reviewers: GitlabUser[];
|
|
49
|
+
source_project_id: number;
|
|
50
|
+
target_project_id: number;
|
|
51
|
+
labels: string[];
|
|
52
|
+
draft: boolean;
|
|
53
|
+
imported: boolean;
|
|
54
|
+
imported_from: string;
|
|
55
|
+
work_in_progress: boolean;
|
|
56
|
+
milestone: any | null;
|
|
57
|
+
merge_when_pipeline_succeeds: boolean;
|
|
58
|
+
merge_status: string;
|
|
59
|
+
detailed_merge_status: string;
|
|
60
|
+
merge_after: string | null;
|
|
61
|
+
sha: string;
|
|
62
|
+
merge_commit_sha: string | null;
|
|
63
|
+
squash_commit_sha: string | null;
|
|
64
|
+
discussion_locked: boolean | null;
|
|
65
|
+
should_remove_source_branch: boolean | null;
|
|
66
|
+
force_remove_source_branch: boolean;
|
|
67
|
+
prepared_at: string;
|
|
68
|
+
reference: string;
|
|
69
|
+
references: GitlabReferences;
|
|
70
|
+
web_url: string;
|
|
71
|
+
time_stats: GitlabTimeStats;
|
|
72
|
+
squash: boolean;
|
|
73
|
+
squash_on_merge: boolean;
|
|
74
|
+
task_completion_status: GitlabTaskCompletionStatus;
|
|
75
|
+
has_conflicts: boolean;
|
|
76
|
+
blocking_discussions_resolved: boolean;
|
|
77
|
+
approvals_before_merge: number | null;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=gitlab-project.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab-project.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/gitlab-project.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IAC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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab-project.interface.js","sourceRoot":"","sources":["../../src/interfaces/gitlab-project.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { GitlabClient } from
|
|
1
|
+
import { GitlabClient } from "../client/gitlab.client";
|
|
2
|
+
import { GitlabMergeRequest } from "../interfaces/gitlab-project.interface";
|
|
2
3
|
export declare class GitlabProjectService {
|
|
3
4
|
private readonly client;
|
|
4
5
|
constructor(client: GitlabClient);
|
|
5
|
-
getMergeRequests(projectId: string): Promise<
|
|
6
|
-
getMergeRequestDiff(projectId: string, mrId: string): Promise<
|
|
7
|
-
getFile(projectId: string, filePath: string, ref?: string): Promise<
|
|
6
|
+
getMergeRequests(projectId: string): Promise<GitlabMergeRequest[]>;
|
|
7
|
+
getMergeRequestDiff(projectId: string, mrId: string): Promise<string>;
|
|
8
|
+
getFile(projectId: string, filePath: string, ref?: string): Promise<string>;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=gitlab-project.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlab-project.service.d.ts","sourceRoot":"","sources":["../../src/services/gitlab-project.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"gitlab-project.service.d.ts","sourceRoot":"","sources":["../../src/services/gitlab-project.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAE5E,qBACa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,YAAY;IAEjD,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAOlE,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAOrE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAO5E"}
|
|
@@ -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
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlab-project.service.js","sourceRoot":"","sources":["../../src/services/gitlab-project.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAG5C,gFAA2E;
|
|
1
|
+
{"version":3,"file":"gitlab-project.service.js","sourceRoot":"","sources":["../../src/services/gitlab-project.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAG5C,gFAA2E;IAI9D,oBAAoB;4BADhC,IAAA,mBAAU,GAAE;;;;;;;;YACb,6KAwBC;;;YAxBY,uDAAoB;;QACF,MAAM;QAAnC,YAA6B,MAAoB;YAApB,WAAM,GAAN,MAAM,CAAc;QAAG,CAAC;QAErD,gBAAgB,CAAC,SAAiB;YAChC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,6CAAoB,CAAC,GAAG,EACxB,aAAa,SAAS,8BAA8B,CACrD,CAAC;QACJ,CAAC;QAED,mBAAmB,CAAC,SAAiB,EAAE,IAAY;YACjD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,6CAAoB,CAAC,GAAG,EACxB,aAAa,SAAS,mBAAmB,IAAI,YAAY,CAC1D,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,SAAiB,EAAE,QAAgB,EAAE,GAAG,GAAG,MAAM;YACvD,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,6CAAoB,CAAC,GAAG,EACxB,aAAa,SAAS,qBAAqB,OAAO,YAAY,GAAG,EAAE,CACpE,CAAC;QACJ,CAAC;;;;AAvBU,oDAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venturialstd/gitlab",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "GitLab API Venturial",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "tsc -p tsconfig.json",
|
|
16
|
-
"prepublishOnly": "npm run build"
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"release:patch": "npm run build && npm version patch --no-git-tag-version && npm publish"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"typescript": "^5.9.3"
|