@itentialopensource/adapter-gitlab 0.13.2 → 0.13.3
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 +6 -0
- package/CHANGELOG.md +8 -0
- package/adapter.js +607 -521
- package/entities/projects/action.json +21 -0
- package/entities/projects/schema.json +1 -0
- package/package.json +1 -1
- package/pronghorn.json +54 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +7 -7
- package/test/unit/adapterTestUnit.js +63 -0
|
@@ -7959,6 +7959,27 @@
|
|
|
7959
7959
|
}
|
|
7960
7960
|
]
|
|
7961
7961
|
},
|
|
7962
|
+
{
|
|
7963
|
+
"name": "postV4ProjectsIdApproveMergeRequest",
|
|
7964
|
+
"protocol": "REST",
|
|
7965
|
+
"method": "POST",
|
|
7966
|
+
"entitypath": "{base_path}/{version}/projects/{pathv1}/merge_requests/{pathv2}/approve?{query}",
|
|
7967
|
+
"requestSchema": "schema.json",
|
|
7968
|
+
"responseSchema": "schema.json",
|
|
7969
|
+
"timeout": 0,
|
|
7970
|
+
"sendEmpty": false,
|
|
7971
|
+
"sendGetBody": false,
|
|
7972
|
+
"requestDatatype": "JSON",
|
|
7973
|
+
"responseDatatype": "JSON",
|
|
7974
|
+
"headers": {},
|
|
7975
|
+
"responseObjects": [
|
|
7976
|
+
{
|
|
7977
|
+
"type": "default",
|
|
7978
|
+
"key": "",
|
|
7979
|
+
"mockFile": ""
|
|
7980
|
+
}
|
|
7981
|
+
]
|
|
7982
|
+
},
|
|
7962
7983
|
{
|
|
7963
7984
|
"name": "getV4ProjectsIdMergeRequestsMergeRequestIdCommits",
|
|
7964
7985
|
"protocol": "REST",
|
|
@@ -389,6 +389,7 @@
|
|
|
389
389
|
"getV4ProjectsIdMergeRequestsMergeRequestIdClosesIssues",
|
|
390
390
|
"getV4ProjectsIdMergeRequestsMergeRequestIdComments",
|
|
391
391
|
"postV4ProjectsIdMergeRequestsMergeRequestIdComments",
|
|
392
|
+
"postV4ProjectsIdApproveMergeRequest",
|
|
392
393
|
"getV4ProjectsIdMergeRequestsMergeRequestIdCommits",
|
|
393
394
|
"putV4ProjectsIdMergeRequestsMergeRequestIdMerge",
|
|
394
395
|
"getV4ProjectsIdMergeRequestsMergeRequestIdNotesNoteIdAwardEmoji",
|
package/package.json
CHANGED
package/pronghorn.json
CHANGED
|
@@ -23121,6 +23121,60 @@
|
|
|
23121
23121
|
},
|
|
23122
23122
|
"task": true
|
|
23123
23123
|
},
|
|
23124
|
+
{
|
|
23125
|
+
"name": "postV4ProjectsIdApproveMergeRequest",
|
|
23126
|
+
"summary": "Post a comment to a merge request",
|
|
23127
|
+
"description": "Duplicate. DEPRECATED and WILL BE REMOVED in 9.0",
|
|
23128
|
+
"input": [
|
|
23129
|
+
{
|
|
23130
|
+
"name": "id",
|
|
23131
|
+
"type": "string",
|
|
23132
|
+
"info": "The ID of a project",
|
|
23133
|
+
"required": true,
|
|
23134
|
+
"schema": {
|
|
23135
|
+
"title": "id",
|
|
23136
|
+
"type": "string"
|
|
23137
|
+
}
|
|
23138
|
+
},
|
|
23139
|
+
{
|
|
23140
|
+
"name": "mergeRequestIid",
|
|
23141
|
+
"type": "number",
|
|
23142
|
+
"info": "The internal ID of the merge request",
|
|
23143
|
+
"required": true,
|
|
23144
|
+
"schema": {
|
|
23145
|
+
"title": "mergeRequestIid",
|
|
23146
|
+
"type": "number"
|
|
23147
|
+
}
|
|
23148
|
+
},
|
|
23149
|
+
{
|
|
23150
|
+
"name": "body",
|
|
23151
|
+
"type": "object",
|
|
23152
|
+
"info": "",
|
|
23153
|
+
"required": true,
|
|
23154
|
+
"schema": {
|
|
23155
|
+
"title": "body",
|
|
23156
|
+
"type": "object"
|
|
23157
|
+
}
|
|
23158
|
+
}
|
|
23159
|
+
],
|
|
23160
|
+
"output": {
|
|
23161
|
+
"name": "result",
|
|
23162
|
+
"type": "object",
|
|
23163
|
+
"description": "A JSON Object containing status, code and the result",
|
|
23164
|
+
"schema": {
|
|
23165
|
+
"title": "result",
|
|
23166
|
+
"type": "object"
|
|
23167
|
+
}
|
|
23168
|
+
},
|
|
23169
|
+
"roles": [
|
|
23170
|
+
"admin"
|
|
23171
|
+
],
|
|
23172
|
+
"route": {
|
|
23173
|
+
"verb": "POST",
|
|
23174
|
+
"path": "/postV4ProjectsIdApproveMergeRequest"
|
|
23175
|
+
},
|
|
23176
|
+
"task": true
|
|
23177
|
+
},
|
|
23124
23178
|
{
|
|
23125
23179
|
"name": "getV4ProjectsIdMergeRequestsMergeRequestIdCommits",
|
|
23126
23180
|
"summary": "Get the commits of a merge request",
|
|
Binary file
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.13.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.13.2",
|
|
3
|
+
"configLines": 28647,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
9
|
-
"wfTasks":
|
|
5
|
+
"codeLines": 45130,
|
|
6
|
+
"testLines": 42559,
|
|
7
|
+
"testCases": 2259,
|
|
8
|
+
"totalCodeLines": 89472,
|
|
9
|
+
"wfTasks": 571
|
|
10
10
|
}
|
|
@@ -22433,6 +22433,69 @@ describe('[unit] GitLab Adapter Test', () => {
|
|
|
22433
22433
|
}).timeout(attemptTimeout);
|
|
22434
22434
|
});
|
|
22435
22435
|
|
|
22436
|
+
describe('#postV4ProjectsIdApproveMergeRequest - errors', () => {
|
|
22437
|
+
it('should have a postV4ProjectsIdApproveMergeRequest function', (done) => {
|
|
22438
|
+
try {
|
|
22439
|
+
assert.equal(true, typeof a.postV4ProjectsIdApproveMergeRequest === 'function');
|
|
22440
|
+
done();
|
|
22441
|
+
} catch (error) {
|
|
22442
|
+
log.error(`Test Failure: ${error}`);
|
|
22443
|
+
done(error);
|
|
22444
|
+
}
|
|
22445
|
+
}).timeout(attemptTimeout);
|
|
22446
|
+
it('should error if - missing id', (done) => {
|
|
22447
|
+
try {
|
|
22448
|
+
a.postV4ProjectsIdApproveMergeRequest(null, null, null, (data, error) => {
|
|
22449
|
+
try {
|
|
22450
|
+
const displayE = 'id is required';
|
|
22451
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-gitlab-adapter-postV4ProjectsIdApproveMergeRequest', displayE);
|
|
22452
|
+
done();
|
|
22453
|
+
} catch (err) {
|
|
22454
|
+
log.error(`Test Failure: ${err}`);
|
|
22455
|
+
done(err);
|
|
22456
|
+
}
|
|
22457
|
+
});
|
|
22458
|
+
} catch (error) {
|
|
22459
|
+
log.error(`Adapter Exception: ${error}`);
|
|
22460
|
+
done(error);
|
|
22461
|
+
}
|
|
22462
|
+
}).timeout(attemptTimeout);
|
|
22463
|
+
it('should error if - missing mergeRequestIid', (done) => {
|
|
22464
|
+
try {
|
|
22465
|
+
a.postV4ProjectsIdApproveMergeRequest('fakeparam', null, null, (data, error) => {
|
|
22466
|
+
try {
|
|
22467
|
+
const displayE = 'mergeRequestIid is required';
|
|
22468
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-gitlab-adapter-postV4ProjectsIdApproveMergeRequest', displayE);
|
|
22469
|
+
done();
|
|
22470
|
+
} catch (err) {
|
|
22471
|
+
log.error(`Test Failure: ${err}`);
|
|
22472
|
+
done(err);
|
|
22473
|
+
}
|
|
22474
|
+
});
|
|
22475
|
+
} catch (error) {
|
|
22476
|
+
log.error(`Adapter Exception: ${error}`);
|
|
22477
|
+
done(error);
|
|
22478
|
+
}
|
|
22479
|
+
}).timeout(attemptTimeout);
|
|
22480
|
+
it('should error if - missing body', (done) => {
|
|
22481
|
+
try {
|
|
22482
|
+
a.postV4ProjectsIdApproveMergeRequest('fakeparam', 'fakeparam', null, (data, error) => {
|
|
22483
|
+
try {
|
|
22484
|
+
const displayE = 'body is required';
|
|
22485
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-gitlab-adapter-postV4ProjectsIdApproveMergeRequest', displayE);
|
|
22486
|
+
done();
|
|
22487
|
+
} catch (err) {
|
|
22488
|
+
log.error(`Test Failure: ${err}`);
|
|
22489
|
+
done(err);
|
|
22490
|
+
}
|
|
22491
|
+
});
|
|
22492
|
+
} catch (error) {
|
|
22493
|
+
log.error(`Adapter Exception: ${error}`);
|
|
22494
|
+
done(error);
|
|
22495
|
+
}
|
|
22496
|
+
}).timeout(attemptTimeout);
|
|
22497
|
+
});
|
|
22498
|
+
|
|
22436
22499
|
describe('#getV4ProjectsIdMergeRequestsMergeRequestIdCommits - errors', () => {
|
|
22437
22500
|
it('should have a getV4ProjectsIdMergeRequestsMergeRequestIdCommits function', (done) => {
|
|
22438
22501
|
try {
|