@clickview/ship-it 0.0.34 → 0.0.35-dev.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.
Files changed (71) hide show
  1. package/lib/src/index.js +0 -0
  2. package/lib/src/services/GitLabService.js +14 -12
  3. package/lib/src/tasks/VersionTask.js +1 -1
  4. package/package.json +1 -1
  5. package/dist/F1/Analytics Web.md +0 -8
  6. package/dist/F1/AutoCaptions.md +0 -30
  7. package/dist/F1/Classroom.Api.md +0 -23
  8. package/dist/F1/ClickView Online.md +0 -17
  9. package/dist/F1/ClickView.Curator.md +0 -100
  10. package/dist/F1/ClickView.EmailService.md +0 -53
  11. package/dist/F1/ClickView.OnlineApi.md +0 -13
  12. package/dist/F1/Clients.md +0 -19
  13. package/dist/F1/Domain.Api.md +0 -23
  14. package/dist/F1/Exchange.Web.md +0 -8
  15. package/dist/F1/Image.Api.md +0 -8
  16. package/dist/F1/Integrations.Api.md +0 -23
  17. package/dist/F1/Krakend.md +0 -8
  18. package/dist/F1/Library Editor.md +0 -0
  19. package/dist/F1/Lite.md +0 -60
  20. package/dist/F1/Master.Api.md +0 -58
  21. package/dist/F1/Master.Auth.md +0 -22
  22. package/dist/F1/Objects.Api.md +0 -12
  23. package/dist/F1/Permissions.Api.md +0 -12
  24. package/dist/F1/RealtimeSalesforceSync.md +0 -14
  25. package/dist/F1/Release Notes.md +0 -990
  26. package/dist/F1/Search.Api.md +0 -12
  27. package/dist/F1/StreamableLearning.Web.md +0 -35
  28. package/dist/F1/Users.Api.md +0 -13
  29. package/dist/F1/VideoProcessorService.md +0 -23
  30. package/dist/F1/clickview.md +0 -321
  31. package/dist/F2/Analytics Web.md +0 -7
  32. package/dist/F2/Batch.Api.md +0 -27
  33. package/dist/F2/ClickView Online.md +0 -12
  34. package/dist/F2/ClickView.Curator.md +0 -166
  35. package/dist/F2/Clients.md +0 -14
  36. package/dist/F2/CurriculumIngestion.Api.md +0 -13
  37. package/dist/F2/Discover.Api.md +0 -64
  38. package/dist/F2/Domain.Api.md +0 -16
  39. package/dist/F2/Exchange.Web.md +0 -7
  40. package/dist/F2/Krakend.md +0 -12
  41. package/dist/F2/Library Editor.md +0 -11
  42. package/dist/F2/Lite.md +0 -30
  43. package/dist/F2/Objects.Api.md +0 -12
  44. package/dist/F2/Release Notes.md +0 -759
  45. package/dist/F2/Search.Api.md +0 -30
  46. package/dist/F2/Share.Api.md +0 -12
  47. package/dist/F2/StreamableLearning.Web.md +0 -14
  48. package/dist/F2/Subjects.API.md +0 -12
  49. package/dist/F2/Tv.Web.md +0 -8
  50. package/dist/F2/Users.Api.md +0 -21
  51. package/dist/F2/clickview.md +0 -200
  52. package/dist/F2/shortcode-api.md +0 -8
  53. package/dist/F3.1/Analytics Web.md +0 -8
  54. package/dist/F3.1/ClickView.Curator.md +0 -14
  55. package/dist/F3.1/Discover.Api.md +0 -14
  56. package/dist/F3.1/Domain.Api.md +0 -7
  57. package/dist/F3.1/Exchange.Web.md +0 -8
  58. package/dist/F3.1/Library Editor.md +0 -8
  59. package/dist/F3.1/Lite.md +0 -8
  60. package/dist/F3.1/Objects.Api.md +0 -7
  61. package/dist/F3.1/Release Notes.md +0 -207
  62. package/dist/F3.1/Search.Api.md +0 -14
  63. package/dist/F3.1/Share.Api.md +0 -10
  64. package/dist/F3.1/Subjects.API.md +0 -35
  65. package/dist/F3.1/VideoViews.Api.md +0 -7
  66. package/dist/F3.1/clickview.md +0 -28
  67. package/lib/src/commands/CreateTestingNotesCommand.js +0 -84
  68. package/lib/src/commands/StartConsumingProjectBuildsCommand.js +0 -76
  69. package/lib/src/tasks/CreateTestingNotesTask.js +0 -135
  70. package/lib/src/tasks/MergeMasterToDevTask.js +0 -147
  71. package/lib/src/tasks/StartConsumingProjectBuildsTask.js +0 -149
@@ -1,7 +0,0 @@
1
-
2
- # Code changes
3
- * Getting `maxItems` in group instead of one by one in recently viewed endpoint
4
-
5
-
6
- # Testing
7
-
@@ -1,28 +0,0 @@
1
-
2
- # Curator
3
-
4
- ## Customer changes
5
- * Fix dashboard created time.
6
-
7
- # Lite
8
-
9
- ## Customer changes
10
- - Related videos will no longer display, unless the user has come from: A playlist, A series or a dashboard.
11
- - Related videos will now only show 5 videos, with a chevron to be clicked to show 25.
12
- - Student feed will no longer show the activity status checkbox
13
- - Fix shared by me date not updating after direct sharing to previously shared recipient
14
-
15
- ## Code changes
16
- - Sending `allowSubstitute=true` as a query param when searching. This is so search can disable substitutes for places don't need it.
17
- - No longer polling for video progress if the visibility api says the document is hidden.
18
- - My Videos no longer fetches the category tree until a user moves a folder.
19
- - Update the braze-client package version
20
- * Fix the runtime error in the search page.
21
- * Only fetch the presentation when the slug is valid.
22
-
23
- # Testing
24
- - Fixes INBOX-6234
25
- * Fixes INBOX-6269
26
- - Fix https://my.trackjs.com/errors/filtered?hash=6082f23657b4a484
27
- - Fix https://my.trackjs.com/errors/filtered?hash=b5feeabaf3a19ac4
28
- * Fix https://my.trackjs.com/errors/filtered?hash=bc3ecc4d23b89d3c
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.CreateTestingNotesCommand = void 0;
52
- require("reflect-metadata");
53
- var inversify_1 = require("inversify");
54
- var types_1 = require("../types");
55
- var CreateTestingNotesCommand = /** @class */ (function () {
56
- function CreateTestingNotesCommand(validateDescriptionsTask, createTestingNotesTask) {
57
- this.validateDescriptionsTask = validateDescriptionsTask;
58
- this.createTestingNotesTask = createTestingNotesTask;
59
- }
60
- CreateTestingNotesCommand.prototype.run = function (options) {
61
- return __awaiter(this, void 0, void 0, function () {
62
- var cont;
63
- return __generator(this, function (_a) {
64
- switch (_a.label) {
65
- case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
66
- case 1:
67
- cont = _a.sent();
68
- if (!cont)
69
- return [2 /*return*/, false];
70
- return [4 /*yield*/, this.createTestingNotesTask.run(options)];
71
- case 2: return [2 /*return*/, _a.sent()];
72
- }
73
- });
74
- });
75
- };
76
- CreateTestingNotesCommand = __decorate([
77
- (0, inversify_1.injectable)(),
78
- __param(0, (0, inversify_1.inject)(types_1.TASKS.ValidateDescriptionsTask)),
79
- __param(1, (0, inversify_1.inject)(types_1.TASKS.CreateTestingNotesTask)),
80
- __metadata("design:paramtypes", [Object, Object])
81
- ], CreateTestingNotesCommand);
82
- return CreateTestingNotesCommand;
83
- }());
84
- exports.CreateTestingNotesCommand = CreateTestingNotesCommand;
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.StartConsumingProjectBuildsCommand = void 0;
52
- require("reflect-metadata");
53
- var inversify_1 = require("inversify");
54
- var types_1 = require("../types");
55
- var StartConsumingProjectBuildsCommand = /** @class */ (function () {
56
- function StartConsumingProjectBuildsCommand(startConsumingProjectBuildsTask) {
57
- this.startConsumingProjectBuildsTask = startConsumingProjectBuildsTask;
58
- }
59
- StartConsumingProjectBuildsCommand.prototype.run = function (options) {
60
- return __awaiter(this, void 0, void 0, function () {
61
- return __generator(this, function (_a) {
62
- switch (_a.label) {
63
- case 0: return [4 /*yield*/, this.startConsumingProjectBuildsTask.run(options)];
64
- case 1: return [2 /*return*/, _a.sent()];
65
- }
66
- });
67
- });
68
- };
69
- StartConsumingProjectBuildsCommand = __decorate([
70
- (0, inversify_1.injectable)(),
71
- __param(0, (0, inversify_1.inject)(types_1.TASKS.StartConsumingProjectBuildsTask)),
72
- __metadata("design:paramtypes", [Object])
73
- ], StartConsumingProjectBuildsCommand);
74
- return StartConsumingProjectBuildsCommand;
75
- }());
76
- exports.StartConsumingProjectBuildsCommand = StartConsumingProjectBuildsCommand;
@@ -1,135 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- var __importDefault = (this && this.__importDefault) || function (mod) {
51
- return (mod && mod.__esModule) ? mod : { "default": mod };
52
- };
53
- Object.defineProperty(exports, "__esModule", { value: true });
54
- exports.CreateTestingNotesTask = void 0;
55
- require("reflect-metadata");
56
- var inversify_1 = require("inversify");
57
- var path_1 = __importDefault(require("path"));
58
- var fs_extra_1 = __importDefault(require("fs-extra"));
59
- var types_1 = require("../types");
60
- var services_1 = require("../services");
61
- var utils_1 = require("../utils");
62
- var Csv_1 = require("../utils/Csv");
63
- var CreateTestingNotesTask = /** @class */ (function () {
64
- function CreateTestingNotesTask(service) {
65
- this.service = service;
66
- }
67
- CreateTestingNotesTask.prototype.run = function (options) {
68
- return __awaiter(this, void 0, void 0, function () {
69
- var projects, projectTestingNotes, _i, projects_1, project, description, _a, _b, mr, outputPath, error_1, csv;
70
- return __generator(this, function (_c) {
71
- switch (_c.label) {
72
- case 0:
73
- utils_1.Logger.logTask('Creating testing notes');
74
- return [4 /*yield*/, this.service.getProjects(options)];
75
- case 1:
76
- projects = _c.sent();
77
- projectTestingNotes = [];
78
- for (_i = 0, projects_1 = projects; _i < projects_1.length; _i++) {
79
- project = projects_1[_i];
80
- description = '';
81
- for (_a = 0, _b = project.mergeRequests; _a < _b.length; _a++) {
82
- mr = _b[_a];
83
- if (project.id.toString() === utils_1.ProjectIds.MONOREPO_PROJECT_ID) {
84
- description = utils_1.Descriptions.getMonorepoCombinedDescription([mr]);
85
- }
86
- else {
87
- description = utils_1.Descriptions.getCombinedDescription([mr]);
88
- }
89
- projectTestingNotes.push({
90
- projectName: project.title,
91
- mrTitle: mr.title,
92
- mrAuthor: mr.author,
93
- mrAssignee: mr.assignee,
94
- mrUrl: mr.url,
95
- notes: utils_1.Descriptions.bumpHeadings(description).trim()
96
- });
97
- }
98
- }
99
- outputPath = path_1.default.resolve("./dist/".concat(options.milestone));
100
- _c.label = 2;
101
- case 2:
102
- _c.trys.push([2, 4, , 6]);
103
- return [4 /*yield*/, fs_extra_1.default.access(outputPath)];
104
- case 3:
105
- _c.sent();
106
- return [3 /*break*/, 6];
107
- case 4:
108
- error_1 = _c.sent();
109
- return [4 /*yield*/, fs_extra_1.default.ensureDir(outputPath)];
110
- case 5:
111
- _c.sent();
112
- return [3 /*break*/, 6];
113
- case 6:
114
- csv = new Csv_1.CsvFile({
115
- headers: ['projectName', 'mrTitle', 'mrAuthor', 'mrAssignee', 'mrUrl', 'notes'],
116
- path: path_1.default.resolve(outputPath, "".concat(options.milestone, " Testing Notes.csv")),
117
- });
118
- return [4 /*yield*/, csv.create(projectTestingNotes)];
119
- case 7:
120
- _c.sent();
121
- utils_1.Logger.logMessage('Created file');
122
- utils_1.Logger.logInfo("".concat(path_1.default.resolve(outputPath), "\n"));
123
- return [2 /*return*/, true];
124
- }
125
- });
126
- });
127
- };
128
- CreateTestingNotesTask = __decorate([
129
- (0, inversify_1.injectable)(),
130
- __param(0, (0, inversify_1.inject)(types_1.SERVICES.GitLabService)),
131
- __metadata("design:paramtypes", [services_1.GitLabService])
132
- ], CreateTestingNotesTask);
133
- return CreateTestingNotesTask;
134
- }());
135
- exports.CreateTestingNotesTask = CreateTestingNotesTask;
@@ -1,147 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.MergeMasterToDevTask = void 0;
52
- require("reflect-metadata");
53
- var inversify_1 = require("inversify");
54
- var Logger_1 = require("../utils/Logger");
55
- var types_1 = require("../types");
56
- var services_1 = require("../services");
57
- var util_1 = require("util");
58
- var MergeMasterToDevTask = /** @class */ (function () {
59
- function MergeMasterToDevTask(service, slackService) {
60
- this.service = service;
61
- this.slackService = slackService;
62
- }
63
- MergeMasterToDevTask.prototype.run = function (options) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- var projects, delay, logMessageSlack, _i, projects_1, project, _a, branchName, nextVersion, mergeRequest, updatedMergeRequest, acceptMr, threadLabel, statusCleanMessage;
66
- return __generator(this, function (_b) {
67
- switch (_b.label) {
68
- case 0:
69
- Logger_1.Logger.logTask('Merging Master Into Dev');
70
- return [4 /*yield*/, this.service.getProjects(options)];
71
- case 1:
72
- projects = _b.sent();
73
- Logger_1.Logger.logMessage(projects.length);
74
- delay = (0, util_1.promisify)(setTimeout);
75
- logMessageSlack = '';
76
- _i = 0, projects_1 = projects;
77
- _b.label = 2;
78
- case 2:
79
- if (!(_i < projects_1.length)) return [3 /*break*/, 12];
80
- project = projects_1[_i];
81
- return [4 /*yield*/, this.service.getNextBranchInfo(project.id, options.version)];
82
- case 3:
83
- _a = _b.sent(), branchName = _a.branchName, nextVersion = _a.nextVersion;
84
- Logger_1.Logger.logMessage(branchName);
85
- return [4 /*yield*/, this.service.createMergeRequest(project.id, 'varun-ship-it', 'varun_qa_test', 'Merge master into dev testing', 'Merging master into dev', options.milestone)];
86
- case 4:
87
- mergeRequest = _b.sent();
88
- Logger_1.Logger.logMessage(mergeRequest.url);
89
- Logger_1.Logger.logMessage(project.title);
90
- Logger_1.Logger.logMessage(mergeRequest.hasConflicts);
91
- Logger_1.Logger.logMessage(mergeRequest.status);
92
- return [4 /*yield*/, delay(5000)];
93
- case 5:
94
- _b.sent();
95
- return [4 /*yield*/, this.service.getMergeRequestById(project.id, mergeRequest.iid)];
96
- case 6:
97
- updatedMergeRequest = _b.sent();
98
- if (!updatedMergeRequest) return [3 /*break*/, 10];
99
- Logger_1.Logger.logMessage(updatedMergeRequest.hasConflicts);
100
- if (!updatedMergeRequest.hasConflicts) return [3 /*break*/, 7];
101
- Logger_1.Logger.logMessage("Sack, send slack!");
102
- Logger_1.Logger.logError("[".concat(project.title, "]: Requires cherrypicking. Merge conflicts found when trying to merge master into dev."));
103
- logMessageSlack += "[".concat(project.title, "]: Requires cherrypicking. Requires cherrypicking. Merge conflicts found when trying to merge master into dev.\n");
104
- logMessageSlack += " - ".concat(updatedMergeRequest.url, "\n");
105
- return [3 /*break*/, 9];
106
- case 7:
107
- Logger_1.Logger.logMessage("Mergeing MR!");
108
- return [4 /*yield*/, this.service.AcceptMergeRequest(project.id, mergeRequest.iid)];
109
- case 8:
110
- acceptMr = _b.sent();
111
- Logger_1.Logger.logMessage(acceptMr.status);
112
- _b.label = 9;
113
- case 9: return [3 /*break*/, 11];
114
- case 10:
115
- Logger_1.Logger.logMessage("Could not find merge request!");
116
- _b.label = 11;
117
- case 11:
118
- _i++;
119
- return [3 /*break*/, 2];
120
- case 12:
121
- if (!(options.slackNotifier && logMessageSlack !== '')) return [3 /*break*/, 14];
122
- threadLabel = "".concat(options.milestone, " merge conflicts found when merging master into dev.");
123
- statusCleanMessage = 'No projects require cherrypicking';
124
- return [4 /*yield*/, this.slackService.sendSlackStatusMessage({
125
- emailList: [],
126
- threadLabel: threadLabel,
127
- statusMessage: logMessageSlack,
128
- statusCleanMessage: statusCleanMessage
129
- })];
130
- case 13:
131
- _b.sent();
132
- _b.label = 14;
133
- case 14: return [2 /*return*/, true];
134
- }
135
- });
136
- });
137
- };
138
- MergeMasterToDevTask = __decorate([
139
- (0, inversify_1.injectable)(),
140
- __param(0, (0, inversify_1.inject)(types_1.SERVICES.GitLabService)),
141
- __param(1, (0, inversify_1.inject)(types_1.SERVICES.SlackService)),
142
- __metadata("design:paramtypes", [services_1.GitLabService,
143
- services_1.SlackService])
144
- ], MergeMasterToDevTask);
145
- return MergeMasterToDevTask;
146
- }());
147
- exports.MergeMasterToDevTask = MergeMasterToDevTask;
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __generator = (this && this.__generator) || function (thisArg, body) {
24
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
- function verb(n) { return function (v) { return step([n, v]); }; }
27
- function step(op) {
28
- if (f) throw new TypeError("Generator is already executing.");
29
- while (_) try {
30
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
- if (y = 0, t) op = [op[0] & 2, t.value];
32
- switch (op[0]) {
33
- case 0: case 1: t = op; break;
34
- case 4: _.label++; return { value: op[1], done: false };
35
- case 5: _.label++; y = op[1]; op = [0]; continue;
36
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
- default:
38
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
- if (t[2]) _.ops.pop();
43
- _.trys.pop(); continue;
44
- }
45
- op = body.call(thisArg, _);
46
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
- }
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.StartConsumingProjectBuildsTask = void 0;
52
- require("reflect-metadata");
53
- var inversify_1 = require("inversify");
54
- var utils_1 = require("../utils");
55
- var services_1 = require("../services");
56
- var types_1 = require("../types");
57
- var TeamCityBuildIDs_1 = require("../constants/TeamCityBuildIDs");
58
- var StartConsumingProjectBuildsTask = /** @class */ (function () {
59
- function StartConsumingProjectBuildsTask(teamCityService, gitLabService) {
60
- this.teamCityService = teamCityService;
61
- this.gitLabService = gitLabService;
62
- }
63
- StartConsumingProjectBuildsTask.prototype.run = function (_options) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- var milestone, options, projects, consumingProjects, projectBuildMap, _i, consumingProjects_1, project, branchName, buildId, build, totalBuilds, project;
66
- return __generator(this, function (_a) {
67
- switch (_a.label) {
68
- case 0:
69
- utils_1.Logger.logTask('Starting builds for consuming projects in TeamCity');
70
- if (!_options.monorepoBranchName && !_options.milestone) {
71
- utils_1.Logger.logError('Please provide either a milestone or branch name argument.');
72
- return [2 /*return*/, false];
73
- }
74
- milestone = _options.milestone;
75
- if (!!milestone) return [3 /*break*/, 2];
76
- utils_1.Logger.logInfo("Searching for a merge request in project \"monorepo\" with branch name \"".concat(_options.monorepoBranchName, "\"..."));
77
- return [4 /*yield*/, this.gitLabService.getMilestoneByBranchName(utils_1.ProjectIds.MONOREPO_PROJECT_ID, _options.monorepoBranchName)];
78
- case 1:
79
- milestone = _a.sent();
80
- _a.label = 2;
81
- case 2:
82
- if (!milestone)
83
- return [2 /*return*/, false];
84
- utils_1.Logger.logInfo("Found milestone \"".concat(milestone, "\". Proceeding to run builds for consuming projects..."));
85
- options = {
86
- version: _options.version,
87
- projectIds: _options.projectIds,
88
- omittedProjectIds: _options.omittedProjectIds,
89
- milestone: milestone
90
- };
91
- return [4 /*yield*/, this.gitLabService.getProjects(options)];
92
- case 3:
93
- projects = _a.sent();
94
- consumingProjects = projects.filter(function (p) { return p.id.toString() !== utils_1.ProjectIds.MONOREPO_PROJECT_ID; });
95
- if (!consumingProjects.length) {
96
- utils_1.Logger.logError("No projects that consume monorepo could be found");
97
- return [2 /*return*/, false];
98
- }
99
- projectBuildMap = {};
100
- _i = 0, consumingProjects_1 = consumingProjects;
101
- _a.label = 4;
102
- case 4:
103
- if (!(_i < consumingProjects_1.length)) return [3 /*break*/, 8];
104
- project = consumingProjects_1[_i];
105
- return [4 /*yield*/, this.gitLabService.getReleaseBranchNameMilestone(project.id, options.milestone)];
106
- case 5:
107
- branchName = _a.sent();
108
- if (!branchName) {
109
- utils_1.Logger.logWarning("Release branch in project \"".concat(project.title, "\" with milestone \"").concat(options.milestone, "\" was not found. Skipping project..."));
110
- return [3 /*break*/, 7];
111
- }
112
- buildId = TeamCityBuildIDs_1.TeamCityBuildIds[project.id.toString()];
113
- if (!buildId) {
114
- utils_1.Logger.logWarning("Skipping build for ".concat(project.title, " as no Team City build ID has been specified"));
115
- return [3 /*break*/, 7];
116
- }
117
- return [4 /*yield*/, this.teamCityService.startBuild(buildId, branchName)];
118
- case 6:
119
- build = _a.sent();
120
- projectBuildMap[project.title] = build;
121
- _a.label = 7;
122
- case 7:
123
- _i++;
124
- return [3 /*break*/, 4];
125
- case 8:
126
- totalBuilds = Object.keys(projectBuildMap).length;
127
- if (!totalBuilds) {
128
- utils_1.Logger.logWarning("No releases found in consuming projects with milestone \"".concat(options.milestone, "\"."));
129
- return [2 /*return*/, true];
130
- }
131
- utils_1.Logger.logSuccess("Successfully started builds in ".concat(totalBuilds, " projects."));
132
- for (project in projectBuildMap) {
133
- utils_1.Logger.logInfo("[".concat(project, "]: ").concat(projectBuildMap[project].webUrl));
134
- }
135
- return [2 /*return*/, true];
136
- }
137
- });
138
- });
139
- };
140
- StartConsumingProjectBuildsTask = __decorate([
141
- (0, inversify_1.injectable)(),
142
- __param(0, (0, inversify_1.inject)(types_1.SERVICES.TeamCityService)),
143
- __param(1, (0, inversify_1.inject)(types_1.SERVICES.GitLabService)),
144
- __metadata("design:paramtypes", [services_1.TeamCityService,
145
- services_1.GitLabService])
146
- ], StartConsumingProjectBuildsTask);
147
- return StartConsumingProjectBuildsTask;
148
- }());
149
- exports.StartConsumingProjectBuildsTask = StartConsumingProjectBuildsTask;