Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ module.exports = {
'no-await-in-loop': 'off',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'no-continue': 'off',
'no-restricted-imports': 'off',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@src/**'],
message: 'Do not import files from src/ directory as they can break the GH Actions build script.',
},
],
},
],
},
};
60 changes: 30 additions & 30 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15622,9 +15622,9 @@ const utils_1 = __nccwpck_require__(3030);
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
const plugin_throttling_1 = __nccwpck_require__(9968);
const request_error_1 = __nccwpck_require__(537);
const EmptyObject_1 = __nccwpck_require__(8227);
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
const arrayDifference_1 = __importDefault(__nccwpck_require__(7532));
const CONST_1 = __importDefault(__nccwpck_require__(9873));
const isEmptyObject_1 = __nccwpck_require__(6497);
class GithubUtils {
static internalOctokit;
/**
Expand Down Expand Up @@ -15815,7 +15815,7 @@ class GithubUtils {
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
.then((data) => {
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, EmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
return Promise.all(internalQAPRs.map((pr) => this.getPullRequestMergerLogin(pr.number).then((mergerLogin) => ({ url: pr.html_url, mergerLogin })))).then((results) => {
// The format of this map is following:
// {
Expand Down Expand Up @@ -15845,7 +15845,7 @@ class GithubUtils {
issueBody += '\r\n\r\n';
}
// Internal QA PR list
if (!(0, EmptyObject_1.isEmptyObject)(internalQAPRMap)) {
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
issueBody += '**Internal QA:**\r\n';
Object.keys(internalQAPRMap).forEach((URL) => {
Expand Down Expand Up @@ -16127,38 +16127,25 @@ exports["default"] = GithubUtils;

/***/ }),

/***/ 8534:
/***/ 7532:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
* It does not wait for the other promises to complete once it finds one.
* If no promise passes the provided test, it rejects.
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
*/
function promiseSome(promises, callbackFn) {
return new Promise((resolve, reject) => {
for (const p of promises) {
Promise.resolve(p)
.then((res) => {
if (!callbackFn(res)) {
return;
}
resolve(true);
})
.catch(() => { });
}
Promise.allSettled(promises).then(() => reject());
});
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
}
exports["default"] = promiseSome;
exports["default"] = arrayDifference;


/***/ }),

/***/ 8227:
/***/ 6497:
/***/ ((__unused_webpack_module, exports) => {

"use strict";
Expand All @@ -16173,20 +16160,33 @@ exports.isEmptyObject = isEmptyObject;

/***/ }),

/***/ 7034:
/***/ 8534:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
* It does not wait for the other promises to complete once it finds one.
* If no promise passes the provided test, it rejects.
*/
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
function promiseSome(promises, callbackFn) {
return new Promise((resolve, reject) => {
for (const p of promises) {
Promise.resolve(p)
.then((res) => {
if (!callbackFn(res)) {
return;
}
resolve(true);
})
.catch(() => { });
}
Promise.allSettled(promises).then(() => reject());
});
}
exports["default"] = arrayDifference;
exports["default"] = promiseSome;


/***/ }),
Expand Down
74 changes: 37 additions & 37 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12396,9 +12396,9 @@ const utils_1 = __nccwpck_require__(3030);
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
const plugin_throttling_1 = __nccwpck_require__(9968);
const request_error_1 = __nccwpck_require__(537);
const EmptyObject_1 = __nccwpck_require__(8227);
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
const arrayDifference_1 = __importDefault(__nccwpck_require__(7532));
const CONST_1 = __importDefault(__nccwpck_require__(9873));
const isEmptyObject_1 = __nccwpck_require__(6497);
class GithubUtils {
static internalOctokit;
/**
Expand Down Expand Up @@ -12589,7 +12589,7 @@ class GithubUtils {
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
.then((data) => {
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, EmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
return Promise.all(internalQAPRs.map((pr) => this.getPullRequestMergerLogin(pr.number).then((mergerLogin) => ({ url: pr.html_url, mergerLogin })))).then((results) => {
// The format of this map is following:
// {
Expand Down Expand Up @@ -12619,7 +12619,7 @@ class GithubUtils {
issueBody += '\r\n\r\n';
}
// Internal QA PR list
if (!(0, EmptyObject_1.isEmptyObject)(internalQAPRMap)) {
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
issueBody += '**Internal QA:**\r\n';
Object.keys(internalQAPRMap).forEach((URL) => {
Expand Down Expand Up @@ -12899,6 +12899,39 @@ class GithubUtils {
exports["default"] = GithubUtils;


/***/ }),

/***/ 7532:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
*/
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
}
exports["default"] = arrayDifference;


/***/ }),

/***/ 6497:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isEmptyObject = void 0;
function isEmptyObject(obj) {
return Object.keys(obj ?? {}).length === 0;
}
exports.isEmptyObject = isEmptyObject;


/***/ }),

/***/ 9438:
Expand Down Expand Up @@ -12954,39 +12987,6 @@ function promiseDoWhile(condition, action) {
exports.promiseDoWhile = promiseDoWhile;


/***/ }),

/***/ 8227:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isEmptyObject = void 0;
function isEmptyObject(obj) {
return Object.keys(obj ?? {}).length === 0;
}
exports.isEmptyObject = isEmptyObject;


/***/ }),

/***/ 7034:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
*/
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
}
exports["default"] = arrayDifference;


/***/ }),

/***/ 9491:
Expand Down
34 changes: 17 additions & 17 deletions .github/actions/javascript/checkAndroidStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -737115,9 +737115,9 @@ const utils_1 = __nccwpck_require__(73030);
const plugin_paginate_rest_1 = __nccwpck_require__(64193);
const plugin_throttling_1 = __nccwpck_require__(9968);
const request_error_1 = __nccwpck_require__(10537);
const EmptyObject_1 = __nccwpck_require__(58227);
const arrayDifference_1 = __importDefault(__nccwpck_require__(97034));
const arrayDifference_1 = __importDefault(__nccwpck_require__(17532));
const CONST_1 = __importDefault(__nccwpck_require__(29873));
const isEmptyObject_1 = __nccwpck_require__(86497);
class GithubUtils {
static internalOctokit;
/**
Expand Down Expand Up @@ -737308,7 +737308,7 @@ class GithubUtils {
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
.then((data) => {
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, EmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
return Promise.all(internalQAPRs.map((pr) => this.getPullRequestMergerLogin(pr.number).then((mergerLogin) => ({ url: pr.html_url, mergerLogin })))).then((results) => {
// The format of this map is following:
// {
Expand Down Expand Up @@ -737338,7 +737338,7 @@ class GithubUtils {
issueBody += '\r\n\r\n';
}
// Internal QA PR list
if (!(0, EmptyObject_1.isEmptyObject)(internalQAPRMap)) {
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
issueBody += '**Internal QA:**\r\n';
Object.keys(internalQAPRMap).forEach((URL) => {
Expand Down Expand Up @@ -737620,35 +737620,35 @@ exports["default"] = GithubUtils;

/***/ }),

/***/ 58227:
/***/ 17532:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isEmptyObject = void 0;
function isEmptyObject(obj) {
return Object.keys(obj ?? {}).length === 0;
/**
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
*/
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
}
exports.isEmptyObject = isEmptyObject;
exports["default"] = arrayDifference;


/***/ }),

/***/ 97034:
/***/ 86497:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/**
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
* It returns an array of items that are in the first array but not in the second array.
*/
function arrayDifference(array1, array2) {
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
exports.isEmptyObject = void 0;
function isEmptyObject(obj) {
return Object.keys(obj ?? {}).length === 0;
}
exports["default"] = arrayDifference;
exports.isEmptyObject = isEmptyObject;


/***/ }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as core from '@actions/core';
import CONST from '@github/libs/CONST';
import GithubUtils from '@github/libs/GithubUtils';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import {isEmptyObject} from '@github/libs/isEmptyObject';

const run = function (): Promise<void> {
const issueNumber = Number(core.getInput('ISSUE_NUMBER', {required: true}));
Expand Down
Loading
Loading