Skip to content

Commit 16873eb

Browse files
committed
Merge branch 'main' into cmartins-fixreview
2 parents be9d9ec + 54e5187 commit 16873eb

746 files changed

Lines changed: 19540 additions & 10156 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.changed.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = {
88
'deprecation/deprecation': 'error',
99
'rulesdir/no-default-id-values': 'error',
1010
'rulesdir/provide-canBeMissing-in-useOnyx': 'error',
11+
'rulesdir/no-unstable-hook-defaults': 'error',
1112
'no-restricted-syntax': [
1213
'error',
1314
{

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ module.exports = {
219219
'es/no-optional-chaining': 'off',
220220
'deprecation/deprecation': 'off',
221221
'arrow-body-style': 'off',
222+
'no-continue': 'off',
222223

223224
// Import specific rules
224225
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
@@ -277,6 +278,14 @@ module.exports = {
277278
property: 'isHybridApp',
278279
message: 'Use CONFIG.IS_HYBRID_APP instead.',
279280
},
281+
// Prevent direct use of HybridAppModule.closeReactNativeApp().
282+
// Instead, use the `closeReactNativeApp` action from `@userActions/HybridApp`,
283+
// which correctly updates `hybridApp.closingReactNativeApp` when closing NewDot
284+
{
285+
object: 'HybridAppModule',
286+
property: 'closeReactNativeApp',
287+
message: 'Use `closeReactNativeApp` from `@userActions/HybridApp` instead.',
288+
},
280289
],
281290
'no-restricted-imports': [
282291
'error',

.github/.eslintrc.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ module.exports = {
77
'no-await-in-loop': 'off',
88
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
99
'no-continue': 'off',
10-
'no-restricted-imports': 'off',
10+
'no-restricted-imports': [
11+
'error',
12+
{
13+
patterns: [
14+
{
15+
group: ['@src/**'],
16+
message: 'Do not import files from src/ directory as they can break the GH Actions build script.',
17+
},
18+
],
19+
},
20+
],
1121
},
1222
};

.github/actions/javascript/authorChecklist/index.js

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15560,6 +15560,13 @@ const CONST = {
1556015560
HELP_WANTED: 'Help Wanted',
1556115561
CP_STAGING: 'CP Staging',
1556215562
},
15563+
STATE: {
15564+
OPEN: 'open',
15565+
},
15566+
COMMENT: {
15567+
TYPE_BOT: 'Bot',
15568+
NAME_GITHUB_ACTIONS: 'github-actions',
15569+
},
1556315570
ACTIONS: {
1556415571
CREATED: 'created',
1556515572
EDITED: 'edited',
@@ -15578,6 +15585,7 @@ const CONST = {
1557815585
NO_ACTION: 'NO_ACTION',
1557915586
ACTION_EDIT: 'ACTION_EDIT',
1558015587
ACTION_REQUIRED: 'ACTION_REQUIRED',
15588+
ACTION_HIDE_DUPLICATE: 'ACTION_HIDE_DUPLICATE',
1558115589
};
1558215590
exports["default"] = CONST;
1558315591

@@ -15622,9 +15630,9 @@ const utils_1 = __nccwpck_require__(3030);
1562215630
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1562315631
const plugin_throttling_1 = __nccwpck_require__(9968);
1562415632
const request_error_1 = __nccwpck_require__(537);
15625-
const EmptyObject_1 = __nccwpck_require__(8227);
15626-
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
15633+
const arrayDifference_1 = __importDefault(__nccwpck_require__(7532));
1562715634
const CONST_1 = __importDefault(__nccwpck_require__(9873));
15635+
const isEmptyObject_1 = __nccwpck_require__(6497);
1562815636
class GithubUtils {
1562915637
static internalOctokit;
1563015638
/**
@@ -15815,7 +15823,7 @@ class GithubUtils {
1581515823
static generateStagingDeployCashBodyAndAssignees(tag, PRList, verifiedPRList = [], deployBlockers = [], resolvedDeployBlockers = [], resolvedInternalQAPRs = [], isFirebaseChecked = false, isGHStatusChecked = false) {
1581615824
return this.fetchAllPullRequests(PRList.map((pr) => this.getPullRequestNumberFromURL(pr)))
1581715825
.then((data) => {
15818-
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, EmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
15826+
const internalQAPRs = Array.isArray(data) ? data.filter((pr) => !(0, isEmptyObject_1.isEmptyObject)(pr.labels.find((item) => item.name === CONST_1.default.LABELS.INTERNAL_QA))) : [];
1581915827
return Promise.all(internalQAPRs.map((pr) => this.getPullRequestMergerLogin(pr.number).then((mergerLogin) => ({ url: pr.html_url, mergerLogin })))).then((results) => {
1582015828
// The format of this map is following:
1582115829
// {
@@ -15845,7 +15853,7 @@ class GithubUtils {
1584515853
issueBody += '\r\n\r\n';
1584615854
}
1584715855
// Internal QA PR list
15848-
if (!(0, EmptyObject_1.isEmptyObject)(internalQAPRMap)) {
15856+
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1584915857
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
1585015858
issueBody += '**Internal QA:**\r\n';
1585115859
Object.keys(internalQAPRMap).forEach((URL) => {
@@ -15938,6 +15946,14 @@ class GithubUtils {
1593815946
per_page: 100,
1593915947
}, (response) => response.data.map((comment) => comment.body));
1594015948
}
15949+
static getAllCommentDetails(issueNumber) {
15950+
return this.paginate(this.octokit.issues.listComments, {
15951+
owner: CONST_1.default.GITHUB_OWNER,
15952+
repo: CONST_1.default.APP_REPO,
15953+
issue_number: issueNumber,
15954+
per_page: 100,
15955+
}, (response) => response.data);
15956+
}
1594115957
/**
1594215958
* Create comment on pull request
1594315959
*/
@@ -16127,38 +16143,25 @@ exports["default"] = GithubUtils;
1612716143

1612816144
/***/ }),
1612916145

16130-
/***/ 8534:
16146+
/***/ 7532:
1613116147
/***/ ((__unused_webpack_module, exports) => {
1613216148

1613316149
"use strict";
1613416150

1613516151
Object.defineProperty(exports, "__esModule", ({ value: true }));
1613616152
/**
16137-
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
16138-
* It does not wait for the other promises to complete once it finds one.
16139-
* If no promise passes the provided test, it rejects.
16153+
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
16154+
* It returns an array of items that are in the first array but not in the second array.
1614016155
*/
16141-
function promiseSome(promises, callbackFn) {
16142-
return new Promise((resolve, reject) => {
16143-
for (const p of promises) {
16144-
Promise.resolve(p)
16145-
.then((res) => {
16146-
if (!callbackFn(res)) {
16147-
return;
16148-
}
16149-
resolve(true);
16150-
})
16151-
.catch(() => { });
16152-
}
16153-
Promise.allSettled(promises).then(() => reject());
16154-
});
16156+
function arrayDifference(array1, array2) {
16157+
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
1615516158
}
16156-
exports["default"] = promiseSome;
16159+
exports["default"] = arrayDifference;
1615716160

1615816161

1615916162
/***/ }),
1616016163

16161-
/***/ 8227:
16164+
/***/ 6497:
1616216165
/***/ ((__unused_webpack_module, exports) => {
1616316166

1616416167
"use strict";
@@ -16173,20 +16176,33 @@ exports.isEmptyObject = isEmptyObject;
1617316176

1617416177
/***/ }),
1617516178

16176-
/***/ 7034:
16179+
/***/ 8534:
1617716180
/***/ ((__unused_webpack_module, exports) => {
1617816181

1617916182
"use strict";
1618016183

1618116184
Object.defineProperty(exports, "__esModule", ({ value: true }));
1618216185
/**
16183-
* This function is an equivalent of _.difference, it takes two arrays and returns the difference between them.
16184-
* It returns an array of items that are in the first array but not in the second array.
16186+
* Like _.some but for promises. It short-circuts after a promise fulfills with a value that passes the test implemented by provided function.
16187+
* It does not wait for the other promises to complete once it finds one.
16188+
* If no promise passes the provided test, it rejects.
1618516189
*/
16186-
function arrayDifference(array1, array2) {
16187-
return [array1, array2].reduce((a, b) => a.filter((c) => !b.includes(c)));
16190+
function promiseSome(promises, callbackFn) {
16191+
return new Promise((resolve, reject) => {
16192+
for (const p of promises) {
16193+
Promise.resolve(p)
16194+
.then((res) => {
16195+
if (!callbackFn(res)) {
16196+
return;
16197+
}
16198+
resolve(true);
16199+
})
16200+
.catch(() => { });
16201+
}
16202+
Promise.allSettled(promises).then(() => reject());
16203+
});
1618816204
}
16189-
exports["default"] = arrayDifference;
16205+
exports["default"] = promiseSome;
1619016206

1619116207

1619216208
/***/ }),

.github/actions/javascript/awaitStagingDeploys/index.js

Lines changed: 71 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12278,7 +12278,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
1227812278
return result;
1227912279
};
1228012280
Object.defineProperty(exports, "__esModule", ({ value: true }));
12281-
exports.getStringInput = exports.getJSONInput = void 0;
12281+
exports.convertToNumber = exports.getStringInput = exports.getJSONInput = void 0;
1228212282
const 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
}
1230912309
exports.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
};
1235612381
exports["default"] = CONST;
1235712382

@@ -12396,9 +12421,9 @@ const utils_1 = __nccwpck_require__(3030);
1239612421
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1239712422
const plugin_throttling_1 = __nccwpck_require__(9968);
1239812423
const 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));
1240112425
const CONST_1 = __importDefault(__nccwpck_require__(9873));
12426+
const isEmptyObject_1 = __nccwpck_require__(6497);
1240212427
class 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 {
1289912932
exports["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) {
1295413020
exports.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

Comments
 (0)