Skip to content

Commit 0140912

Browse files
committed
merge main and address conflicts from ts migrations for ReportActionItem
1 parent f6cfcb3 commit 0140912

File tree

216 files changed

+3747
-1540
lines changed

Some content is hidden

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

216 files changed

+3747
-1540
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
const restrictedImportPaths = [
22
{
33
name: 'react-native',
4-
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', 'Text'],
4+
importNames: ['useWindowDimensions', 'StatusBar', 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', 'Text', 'ScrollView'],
55
message: [
66
'',
77
"For 'useWindowDimensions', please use 'src/hooks/useWindowDimensions' instead.",
88
"For 'TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight', 'Pressable', please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
99
"For 'StatusBar', please use 'src/libs/StatusBar' instead.",
1010
"For 'Text', please use '@components/Text' instead.",
11+
"For 'ScrollView', please use '@components/ScrollView' instead.",
1112
].join('\n'),
1213
},
1314
{

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,14 @@ class GithubUtils {
283283
.then((data) => {
284284
// The format of this map is following:
285285
// {
286-
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
287-
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ]
286+
// 'https://github.com/Expensify/App/pull/9641': 'PauloGasparSv',
287+
// 'https://github.com/Expensify/App/pull/9642': 'mountiny'
288288
// }
289289
const internalQAPRMap = _.reduce(
290290
_.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: CONST.LABELS.INTERNAL_QA}))),
291291
(map, pr) => {
292292
// eslint-disable-next-line no-param-reassign
293-
map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login'));
293+
map[pr.html_url] = pr.merged_by.login;
294294
return map;
295295
},
296296
{},
@@ -325,11 +325,11 @@ class GithubUtils {
325325
if (!_.isEmpty(internalQAPRMap)) {
326326
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
327327
issueBody += '**Internal QA:**\r\n';
328-
_.each(internalQAPRMap, (assignees, URL) => {
329-
const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, '');
328+
_.each(internalQAPRMap, (merger, URL) => {
329+
const mergerMention = `@${merger}`;
330330
issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `;
331331
issueBody += `${URL}`;
332-
issueBody += ` -${assigneeMentions}`;
332+
issueBody += ` - ${mergerMention}`;
333333
issueBody += '\r\n';
334334
});
335335
issueBody += '\r\n\r\n';
@@ -359,7 +359,9 @@ class GithubUtils {
359359
issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`;
360360

361361
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
362-
return issueBody;
362+
const issueAssignees = _.values(internalQAPRMap);
363+
const issue = {issueBody, issueAssignees};
364+
return issue;
363365
})
364366
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
365367
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,14 +395,14 @@ class GithubUtils {
395395
.then((data) => {
396396
// The format of this map is following:
397397
// {
398-
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
399-
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ]
398+
// 'https://github.com/Expensify/App/pull/9641': 'PauloGasparSv',
399+
// 'https://github.com/Expensify/App/pull/9642': 'mountiny'
400400
// }
401401
const internalQAPRMap = _.reduce(
402402
_.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: CONST.LABELS.INTERNAL_QA}))),
403403
(map, pr) => {
404404
// eslint-disable-next-line no-param-reassign
405-
map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login'));
405+
map[pr.html_url] = pr.merged_by.login;
406406
return map;
407407
},
408408
{},
@@ -437,11 +437,11 @@ class GithubUtils {
437437
if (!_.isEmpty(internalQAPRMap)) {
438438
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
439439
issueBody += '**Internal QA:**\r\n';
440-
_.each(internalQAPRMap, (assignees, URL) => {
441-
const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, '');
440+
_.each(internalQAPRMap, (merger, URL) => {
441+
const mergerMention = `@${merger}`;
442442
issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `;
443443
issueBody += `${URL}`;
444-
issueBody += ` -${assigneeMentions}`;
444+
issueBody += ` - ${mergerMention}`;
445445
issueBody += '\r\n';
446446
});
447447
issueBody += '\r\n\r\n';
@@ -471,7 +471,9 @@ class GithubUtils {
471471
issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`;
472472

473473
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
474-
return issueBody;
474+
const issueAssignees = _.values(internalQAPRMap);
475+
const issue = {issueBody, issueAssignees};
476+
return issue;
475477
})
476478
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
477479
}

.github/actions/javascript/checkDeployBlockers/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,14 @@ class GithubUtils {
362362
.then((data) => {
363363
// The format of this map is following:
364364
// {
365-
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
366-
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ]
365+
// 'https://github.com/Expensify/App/pull/9641': 'PauloGasparSv',
366+
// 'https://github.com/Expensify/App/pull/9642': 'mountiny'
367367
// }
368368
const internalQAPRMap = _.reduce(
369369
_.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: CONST.LABELS.INTERNAL_QA}))),
370370
(map, pr) => {
371371
// eslint-disable-next-line no-param-reassign
372-
map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login'));
372+
map[pr.html_url] = pr.merged_by.login;
373373
return map;
374374
},
375375
{},
@@ -404,11 +404,11 @@ class GithubUtils {
404404
if (!_.isEmpty(internalQAPRMap)) {
405405
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
406406
issueBody += '**Internal QA:**\r\n';
407-
_.each(internalQAPRMap, (assignees, URL) => {
408-
const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, '');
407+
_.each(internalQAPRMap, (merger, URL) => {
408+
const mergerMention = `@${merger}`;
409409
issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `;
410410
issueBody += `${URL}`;
411-
issueBody += ` -${assigneeMentions}`;
411+
issueBody += ` - ${mergerMention}`;
412412
issueBody += '\r\n';
413413
});
414414
issueBody += '\r\n\r\n';
@@ -438,7 +438,9 @@ class GithubUtils {
438438
issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`;
439439

440440
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
441-
return issueBody;
441+
const issueAssignees = _.values(internalQAPRMap);
442+
const issue = {issueBody, issueAssignees};
443+
return issue;
442444
})
443445
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
444446
}

.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ async function run() {
4040

4141
// Next, we generate the checklist body
4242
let checklistBody = '';
43+
let checklistAssignees = [];
4344
if (shouldCreateNewDeployChecklist) {
44-
checklistBody = await GithubUtils.generateStagingDeployCashBody(newVersionTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
45+
const {issueBody, issueAssignees} = await GithubUtils.generateStagingDeployCashBody(newVersionTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
46+
checklistBody = issueBody;
47+
checklistAssignees = issueAssignees;
4548
} else {
4649
// Generate the updated PR list, preserving the previous state of `isVerified` for existing PRs
4750
const PRList = _.reduce(
@@ -94,7 +97,7 @@ async function run() {
9497
}
9598

9699
const didVersionChange = newVersionTag !== currentChecklistData.tag;
97-
checklistBody = await GithubUtils.generateStagingDeployCashBody(
100+
const {issueBody, issueAssignees} = await GithubUtils.generateStagingDeployCashBody(
98101
newVersionTag,
99102
_.pluck(PRList, 'url'),
100103
_.pluck(_.where(PRList, {isVerified: true}), 'url'),
@@ -105,6 +108,8 @@ async function run() {
105108
didVersionChange ? false : currentChecklistData.isFirebaseChecked,
106109
didVersionChange ? false : currentChecklistData.isGHStatusChecked,
107110
);
111+
checklistBody = issueBody;
112+
checklistAssignees = issueAssignees;
108113
}
109114

110115
// Finally, create or update the checklist
@@ -119,7 +124,7 @@ async function run() {
119124
...defaultPayload,
120125
title: `Deploy Checklist: New Expensify ${format(new Date(), CONST.DATE_FORMAT_STRING)}`,
121126
labels: [CONST.LABELS.STAGING_DEPLOY],
122-
assignees: [CONST.APPLAUSE_BOT],
127+
assignees: [CONST.APPLAUSE_BOT].concat(checklistAssignees),
123128
});
124129
console.log(`Successfully created new StagingDeployCash! 🎉 ${newChecklist.html_url}`);
125130
return newChecklist;

.github/actions/javascript/createOrUpdateStagingDeploy/index.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ async function run() {
4949

5050
// Next, we generate the checklist body
5151
let checklistBody = '';
52+
let checklistAssignees = [];
5253
if (shouldCreateNewDeployChecklist) {
53-
checklistBody = await GithubUtils.generateStagingDeployCashBody(newVersionTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
54+
const {issueBody, issueAssignees} = await GithubUtils.generateStagingDeployCashBody(newVersionTag, _.map(mergedPRs, GithubUtils.getPullRequestURLFromNumber));
55+
checklistBody = issueBody;
56+
checklistAssignees = issueAssignees;
5457
} else {
5558
// Generate the updated PR list, preserving the previous state of `isVerified` for existing PRs
5659
const PRList = _.reduce(
@@ -103,7 +106,7 @@ async function run() {
103106
}
104107

105108
const didVersionChange = newVersionTag !== currentChecklistData.tag;
106-
checklistBody = await GithubUtils.generateStagingDeployCashBody(
109+
const {issueBody, issueAssignees} = await GithubUtils.generateStagingDeployCashBody(
107110
newVersionTag,
108111
_.pluck(PRList, 'url'),
109112
_.pluck(_.where(PRList, {isVerified: true}), 'url'),
@@ -114,6 +117,8 @@ async function run() {
114117
didVersionChange ? false : currentChecklistData.isFirebaseChecked,
115118
didVersionChange ? false : currentChecklistData.isGHStatusChecked,
116119
);
120+
checklistBody = issueBody;
121+
checklistAssignees = issueAssignees;
117122
}
118123

119124
// Finally, create or update the checklist
@@ -128,7 +133,7 @@ async function run() {
128133
...defaultPayload,
129134
title: `Deploy Checklist: New Expensify ${format(new Date(), CONST.DATE_FORMAT_STRING)}`,
130135
labels: [CONST.LABELS.STAGING_DEPLOY],
131-
assignees: [CONST.APPLAUSE_BOT],
136+
assignees: [CONST.APPLAUSE_BOT].concat(checklistAssignees),
132137
});
133138
console.log(`Successfully created new StagingDeployCash! 🎉 ${newChecklist.html_url}`);
134139
return newChecklist;
@@ -434,14 +439,14 @@ class GithubUtils {
434439
.then((data) => {
435440
// The format of this map is following:
436441
// {
437-
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
438-
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ]
442+
// 'https://github.com/Expensify/App/pull/9641': 'PauloGasparSv',
443+
// 'https://github.com/Expensify/App/pull/9642': 'mountiny'
439444
// }
440445
const internalQAPRMap = _.reduce(
441446
_.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: CONST.LABELS.INTERNAL_QA}))),
442447
(map, pr) => {
443448
// eslint-disable-next-line no-param-reassign
444-
map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login'));
449+
map[pr.html_url] = pr.merged_by.login;
445450
return map;
446451
},
447452
{},
@@ -476,11 +481,11 @@ class GithubUtils {
476481
if (!_.isEmpty(internalQAPRMap)) {
477482
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
478483
issueBody += '**Internal QA:**\r\n';
479-
_.each(internalQAPRMap, (assignees, URL) => {
480-
const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, '');
484+
_.each(internalQAPRMap, (merger, URL) => {
485+
const mergerMention = `@${merger}`;
481486
issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `;
482487
issueBody += `${URL}`;
483-
issueBody += ` -${assigneeMentions}`;
488+
issueBody += ` - ${mergerMention}`;
484489
issueBody += '\r\n';
485490
});
486491
issueBody += '\r\n\r\n';
@@ -510,7 +515,9 @@ class GithubUtils {
510515
issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`;
511516

512517
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
513-
return issueBody;
518+
const issueAssignees = _.values(internalQAPRMap);
519+
const issue = {issueBody, issueAssignees};
520+
return issue;
514521
})
515522
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
516523
}

.github/actions/javascript/getArtifactInfo/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ class GithubUtils {
321321
.then((data) => {
322322
// The format of this map is following:
323323
// {
324-
// 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ],
325-
// 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ]
324+
// 'https://github.com/Expensify/App/pull/9641': 'PauloGasparSv',
325+
// 'https://github.com/Expensify/App/pull/9642': 'mountiny'
326326
// }
327327
const internalQAPRMap = _.reduce(
328328
_.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: CONST.LABELS.INTERNAL_QA}))),
329329
(map, pr) => {
330330
// eslint-disable-next-line no-param-reassign
331-
map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login'));
331+
map[pr.html_url] = pr.merged_by.login;
332332
return map;
333333
},
334334
{},
@@ -363,11 +363,11 @@ class GithubUtils {
363363
if (!_.isEmpty(internalQAPRMap)) {
364364
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
365365
issueBody += '**Internal QA:**\r\n';
366-
_.each(internalQAPRMap, (assignees, URL) => {
367-
const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, '');
366+
_.each(internalQAPRMap, (merger, URL) => {
367+
const mergerMention = `@${merger}`;
368368
issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `;
369369
issueBody += `${URL}`;
370-
issueBody += ` -${assigneeMentions}`;
370+
issueBody += ` - ${mergerMention}`;
371371
issueBody += '\r\n';
372372
});
373373
issueBody += '\r\n\r\n';
@@ -397,7 +397,9 @@ class GithubUtils {
397397
issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`;
398398

399399
issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
400-
return issueBody;
400+
const issueAssignees = _.values(internalQAPRMap);
401+
const issue = {issueBody, issueAssignees};
402+
return issue;
401403
})
402404
.catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err));
403405
}

0 commit comments

Comments
 (0)