@@ -12278,7 +12278,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
1227812278 return result;
1227912279};
1228012280Object.defineProperty(exports, "__esModule", ({ value: true }));
12281- exports.getStringInput = exports.getJSONInput = void 0;
12281+ exports.convertToNumber = exports. getStringInput = exports.getJSONInput = void 0;
1228212282const core = __importStar(__nccwpck_require__(2186));
1228312283/**
1228412284 * Safely parse a JSON input to a GitHub Action.
@@ -12307,6 +12307,23 @@ function getStringInput(name, options, defaultValue) {
1230712307 return input;
1230812308}
1230912309exports.getStringInput = getStringInput;
12310+ /**
12311+ * Converts a value to a number, returning 0 for non-numeric values.
12312+ */
12313+ function convertToNumber(value) {
12314+ switch (typeof value) {
12315+ case 'number':
12316+ return value;
12317+ case 'string':
12318+ if (!Number.isNaN(Number(value))) {
12319+ return Number(value);
12320+ }
12321+ return 0;
12322+ default:
12323+ return 0;
12324+ }
12325+ }
12326+ exports.convertToNumber = convertToNumber;
1231012327
1231112328
1231212329/***/ }),
@@ -12334,6 +12351,13 @@ const CONST = {
1233412351 HELP_WANTED: 'Help Wanted',
1233512352 CP_STAGING: 'CP Staging',
1233612353 },
12354+ STATE: {
12355+ OPEN: 'open',
12356+ },
12357+ COMMENT: {
12358+ TYPE_BOT: 'Bot',
12359+ NAME_GITHUB_ACTIONS: 'github-actions',
12360+ },
1233712361 ACTIONS: {
1233812362 CREATED: 'created',
1233912363 EDITED: 'edited',
@@ -12352,6 +12376,7 @@ const CONST = {
1235212376 NO_ACTION: 'NO_ACTION',
1235312377 ACTION_EDIT: 'ACTION_EDIT',
1235412378 ACTION_REQUIRED: 'ACTION_REQUIRED',
12379+ ACTION_HIDE_DUPLICATE: 'ACTION_HIDE_DUPLICATE',
1235512380};
1235612381exports["default"] = CONST;
1235712382
@@ -12396,9 +12421,9 @@ const utils_1 = __nccwpck_require__(3030);
1239612421const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1239712422const plugin_throttling_1 = __nccwpck_require__(9968);
1239812423const request_error_1 = __nccwpck_require__(537);
12399- const EmptyObject_1 = __nccwpck_require__(8227);
12400- const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
12424+ const arrayDifference_1 = __importDefault(__nccwpck_require__(7532));
1240112425const CONST_1 = __importDefault(__nccwpck_require__(9873));
12426+ const isEmptyObject_1 = __nccwpck_require__(6497);
1240212427class GithubUtils {
1240312428 static internalOctokit;
1240412429 /**
@@ -12589,7 +12614,7 @@ class GithubUtils {
1258912614 static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
1259012615 return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
1259112616 .then((data) => {
12592- const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, EmptyObject_1 .isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
12617+ const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1 .isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
1259312618 return Promise.all(internalQAPRs.map((pr) => this.getPullRequestMergerLogin(pr.number).then((mergerLogin) => ({ url: pr.html_url, mergerLogin })))).then((results) => {
1259412619 // The format of this map is following:
1259512620 // {
@@ -12619,7 +12644,7 @@ class GithubUtils {
1261912644 issueBody += '\r\n\r\n';
1262012645 }
1262112646 // Internal QA PR list
12622- if (!(0, EmptyObject_1 .isEmptyObject)(internalQAPRMap)) {
12647+ if (!(0, isEmptyObject_1 .isEmptyObject)(internalQAPRMap)) {
1262312648 console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
1262412649 issueBody += '**Internal QA:**\r\n';
1262512650 Object.keys(internalQAPRMap).forEach((URL) => {
@@ -12712,6 +12737,14 @@ class GithubUtils {
1271212737 per_page: 100,
1271312738 }, (response) => response.data.map((comment) => comment.body));
1271412739 }
12740+ static getAllCommentDetails(issueNumber) {
12741+ return this.paginate(this.octokit.issues.listComments, {
12742+ owner: CONST_1.default.GITHUB_OWNER,
12743+ repo: CONST_1.default.APP_REPO,
12744+ issue_number: issueNumber,
12745+ per_page: 100,
12746+ }, (response) => response.data);
12747+ }
1271512748 /**
1271612749 * Create comment on pull request
1271712750 */
@@ -12899,6 +12932,39 @@ class GithubUtils {
1289912932exports["default"] = GithubUtils;
1290012933
1290112934
12935+ /***/ }),
12936+
12937+ /***/ 7532:
12938+ /***/ ((__unused_webpack_module, exports) => {
12939+
12940+ "use strict";
12941+
12942+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12943+ /**
12944+ * This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
12945+ * It returns an array of items that are in the first array but not in the second array.
12946+ */
12947+ function arrayDifference(array1, array2) {
12948+ return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
12949+ }
12950+ exports["default"] = arrayDifference;
12951+
12952+
12953+ /***/ }),
12954+
12955+ /***/ 6497:
12956+ /***/ ((__unused_webpack_module, exports) => {
12957+
12958+ "use strict";
12959+
12960+ Object.defineProperty(exports, "__esModule", ({ value: true }));
12961+ exports.isEmptyObject = void 0;
12962+ function isEmptyObject(obj) {
12963+ return Object.keys(obj ?? {}).length === 0;
12964+ }
12965+ exports.isEmptyObject = isEmptyObject;
12966+
12967+
1290212968/***/ }),
1290312969
1290412970/***/ 9438:
@@ -12954,39 +13020,6 @@ function promiseDoWhile(condition, action) {
1295413020exports.promiseDoWhile = promiseDoWhile;
1295513021
1295613022
12957- /***/ }),
12958-
12959- /***/ 8227:
12960- /***/ ((__unused_webpack_module, exports) => {
12961-
12962- "use strict";
12963-
12964- Object.defineProperty(exports, "__esModule", ({ value: true }));
12965- exports.isEmptyObject = void 0;
12966- function isEmptyObject(obj) {
12967- return Object.keys(obj ?? {}).length === 0;
12968- }
12969- exports.isEmptyObject = isEmptyObject;
12970-
12971-
12972- /***/ }),
12973-
12974- /***/ 7034:
12975- /***/ ((__unused_webpack_module, exports) => {
12976-
12977- "use strict";
12978-
12979- Object.defineProperty(exports, "__esModule", ({ value: true }));
12980- /**
12981- * This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
12982- * It returns an array of items that are in the first array but not in the second array.
12983- */
12984- function arrayDifference(array1, array2) {
12985- return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
12986- }
12987- exports["default"] = arrayDifference;
12988-
12989-
1299013023/***/ }),
1299113024
1299213025/***/ 9491:
0 commit comments