@clickview/ship-it 0.0.43 → 0.0.45

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/.gitlab-ci.yml ADDED
@@ -0,0 +1,4 @@
1
+ include:
2
+ - project: 'Clickview/Templates'
3
+ file: 'shared-ci-templates/run-danger.yml'
4
+ ref: master
package/Dangerfile ADDED
@@ -0,0 +1,5 @@
1
+ require "gitlab-dangerfiles"
2
+
3
+ Dir.glob('danger/*').each do |file|
4
+ danger.import_dangerfile(path: file)
5
+ end
package/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
+
6
+ gem 'gitlab-dangerfiles', require: false
7
+ gem 'danger'
package/config.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "gitLab": {
3
- "accessToken": "glpat-d9TACyfNj3uaetfbGiPp",
3
+ "accessToken": "glpat-zyyMQu7nQXxPb672CawK",
4
4
  "url": "https://gitlab.cvinternal.net"
5
5
  },
6
6
  "teamCity": {
@@ -0,0 +1,42 @@
1
+ source_branch = ENV['CI_COMMIT_REF_NAME'] || ''
2
+
3
+ # Skip if not a hotfix or release branch
4
+ unless source_branch.match?(/^hotfix\/|^release\//)
5
+ message("ℹ️ Skipping package version check: Branch '#{source_branch}' is not a hotfix or release branch.")
6
+ return
7
+ end
8
+
9
+ message("🔍 Running package version check for branch: #{source_branch}")
10
+
11
+ warn_list = []
12
+
13
+ # Define package-related file patterns
14
+ package_patterns = ['**/*.csproj', '**/Directory.Build.props', '**/Directory.Build.targets', '**/package.json']
15
+
16
+ # Find all matching files
17
+ package_files = Dir.glob(package_patterns, File::FNM_CASEFOLD)
18
+
19
+ if package_files.empty?
20
+ message("⚠️ No package files found! Check directory structure.")
21
+ return
22
+ end
23
+
24
+ # Regex pattern for pre-release versions
25
+ prerelease_regex = /\d+\.\d+\.\d+-.*?/i
26
+
27
+ # Scan files for pre-release package versions
28
+ package_files.each do |file|
29
+ File.readlines(file, encoding: "UTF-8").each_with_index do |line, index|
30
+ if line.match?(prerelease_regex)
31
+ cleaned_line = line.strip.gsub(/\s+/, " ") # Ensure proper spacing
32
+ warn_list << "**🚨 Pre-release package version detected** in `#{file}` (Line #{index + 1}):\n\n 👉 #{cleaned_line.inspect}"
33
+ end
34
+ end
35
+ end
36
+
37
+ # Report warnings if any
38
+ if warn_list.empty?
39
+ message("✅ No pre-release versions found.")
40
+ else
41
+ warn_list.each { |warning| warn(warning) }
42
+ end
@@ -0,0 +1,49 @@
1
+ projectName,mrTitle,mrAuthor,mrAssignee,mrUrl,notes
2
+ clickview,Lite: Incremental exports for Marc,Shale Kuzmanovski,Nischal Shrestha,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5708,"# Lite
3
+ - Added a link to our KB article about exporting libraries to the export libraries settings page.
4
+ - When selecting the `MARC 21 V2` or `MARC XML` library export formats. Admins can now additionally select from which date they would like the export to start from. Implements INBOX-9351.
5
+
6
+ ![image](/uploads/c2a21befd2de8a2dd44e73a59a5a81e3/image.png)"
7
+ clickview,Lite: SearchV2 - Enable public access,Nischal Shrestha,Shale Kuzmanovski,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5699,"# Lite
8
+ * Enable new search for public access."
9
+ clickview,Player: Fix captions bug with theatre mode,Shale Kuzmanovski,Nan Chen,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5690,"# Player
10
+ - Fixed a bug where captions wouldn't reposition when toggling between theatre mode and default mode. Fixes INBOX-9276."
11
+ clickview,User man - Super admin support,Nan Chen,Joshua Taylor,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5687,"# Lite
12
+ - In the Curator user manager, a super admin account can be created and edited:
13
+
14
+ ![Screenshot_2025-06-19_at_8.52.00_am](/uploads/17b00c4d068880871d9b51d37509f076/Screenshot_2025-06-19_at_8.52.00_am.png)
15
+
16
+ ![image](/uploads/ac959cb3cf188747ba2a2c97c353ad1b/image.png)
17
+ - For a Super Admin account, they can create/edit another Super Admin staff account:
18
+ ![image](/uploads/9f8cc51ec6f3fe707c804be1b73ca19a/image.png)
19
+ - For an ordinary Admin, they cannot create/edit a Super Admin staff:
20
+ ![image](/uploads/0ca0a42ca33357e65bdecd55ccad1f4b/image.png)
21
+ - In Lite, a non-super admin cannot update a super admin account (edit, deactivate, remove etc.)
22
+ ![image](/uploads/3c5ff12844f1adc13ae6288b13bbf4ba/image.png)"
23
+ clickview,User man - Support superAdmin badge,Nan Chen,Joshua Taylor,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5671,"# Lite
24
+ * If a user is a Super Admin, it should display a badge to differentiate from an Admin. For AU/UK it's called `Org Admin`, for US it's `District Admin`.
25
+ ![Screenshot 2025-06-17 at 1.21.43 pm.png](/uploads/fecf7e3c85fe2ef60b7f65125899728c/Screenshot_2025-06-17_at_1.21.43_pm.png)
26
+ ![image.png](/uploads/88184f5bb5396dd4b87938780c9d1aba/image.png)
27
+
28
+ # Curator
29
+ * If a user is a Super Admin, it should display a badge to differentiate from an Admin. For AU/UK it's called `Org Admin`, for US it's `District Admin`.
30
+ ![Screenshot 2025-06-17 at 1.21.43 pm.png](/uploads/fecf7e3c85fe2ef60b7f65125899728c/Screenshot_2025-06-17_at_1.21.43_pm.png)
31
+ ![image.png](/uploads/88184f5bb5396dd4b87938780c9d1aba/image.png)"
32
+ clickview,Player: Allow looping videos,Shale Kuzmanovski,Boris Berak,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5666,"# Player
33
+ - The player now provides the option for the video to be looped. Note: Turning on play next video will turn off loop video, and vice versa. Implements PLAY-243.
34
+
35
+ ![image](/uploads/a3302899794ec21a1fd5d924c7b9a4d8/image.png)
36
+ - Fix the casing of the player's menu items."
37
+ clickview,Curator: POI form safeguard,Joshua Taylor,Shale Kuzmanovski,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5665,"# Curator
38
+ - In the Points of Interest form in the content pipeline, if you manually add/edit a POI and accidentally click on the ""X"", you are shown a warning then asked to click X again before actually closing the form."
39
+ clickview,Player: Captions indicator,Shale Kuzmanovski,Boris Berak,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5663,"# Player
40
+ - The player will now indicate if captions and theatre mode are switched on. Implements INBOX-8757.
41
+
42
+ ![image](/uploads/7a3b9cd1fa69ee27723e153d8ea5c3cc/image.png)"
43
+ clickview,Shared - Fix img overflow issue,Nan Chen,Nischal Shrestha,https://gitlab.cvinternal.net/clickview/front-end/clickview/-/merge_requests/5661,"# Lite
44
+ - Fix an issue where the images start to overflow the containers on the login page.
45
+ ![image](/uploads/497a18019f0c54853c51c8d5ce7b1cf4/image.png)"
46
+ File.Api,Support utf8 file name,Ryan Wang,Prad Nepal,https://gitlab.cvinternal.net/clickview/back-end/File.Api/-/merge_requests/65,* Fixed an issue where file uploaded with UTF-8 characters file name have these characters stripped when downloading them. Closes INBOX-9210
47
+ Tv.Web,"Add 7twoHd Perth small channel logo, partially implements INBOX-9165",Wei Zong,Ryan Wang,https://gitlab.cvinternal.net/clickview/back-end/tv/Tv.Web/-/merge_requests/255,"* Customer shoud see the new 7twoHD channels in 5 AU resions. The old `7two` channel should be disabled
48
+ * Rename `ABC Entertains` to `ABC Entertains HD`
49
+ * Rename `ABC News 24` to `ABC News HD`"
package/lib/config.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "gitLab": {
3
- "accessToken": "glpat-d9TACyfNj3uaetfbGiPp",
3
+ "accessToken": "glpat-zyyMQu7nQXxPb672CawK",
4
4
  "url": "https://gitlab.cvinternal.net"
5
5
  },
6
6
  "teamCity": {
@@ -365,6 +365,23 @@ var GitLabApiClient = /** @class */ (function () {
365
365
  });
366
366
  });
367
367
  };
368
+ GitLabApiClient.prototype.updateMergeRequestDescription = function (options) {
369
+ return __awaiter(this, void 0, void 0, function () {
370
+ var projectId, mergeRequestIid, description, updatedMR;
371
+ return __generator(this, function (_a) {
372
+ switch (_a.label) {
373
+ case 0:
374
+ projectId = options.projectId, mergeRequestIid = options.mergeRequestIid, description = options.description;
375
+ return [4 /*yield*/, this.client.MergeRequests.edit(projectId, mergeRequestIid, {
376
+ description: description,
377
+ })];
378
+ case 1:
379
+ updatedMR = _a.sent();
380
+ return [2 /*return*/, GitLabMapper_1.GitLabMapper.mergeRequest(updatedMR)];
381
+ }
382
+ });
383
+ });
384
+ };
368
385
  GitLabApiClient.prototype.getFile = function (projectId, filePath, branchName) {
369
386
  return __awaiter(this, void 0, void 0, function () {
370
387
  var file, _a;
@@ -0,0 +1,76 @@
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.CheckReleaseReadyCommand = void 0;
52
+ require("reflect-metadata");
53
+ var inversify_1 = require("inversify");
54
+ var types_1 = require("../types");
55
+ var CheckReleaseReadyCommand = /** @class */ (function () {
56
+ function CheckReleaseReadyCommand(checkReleaseReadyTask) {
57
+ this.checkReleaseReadyTask = checkReleaseReadyTask;
58
+ }
59
+ CheckReleaseReadyCommand.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.checkReleaseReadyTask.run(options)];
64
+ case 1: return [2 /*return*/, _a.sent()];
65
+ }
66
+ });
67
+ });
68
+ };
69
+ CheckReleaseReadyCommand = __decorate([
70
+ (0, inversify_1.injectable)(),
71
+ __param(0, (0, inversify_1.inject)(types_1.TASKS.CheckReleaseReadyTask)),
72
+ __metadata("design:paramtypes", [Object])
73
+ ], CheckReleaseReadyCommand);
74
+ return CheckReleaseReadyCommand;
75
+ }());
76
+ exports.CheckReleaseReadyCommand = CheckReleaseReadyCommand;
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -77,7 +88,7 @@ var CreateMergeRequestCommand = /** @class */ (function () {
77
88
  // Check if we want to continue with inquirer?
78
89
  if (!cont)
79
90
  return [2 /*return*/, false];
80
- return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
91
+ return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'source-branch' }))];
81
92
  case 3:
82
93
  cont = _a.sent();
83
94
  if (!cont)
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -62,7 +73,7 @@ var CreateNotesAuditCommand = /** @class */ (function () {
62
73
  var cont;
63
74
  return __generator(this, function (_a) {
64
75
  switch (_a.label) {
65
- case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
76
+ case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'source-branch' }))];
66
77
  case 1:
67
78
  cont = _a.sent();
68
79
  if (!cont)
@@ -73,7 +73,7 @@ var CreateReleaseNotesCommand = /** @class */ (function () {
73
73
  var cont;
74
74
  return __generator(this, function (_a) {
75
75
  switch (_a.label) {
76
- case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { slackNotifier: false }))];
76
+ case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { slackNotifier: false, target: 'source-branch' }))];
77
77
  case 1:
78
78
  cont = _a.sent();
79
79
  if (!cont)
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -80,7 +91,7 @@ var ReleaseCommand = /** @class */ (function () {
80
91
  cont = _a.sent();
81
92
  if (!cont)
82
93
  return [2 /*return*/, false];
83
- return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
94
+ return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'source-branch' }))];
84
95
  case 3:
85
96
  cont = _a.sent();
86
97
  if (!cont)
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -66,7 +77,7 @@ var StatusCommand = /** @class */ (function () {
66
77
  case 0: return [4 /*yield*/, this.validateTask.run(options)];
67
78
  case 1:
68
79
  _a.sent();
69
- return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
80
+ return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'source-branch' }))];
70
81
  case 2:
71
82
  _a.sent();
72
83
  return [4 /*yield*/, this.validateCommitsTask.run(options)];
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
14
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
15
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -80,7 +91,7 @@ var ToolingReleaseCommand = /** @class */ (function () {
80
91
  cont = _a.sent();
81
92
  if (!cont)
82
93
  return [2 /*return*/, false];
83
- return [4 /*yield*/, this.validateDescriptionsTask.run(options)];
94
+ return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'source-branch' }))];
84
95
  case 3:
85
96
  cont = _a.sent();
86
97
  if (!cont)
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
14
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16
+ 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;
17
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
18
+ };
19
+ var __metadata = (this && this.__metadata) || function (k, v) {
20
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
21
+ };
22
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
23
+ return function (target, key) { decorator(target, key, paramIndex); }
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (_) try {
41
+ 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;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.UpdateDescriptionCommand = void 0;
63
+ require("reflect-metadata");
64
+ var inversify_1 = require("inversify");
65
+ var types_1 = require("../types");
66
+ var UpdateDescriptionCommand = /** @class */ (function () {
67
+ function UpdateDescriptionCommand(validateDescriptionsTask, updateMergeRequestDescriptionTask) {
68
+ this.validateDescriptionsTask = validateDescriptionsTask;
69
+ this.updateMergeRequestDescriptionTask = updateMergeRequestDescriptionTask;
70
+ }
71
+ UpdateDescriptionCommand.prototype.run = function (options) {
72
+ return __awaiter(this, void 0, void 0, function () {
73
+ var cont;
74
+ return __generator(this, function (_a) {
75
+ switch (_a.label) {
76
+ case 0: return [4 /*yield*/, this.validateDescriptionsTask.run(__assign(__assign({}, options), { target: 'next-branch' }))];
77
+ case 1:
78
+ cont = _a.sent();
79
+ if (!cont)
80
+ return [2 /*return*/, false];
81
+ return [4 /*yield*/, this.updateMergeRequestDescriptionTask.run(options)];
82
+ case 2: return [2 /*return*/, _a.sent()];
83
+ }
84
+ });
85
+ });
86
+ };
87
+ UpdateDescriptionCommand = __decorate([
88
+ (0, inversify_1.injectable)(),
89
+ __param(0, (0, inversify_1.inject)(types_1.TASKS.ValidateDescriptionsTask)),
90
+ __param(1, (0, inversify_1.inject)(types_1.TASKS.UpdateMergeRequestDescriptionTask)),
91
+ __metadata("design:paramtypes", [Object, Object])
92
+ ], UpdateDescriptionCommand);
93
+ return UpdateDescriptionCommand;
94
+ }());
95
+ exports.UpdateDescriptionCommand = UpdateDescriptionCommand;
@@ -31,3 +31,4 @@ __exportStar(require("./ValidateMergeRequestCommand"), exports);
31
31
  __exportStar(require("./VersionCommand"), exports);
32
32
  __exportStar(require("./CreateTrelloCardsCommand"), exports);
33
33
  __exportStar(require("./CreateHotfixCommand"), exports);
34
+ __exportStar(require("./UpdateDescriptionCommand"), exports);
@@ -19,5 +19,6 @@ exports.CommandTypeMapping = {
19
19
  'list-projects': types_1.COMMANDS.ListProjectsCommand,
20
20
  'create-trello-cards': types_1.COMMANDS.CreateTrelloCardsCommand,
21
21
  'configure-projects': types_1.COMMANDS.ConfigureProjectsCommand,
22
- 'create-hotfix': types_1.COMMANDS.CreateHotfixCommand
22
+ 'create-hotfix': types_1.COMMANDS.CreateHotfixCommand,
23
+ 'update-description': types_1.COMMANDS.UpdateDescriptionCommand
23
24
  };
package/lib/src/index.js CHANGED
File without changes
@@ -58,6 +58,9 @@ function createContainer(config) {
58
58
  container.bind(types_1.TASKS.CreateToolingBranchTask).to(tasks_1.CreateToolingBranchTask);
59
59
  container.bind(types_1.TASKS.CreateHotfixTask).to(tasks_1.CreateHotfixTask);
60
60
  container.bind(types_1.TASKS.ChangeMilestoneTask).to(ChangeMilestoneTask_1.ChangeMilestoneTask);
61
+ container
62
+ .bind(types_1.TASKS.UpdateMergeRequestDescriptionTask)
63
+ .to(tasks_1.UpdateMergeRequestDescriptionTask);
61
64
  /**
62
65
  * Commands
63
66
  */
@@ -79,6 +82,7 @@ function createContainer(config) {
79
82
  .to(commands_1.StartProjectBuildsCommand);
80
83
  container.bind(types_1.COMMANDS.ConfigureProjectsCommand).to(commands_1.ConfigureProjectsCommand);
81
84
  container.bind(types_1.COMMANDS.CreateHotfixCommand).to(commands_1.CreateHotfixCommand);
85
+ container.bind(types_1.COMMANDS.UpdateDescriptionCommand).to(commands_1.UpdateDescriptionCommand);
82
86
  return container;
83
87
  }
84
88
  exports.createContainer = createContainer;
@@ -311,6 +311,19 @@ var GitLabService = /** @class */ (function () {
311
311
  GitLabService.prototype.AcceptMergeRequest = function (projectId, mergerequestIId) {
312
312
  return this.apiClient.AcceptMergeRequest(projectId, mergerequestIId);
313
313
  };
314
+ GitLabService.prototype.updateMergeRequestDescription = function (options) {
315
+ return __awaiter(this, void 0, void 0, function () {
316
+ var projectId, mergeRequestIid, description;
317
+ return __generator(this, function (_a) {
318
+ projectId = options.projectId, mergeRequestIid = options.mergeRequestIid, description = options.description;
319
+ return [2 /*return*/, this.apiClient.updateMergeRequestDescription({
320
+ projectId: projectId,
321
+ mergeRequestIid: mergeRequestIid,
322
+ description: description
323
+ })];
324
+ });
325
+ });
326
+ };
314
327
  GitLabService.prototype.getMilestone = function (milestoneName, projectId) {
315
328
  return this.apiClient.getMilestone(milestoneName, projectId);
316
329
  };
@@ -62,6 +62,7 @@ function setupCommands(program, container) {
62
62
  addMilestoneCommand('create-notes-audit', 'Builds a spreadsheet of all the customer changes and who wrote them.');
63
63
  addMilestoneCommand('tag-master', 'Tags master for all release MRs that are part of a milestone');
64
64
  addMilestoneCommand('create-trello-cards', 'Creates the cards on the ship-it trello board for all projects that are part of a milestone');
65
+ addMilestoneCommand('update-description', 'Recreates descriptions for release MRs');
65
66
  program.command('status')
66
67
  .description('Get the status of all MRs in a milestone')
67
68
  .requiredOption('-m, --milestone <milestone>')