@itentialopensource/adapter-gitlab 0.10.2 → 0.12.0
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/CALLS.md +10 -10
- package/CHANGELOG.md +16 -0
- package/metadata.json +1 -1
- package/package.json +3 -3
- package/propertiesSchema.json +10 -1
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +2 -2
- package/report/updateReport1698421417178.json +120 -0
- package/utils/methodDocumentor.js +16 -3
package/CALLS.md
CHANGED
|
@@ -221,7 +221,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
221
221
|
<td style="padding:15px">Yes</td>
|
|
222
222
|
</tr>
|
|
223
223
|
<tr>
|
|
224
|
-
<td style="padding:15px">getV4Groups(statistics, allAvailable, search, orderBy = name, sort = asc, skipGroups, withCustomAttributes, owned, minAccessLevel, callback)</td>
|
|
224
|
+
<td style="padding:15px">getV4Groups(statistics, allAvailable, search, orderBy = 'name', sort = 'asc', skipGroups, withCustomAttributes, owned, minAccessLevel, callback)</td>
|
|
225
225
|
<td style="padding:15px">Get a groups list</td>
|
|
226
226
|
<td style="padding:15px">{base_path}/{version}/groups?{query}</td>
|
|
227
227
|
<td style="padding:15px">Yes</td>
|
|
@@ -275,7 +275,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
275
275
|
<td style="padding:15px">Yes</td>
|
|
276
276
|
</tr>
|
|
277
277
|
<tr>
|
|
278
|
-
<td style="padding:15px">getV4GroupsIdIssues(id, state = opened, labels, milestone, orderBy = created_at, sort = asc, page, perPage, callback)</td>
|
|
278
|
+
<td style="padding:15px">getV4GroupsIdIssues(id, state = 'opened', labels, milestone, orderBy = 'created_at', sort = 'asc', page, perPage, callback)</td>
|
|
279
279
|
<td style="padding:15px">Get a list of group issues</td>
|
|
280
280
|
<td style="padding:15px">{base_path}/{version}/groups/{pathv1}/issues?{query}</td>
|
|
281
281
|
<td style="padding:15px">Yes</td>
|
|
@@ -641,7 +641,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
641
641
|
<td style="padding:15px">Yes</td>
|
|
642
642
|
</tr>
|
|
643
643
|
<tr>
|
|
644
|
-
<td style="padding:15px">getV4Issues(state = opened, labels, milestone, orderBy = created_at, sort = asc, page, perPage, callback)</td>
|
|
644
|
+
<td style="padding:15px">getV4Issues(state = 'opened', labels, milestone, orderBy = 'created_at', sort = 'asc', page, perPage, callback)</td>
|
|
645
645
|
<td style="padding:15px">Get currently authenticated user's issues</td>
|
|
646
646
|
<td style="padding:15px">{base_path}/{version}/issues?{query}</td>
|
|
647
647
|
<td style="padding:15px">Yes</td>
|
|
@@ -671,7 +671,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
671
671
|
<td style="padding:15px">Yes</td>
|
|
672
672
|
</tr>
|
|
673
673
|
<tr>
|
|
674
|
-
<td style="padding:15px">getV4Projects(orderBy = id, sort = asc, archived, visibility = public, search, simple, owned, starred, membership, statistics, withCustomAttributes, withMergeRequestsEnabled, withProgrammingLanguage, wikiChecksumFailed, repositoryChecksumFailed, minAccessLevel, withIssuesEnabled, callback)</td>
|
|
674
|
+
<td style="padding:15px">getV4Projects(orderBy = 'id', sort = 'asc', archived, visibility = 'public', search, simple, owned, starred, membership, statistics, withCustomAttributes, withMergeRequestsEnabled, withProgrammingLanguage, wikiChecksumFailed, repositoryChecksumFailed, minAccessLevel, withIssuesEnabled, callback)</td>
|
|
675
675
|
<td style="padding:15px">Get a projects list for authenticated user</td>
|
|
676
676
|
<td style="padding:15px">{base_path}/{version}/projects?{query}</td>
|
|
677
677
|
<td style="padding:15px">Yes</td>
|
|
@@ -905,7 +905,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
905
905
|
<td style="padding:15px">Yes</td>
|
|
906
906
|
</tr>
|
|
907
907
|
<tr>
|
|
908
|
-
<td style="padding:15px">getV4ProjectsIdIssues(id, state = opened, iids, labels, milestone, orderBy = created_at, sort = asc, page, perPage, callback)</td>
|
|
908
|
+
<td style="padding:15px">getV4ProjectsIdIssues(id, state = 'opened', iids, labels, milestone, orderBy = 'created_at', sort = 'asc', page, perPage, callback)</td>
|
|
909
909
|
<td style="padding:15px">Get a list of project issues</td>
|
|
910
910
|
<td style="padding:15px">{base_path}/{version}/projects/{pathv1}/issues?{query}</td>
|
|
911
911
|
<td style="padding:15px">Yes</td>
|
|
@@ -971,7 +971,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
971
971
|
<td style="padding:15px">Yes</td>
|
|
972
972
|
</tr>
|
|
973
973
|
<tr>
|
|
974
|
-
<td style="padding:15px">getV4ProjectsIdMergeRequests(id, state = opened, orderBy = created_at, sort = asc, page, perPage, callback)</td>
|
|
974
|
+
<td style="padding:15px">getV4ProjectsIdMergeRequests(id, state = 'opened', orderBy = 'created_at', sort = 'asc', page, perPage, callback)</td>
|
|
975
975
|
<td style="padding:15px">List merge requests</td>
|
|
976
976
|
<td style="padding:15px">{base_path}/{version}/projects/{pathv1}/merge_requests?{query}</td>
|
|
977
977
|
<td style="padding:15px">Yes</td>
|
|
@@ -983,7 +983,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
983
983
|
<td style="padding:15px">Yes</td>
|
|
984
984
|
</tr>
|
|
985
985
|
<tr>
|
|
986
|
-
<td style="padding:15px">getV4ProjectsIdMilestones(id, state = active, page, perPage, callback)</td>
|
|
986
|
+
<td style="padding:15px">getV4ProjectsIdMilestones(id, state = 'active', page, perPage, callback)</td>
|
|
987
987
|
<td style="padding:15px">Get a list of project milestones</td>
|
|
988
988
|
<td style="padding:15px">{base_path}/{version}/projects/{pathv1}/milestones?{query}</td>
|
|
989
989
|
<td style="padding:15px">Yes</td>
|
|
@@ -1037,7 +1037,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
1037
1037
|
<td style="padding:15px">Yes</td>
|
|
1038
1038
|
</tr>
|
|
1039
1039
|
<tr>
|
|
1040
|
-
<td style="padding:15px">getV4ProjectsIdPipelines(id, page, perPage, scope = running, callback)</td>
|
|
1040
|
+
<td style="padding:15px">getV4ProjectsIdPipelines(id, page, perPage, scope = 'running', callback)</td>
|
|
1041
1041
|
<td style="padding:15px">Get all Pipelines of the project</td>
|
|
1042
1042
|
<td style="padding:15px">{base_path}/{version}/projects/{pathv1}/pipelines?{query}</td>
|
|
1043
1043
|
<td style="padding:15px">Yes</td>
|
|
@@ -1217,7 +1217,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
1217
1217
|
<td style="padding:15px">Yes</td>
|
|
1218
1218
|
</tr>
|
|
1219
1219
|
<tr>
|
|
1220
|
-
<td style="padding:15px">getV4ProjectsIdRunners(id, scope = active, status, tagList, callback)</td>
|
|
1220
|
+
<td style="padding:15px">getV4ProjectsIdRunners(id, scope = 'active', status, tagList, callback)</td>
|
|
1221
1221
|
<td style="padding:15px">Get runners available for project</td>
|
|
1222
1222
|
<td style="padding:15px">{base_path}/{version}/projects/{pathv1}/runners?{query}</td>
|
|
1223
1223
|
<td style="padding:15px">Yes</td>
|
|
@@ -3065,7 +3065,7 @@ Specific adapter calls are built based on the API of the GitLab. The Adapter Bui
|
|
|
3065
3065
|
<td style="padding:15px">Yes</td>
|
|
3066
3066
|
</tr>
|
|
3067
3067
|
<tr>
|
|
3068
|
-
<td style="padding:15px">getV4Runners(scope = active, status, tagList, callback)</td>
|
|
3068
|
+
<td style="padding:15px">getV4Runners(scope = 'active', status, tagList, callback)</td>
|
|
3069
3069
|
<td style="padding:15px">Get runners available for user</td>
|
|
3070
3070
|
<td style="padding:15px">{base_path}/{version}/runners?{query}</td>
|
|
3071
3071
|
<td style="padding:15px">Yes</td>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 0.12.0 [12-06-2023]
|
|
3
|
+
|
|
4
|
+
* More migration changes
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!19
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 0.11.0 [11-07-2023]
|
|
11
|
+
|
|
12
|
+
* More migration changes
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapters/devops-netops/adapter-gitlab!19
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 0.10.2 [10-19-2023]
|
|
3
19
|
|
|
4
20
|
* more meta changes
|
package/metadata.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"documentation": {
|
|
38
38
|
"storeLink": "",
|
|
39
39
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-gitlab",
|
|
40
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab
|
|
40
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab",
|
|
41
41
|
"docLink": "https://docs.itential.com/opensource/docs/gitlab",
|
|
42
42
|
"demoLinks": [
|
|
43
43
|
"https://www.itential.com/blog/company/hybrid-cloud-automation/how-netdevops-teams-can-rapidly-build-design-network-automations/",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-gitlab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: gitlab.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"systemName": "Gitlab",
|
|
7
7
|
"wizardVersion": "2.44.7",
|
|
8
|
-
"engineVersion": "1.67.
|
|
8
|
+
"engineVersion": "1.67.10",
|
|
9
9
|
"adapterType": "http",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"author": "Itential",
|
|
56
56
|
"homepage": "https://gitlab.com/itentialopensource/adapters/devops-netops/adapter-gitlab#readme",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@itentialopensource/adapter-utils": "^5.
|
|
58
|
+
"@itentialopensource/adapter-utils": "^5.3.2",
|
|
59
59
|
"acorn": "^8.10.0",
|
|
60
60
|
"ajv": "^8.12.0",
|
|
61
61
|
"axios": "^1.4.0",
|
package/propertiesSchema.json
CHANGED
|
@@ -109,6 +109,14 @@
|
|
|
109
109
|
},
|
|
110
110
|
"cache": {
|
|
111
111
|
"$ref": "#/definitions/cache"
|
|
112
|
+
},
|
|
113
|
+
"service": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
116
|
+
"examples": [
|
|
117
|
+
"ec2",
|
|
118
|
+
"route53"
|
|
119
|
+
]
|
|
112
120
|
}
|
|
113
121
|
},
|
|
114
122
|
"required": [
|
|
@@ -131,7 +139,8 @@
|
|
|
131
139
|
"jwt_token",
|
|
132
140
|
"request_token",
|
|
133
141
|
"no_authentication",
|
|
134
|
-
"multi_step_authentication"
|
|
142
|
+
"multi_step_authentication",
|
|
143
|
+
"aws_authentication"
|
|
135
144
|
]
|
|
136
145
|
},
|
|
137
146
|
"username": {
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errors": [],
|
|
3
|
+
"statistics": [
|
|
4
|
+
{
|
|
5
|
+
"owner": "errorJson",
|
|
6
|
+
"description": "New adapter errors available for use",
|
|
7
|
+
"value": 0
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"owner": "errorJson",
|
|
11
|
+
"description": "Adapter errors no longer available for use",
|
|
12
|
+
"value": 0
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"owner": "errorJson",
|
|
16
|
+
"description": "Adapter errors that have been updated (e.g. recommendation changes)",
|
|
17
|
+
"value": 31
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"owner": "packageJson",
|
|
21
|
+
"description": "Number of production dependencies",
|
|
22
|
+
"value": 17
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"owner": "packageJson",
|
|
26
|
+
"description": "Number of development dependencies",
|
|
27
|
+
"value": 6
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"owner": "packageJson",
|
|
31
|
+
"description": "Number of npm scripts",
|
|
32
|
+
"value": 22
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"owner": "packageJson",
|
|
36
|
+
"description": "Runtime Library dependency",
|
|
37
|
+
"value": "^5.3.0"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"owner": "propertiesSchemaJson",
|
|
41
|
+
"description": "Adapter properties defined in the propertiesSchema file",
|
|
42
|
+
"value": 77
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"owner": "markdown",
|
|
46
|
+
"description": "Number of lines in the README.md",
|
|
47
|
+
"value": 347
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"owner": "markdown",
|
|
51
|
+
"description": "Number of lines in the SUMMARY.md",
|
|
52
|
+
"value": 9
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"owner": "markdown",
|
|
56
|
+
"description": "Number of lines in the PROPERTIES.md",
|
|
57
|
+
"value": 642
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"owner": "markdown",
|
|
61
|
+
"description": "Number of lines in the TROUBLESHOOT.md",
|
|
62
|
+
"value": 48
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"owner": "markdown",
|
|
66
|
+
"description": "Number of lines in the ENHANCE.md",
|
|
67
|
+
"value": 70
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"owner": "markdown",
|
|
71
|
+
"description": "Number of lines in the BROKER.md",
|
|
72
|
+
"value": 70
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"owner": "unitTestJS",
|
|
76
|
+
"description": "Number of lines of code in unit tests",
|
|
77
|
+
"value": 25322
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 1629
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 15922
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 556
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"owner": "staticFile",
|
|
96
|
+
"description": "Number of lines of code in adapterBase.js",
|
|
97
|
+
"value": 1453
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"owner": "staticFile",
|
|
101
|
+
"description": "Number of static files added",
|
|
102
|
+
"value": 36
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"owner": "Overall",
|
|
106
|
+
"description": "Total lines of Code",
|
|
107
|
+
"value": 42697
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 2185
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -77,6 +77,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
77
77
|
// parsing the file to get the function and class declarations.
|
|
78
78
|
const aFileFuncArgs = acorn.parse(aFile, { ecmaVersion: 2020 });
|
|
79
79
|
|
|
80
|
+
let callName = 'identifyRequest';
|
|
80
81
|
// Looping through all the declarations parsed:
|
|
81
82
|
aFileFuncArgs.body.forEach((e) => {
|
|
82
83
|
// Getting only the class declaration as it has our required functions.
|
|
@@ -89,8 +90,10 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
89
90
|
method.value.params.forEach((param) => {
|
|
90
91
|
if (param.type === 'Identifier') {
|
|
91
92
|
funcArgs.push(param.name);
|
|
93
|
+
} else if (param.type === 'RestElement') {
|
|
94
|
+
funcArgs.push(`...${param.argument.name}`);
|
|
92
95
|
} else {
|
|
93
|
-
const args = `${param.left.name} = ${param.right.
|
|
96
|
+
const args = `${param.left.name} = ${param.right.raw}`;
|
|
94
97
|
funcArgs.push(args);
|
|
95
98
|
}
|
|
96
99
|
});
|
|
@@ -102,7 +105,7 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
102
105
|
});
|
|
103
106
|
const requests = [];
|
|
104
107
|
for (let i = 0; i < callList.length; i += 1) {
|
|
105
|
-
if (callList[i].callee.property && callList[i].callee.property.name ===
|
|
108
|
+
if (callList[i].callee.property && callList[i].callee.property.name === callName) {
|
|
106
109
|
requests.push(callList[i]);
|
|
107
110
|
}
|
|
108
111
|
}
|
|
@@ -114,7 +117,16 @@ function readFileUsingLib(filename, descriptionObj, workflowObj, functionList) {
|
|
|
114
117
|
const entity = expr.arguments[0].value;
|
|
115
118
|
const actionName = expr.arguments[1].value;
|
|
116
119
|
if (expr !== undefined && (expr.arguments[0].type !== 'Literal' || expr.arguments[1].type !== 'Literal')) {
|
|
117
|
-
|
|
120
|
+
const param1 = method.value.params[0];
|
|
121
|
+
const param2 = method.value.params[1];
|
|
122
|
+
if (param1.type !== 'Identifier' || param2.type !== 'Identifier'
|
|
123
|
+
|| expr.arguments[0].type !== 'Identifier' || expr.arguments[1].type !== 'Identifier'
|
|
124
|
+
|| param1.name !== expr.arguments[0].name || param2.name !== expr.arguments[1].name) {
|
|
125
|
+
throw new Error(`identifyRequest proxy method ${funcName} unknown format`);
|
|
126
|
+
} else if (callName !== 'identifyRequest') {
|
|
127
|
+
throw new Error(`MethodDocumentor not yet programmed to handle multiple helper methods: 1) ${callName}, 2) ${funcName}`);
|
|
128
|
+
}
|
|
129
|
+
callName = funcName;
|
|
118
130
|
}
|
|
119
131
|
const entityPath = getPathFromEntity(entity, actionName);
|
|
120
132
|
|
|
@@ -197,6 +209,7 @@ function readMDFile(filename, functionList) {
|
|
|
197
209
|
// Creating the tags for each method to be appended to the file.
|
|
198
210
|
const tdBeginTag = ' <td style="padding:15px">';
|
|
199
211
|
const tdEndTag = '</td>';
|
|
212
|
+
|
|
200
213
|
functionList.forEach((func) => {
|
|
201
214
|
const signCommand = `${tdBeginTag}${func.method_signature}${tdEndTag}`;
|
|
202
215
|
const descCommand = `${tdBeginTag}${func.description}${tdEndTag}`;
|