@clickview/ship-it 0.0.5 → 0.0.6-rc.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/README.md
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
# Ship It
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
* NodeJS (and npm)
|
|
6
|
+
* Access to the ClickView organization on [npm](https://www.npmjs.com). You will need to add an npm auth token to a global or local `.npmrc` file
|
|
7
|
+
* Add the `Ship It` user as a `Developer` to each GitLab project you would like to manage using the Ship It CLI
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
git clone https://gitlab.cvinternal.net/front-end/ship-it.git
|
|
13
|
+
cd ship-it
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
After installation, you can run `npm run start -- help` for a list of Shit Commands.
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
The available commands are listed below. If you run into issues check that you have met all the [prerequisites](#prerequisites) first.
|
|
22
|
+
|
|
23
|
+
### Status
|
|
24
|
+
|
|
25
|
+
* Command: `npm run start -- status -p [projectId] -m [milestone]`
|
|
26
|
+
* Example: `npm run start -- status -p 887 -m T3`
|
|
27
|
+
|
|
28
|
+
Get the status of all MRs in a milestone. You can run this command at any time to check whether a project's miletone is ready for release.
|
|
29
|
+
|
|
30
|
+
You can find your numeric project id from your project page on GitLab.
|
|
31
|
+
|
|
32
|
+
|
|
@@ -55,6 +55,7 @@ var node_1 = require("@gitbeaker/node");
|
|
|
55
55
|
var types_1 = require("../../types");
|
|
56
56
|
var errors_1 = require("../../errors");
|
|
57
57
|
var GitLabMapper_1 = require("./GitLabMapper");
|
|
58
|
+
var GroupIds_1 = require("../../utils/GroupIds");
|
|
58
59
|
var GitLabApiClient = /** @class */ (function () {
|
|
59
60
|
function GitLabApiClient(config) {
|
|
60
61
|
this.config = config;
|
|
@@ -364,13 +365,19 @@ var GitLabApiClient = /** @class */ (function () {
|
|
|
364
365
|
};
|
|
365
366
|
GitLabApiClient.prototype.getMilestone = function (projectId, milestoneName) {
|
|
366
367
|
return __awaiter(this, void 0, void 0, function () {
|
|
367
|
-
var
|
|
368
|
+
var groupMilestones, milestone, projectMilestones;
|
|
368
369
|
return __generator(this, function (_a) {
|
|
369
370
|
switch (_a.label) {
|
|
370
|
-
case 0: return [4 /*yield*/, this.client.
|
|
371
|
+
case 0: return [4 /*yield*/, this.client.GroupMilestones.all(GroupIds_1.GroupIds.CLICKVIEW)];
|
|
371
372
|
case 1:
|
|
372
|
-
|
|
373
|
-
milestone =
|
|
373
|
+
groupMilestones = _a.sent();
|
|
374
|
+
milestone = groupMilestones.find(function (milestone) { return milestone.title === milestoneName; });
|
|
375
|
+
if (milestone)
|
|
376
|
+
return [2 /*return*/, GitLabMapper_1.GitLabMapper.milestone(milestone)];
|
|
377
|
+
return [4 /*yield*/, this.client.ProjectMilestones.all(projectId)];
|
|
378
|
+
case 2:
|
|
379
|
+
projectMilestones = _a.sent();
|
|
380
|
+
milestone = projectMilestones.find(function (milestone) { return milestone.title === milestoneName; });
|
|
374
381
|
if (!milestone)
|
|
375
382
|
return [2 /*return*/, null];
|
|
376
383
|
return [2 /*return*/, GitLabMapper_1.GitLabMapper.milestone(milestone)];
|