Skip to content

Commit af7732a

Browse files
authored
Merge branch 'Expensify:main' into Make-or-track-payments---policy-changelog
2 parents 5a131a1 + e3cfcaf commit af7732a

342 files changed

Lines changed: 3056 additions & 1998 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.

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15766,7 +15766,7 @@ class GithubUtils {
1576615766
static getStagingDeployCashData(issue) {
1576715767
try {
1576815768
const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g');
15769-
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replace(/`/g, '');
15769+
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replaceAll('`', '');
1577015770
return {
1577115771
title: issue.title,
1577215772
url: issue.url,
@@ -15890,43 +15890,43 @@ class GithubUtils {
1589015890
// PR list
1589115891
if (sortedPRList.length > 0) {
1589215892
issueBody += '**This release contains changes from the following pull requests:**\r\n';
15893-
sortedPRList.forEach((URL) => {
15893+
for (const URL of sortedPRList) {
1589415894
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1589515895
issueBody += ` ${URL}\r\n`;
15896-
});
15896+
}
1589715897
issueBody += '\r\n\r\n';
1589815898
}
1589915899
// Mobile-Expensify PR list
1590015900
if (sortedPRListMobileExpensify.length > 0) {
1590115901
issueBody += '**Mobile-Expensify PRs:**\r\n';
15902-
sortedPRListMobileExpensify.forEach((URL) => {
15902+
for (const URL of sortedPRListMobileExpensify) {
1590315903
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1590415904
issueBody += ` ${URL}\r\n`;
15905-
});
15905+
}
1590615906
issueBody += '\r\n\r\n';
1590715907
}
1590815908
// Internal QA PR list
1590915909
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1591015910
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
1591115911
issueBody += '**Internal QA:**\r\n';
15912-
Object.keys(internalQAPRMap).forEach((URL) => {
15912+
for (const URL of Object.keys(internalQAPRMap)) {
1591315913
const merger = internalQAPRMap[URL];
1591415914
const mergerMention = `@${merger}`;
1591515915
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
1591615916
issueBody += `${URL}`;
1591715917
issueBody += ` - ${mergerMention}`;
1591815918
issueBody += '\r\n';
15919-
});
15919+
}
1592015920
issueBody += '\r\n\r\n';
1592115921
}
1592215922
// Deploy blockers
1592315923
if (deployBlockers.length > 0) {
1592415924
issueBody += '**Deploy Blockers:**\r\n';
15925-
sortedDeployBlockers.forEach((URL) => {
15925+
for (const URL of sortedDeployBlockers) {
1592615926
issueBody += resolvedDeployBlockers.includes(URL) ? '- [x] ' : '- [ ] ';
1592715927
issueBody += URL;
1592815928
issueBody += '\r\n';
15929-
});
15929+
}
1593015930
issueBody += '\r\n\r\n';
1593115931
}
1593215932
issueBody += '**Deployer verifications:**';

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12570,7 +12570,7 @@ class GithubUtils {
1257012570
static getStagingDeployCashData(issue) {
1257112571
try {
1257212572
const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g');
12573-
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replace(/`/g, '');
12573+
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replaceAll('`', '');
1257412574
return {
1257512575
title: issue.title,
1257612576
url: issue.url,
@@ -12694,43 +12694,43 @@ class GithubUtils {
1269412694
// PR list
1269512695
if (sortedPRList.length > 0) {
1269612696
issueBody += '**This release contains changes from the following pull requests:**\r\n';
12697-
sortedPRList.forEach((URL) => {
12697+
for (const URL of sortedPRList) {
1269812698
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1269912699
issueBody += ` ${URL}\r\n`;
12700-
});
12700+
}
1270112701
issueBody += '\r\n\r\n';
1270212702
}
1270312703
// Mobile-Expensify PR list
1270412704
if (sortedPRListMobileExpensify.length > 0) {
1270512705
issueBody += '**Mobile-Expensify PRs:**\r\n';
12706-
sortedPRListMobileExpensify.forEach((URL) => {
12706+
for (const URL of sortedPRListMobileExpensify) {
1270712707
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1270812708
issueBody += ` ${URL}\r\n`;
12709-
});
12709+
}
1271012710
issueBody += '\r\n\r\n';
1271112711
}
1271212712
// Internal QA PR list
1271312713
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1271412714
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
1271512715
issueBody += '**Internal QA:**\r\n';
12716-
Object.keys(internalQAPRMap).forEach((URL) => {
12716+
for (const URL of Object.keys(internalQAPRMap)) {
1271712717
const merger = internalQAPRMap[URL];
1271812718
const mergerMention = `@${merger}`;
1271912719
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
1272012720
issueBody += `${URL}`;
1272112721
issueBody += ` - ${mergerMention}`;
1272212722
issueBody += '\r\n';
12723-
});
12723+
}
1272412724
issueBody += '\r\n\r\n';
1272512725
}
1272612726
// Deploy blockers
1272712727
if (deployBlockers.length > 0) {
1272812728
issueBody += '**Deploy Blockers:**\r\n';
12729-
sortedDeployBlockers.forEach((URL) => {
12729+
for (const URL of sortedDeployBlockers) {
1273012730
issueBody += resolvedDeployBlockers.includes(URL) ? '- [x] ' : '- [ ] ';
1273112731
issueBody += URL;
1273212732
issueBody += '\r\n';
12733-
});
12733+
}
1273412734
issueBody += '\r\n\r\n';
1273512735
}
1273612736
issueBody += '**Deployer verifications:**';

.github/actions/javascript/checkAndroidStatus/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -737313,7 +737313,7 @@ class GithubUtils {
737313737313
static getStagingDeployCashData(issue) {
737314737314
try {
737315737315
const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g');
737316-
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replace(/`/g, '');
737316+
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replaceAll('`', '');
737317737317
return {
737318737318
title: issue.title,
737319737319
url: issue.url,
@@ -737437,43 +737437,43 @@ class GithubUtils {
737437737437
// PR list
737438737438
if (sortedPRList.length > 0) {
737439737439
issueBody += '**This release contains changes from the following pull requests:**\r\n';
737440-
sortedPRList.forEach((URL) => {
737440+
for (const URL of sortedPRList) {
737441737441
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
737442737442
issueBody += ` ${URL}\r\n`;
737443-
});
737443+
}
737444737444
issueBody += '\r\n\r\n';
737445737445
}
737446737446
// Mobile-Expensify PR list
737447737447
if (sortedPRListMobileExpensify.length > 0) {
737448737448
issueBody += '**Mobile-Expensify PRs:**\r\n';
737449-
sortedPRListMobileExpensify.forEach((URL) => {
737449+
for (const URL of sortedPRListMobileExpensify) {
737450737450
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
737451737451
issueBody += ` ${URL}\r\n`;
737452-
});
737452+
}
737453737453
issueBody += '\r\n\r\n';
737454737454
}
737455737455
// Internal QA PR list
737456737456
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
737457737457
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
737458737458
issueBody += '**Internal QA:**\r\n';
737459-
Object.keys(internalQAPRMap).forEach((URL) => {
737459+
for (const URL of Object.keys(internalQAPRMap)) {
737460737460
const merger = internalQAPRMap[URL];
737461737461
const mergerMention = `@${merger}`;
737462737462
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
737463737463
issueBody += `${URL}`;
737464737464
issueBody += ` - ${mergerMention}`;
737465737465
issueBody += '\r\n';
737466-
});
737466+
}
737467737467
issueBody += '\r\n\r\n';
737468737468
}
737469737469
// Deploy blockers
737470737470
if (deployBlockers.length > 0) {
737471737471
issueBody += '**Deploy Blockers:**\r\n';
737472-
sortedDeployBlockers.forEach((URL) => {
737472+
for (const URL of sortedDeployBlockers) {
737473737473
issueBody += resolvedDeployBlockers.includes(URL) ? '- [x] ' : '- [ ] ';
737474737474
issueBody += URL;
737475737475
issueBody += '\r\n';
737476-
});
737476+
}
737477737477
issueBody += '\r\n\r\n';
737478737478
}
737479737479
issueBody += '**Deployer verifications:**';

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11837,7 +11837,7 @@ class GithubUtils {
1183711837
static getStagingDeployCashData(issue) {
1183811838
try {
1183911839
const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g');
11840-
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replace(/`/g, '');
11840+
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replaceAll('`', '');
1184111841
return {
1184211842
title: issue.title,
1184311843
url: issue.url,
@@ -11961,43 +11961,43 @@ class GithubUtils {
1196111961
// PR list
1196211962
if (sortedPRList.length > 0) {
1196311963
issueBody += '**This release contains changes from the following pull requests:**\r\n';
11964-
sortedPRList.forEach((URL) => {
11964+
for (const URL of sortedPRList) {
1196511965
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1196611966
issueBody += ` ${URL}\r\n`;
11967-
});
11967+
}
1196811968
issueBody += '\r\n\r\n';
1196911969
}
1197011970
// Mobile-Expensify PR list
1197111971
if (sortedPRListMobileExpensify.length > 0) {
1197211972
issueBody += '**Mobile-Expensify PRs:**\r\n';
11973-
sortedPRListMobileExpensify.forEach((URL) => {
11973+
for (const URL of sortedPRListMobileExpensify) {
1197411974
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
1197511975
issueBody += ` ${URL}\r\n`;
11976-
});
11976+
}
1197711977
issueBody += '\r\n\r\n';
1197811978
}
1197911979
// Internal QA PR list
1198011980
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
1198111981
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
1198211982
issueBody += '**Internal QA:**\r\n';
11983-
Object.keys(internalQAPRMap).forEach((URL) => {
11983+
for (const URL of Object.keys(internalQAPRMap)) {
1198411984
const merger = internalQAPRMap[URL];
1198511985
const mergerMention = `@${merger}`;
1198611986
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
1198711987
issueBody += `${URL}`;
1198811988
issueBody += ` - ${mergerMention}`;
1198911989
issueBody += '\r\n';
11990-
});
11990+
}
1199111991
issueBody += '\r\n\r\n';
1199211992
}
1199311993
// Deploy blockers
1199411994
if (deployBlockers.length > 0) {
1199511995
issueBody += '**Deploy Blockers:**\r\n';
11996-
sortedDeployBlockers.forEach((URL) => {
11996+
for (const URL of sortedDeployBlockers) {
1199711997
issueBody += resolvedDeployBlockers.includes(URL) ? '- [x] ' : '- [ ] ';
1199811998
issueBody += URL;
1199911999
issueBody += '\r\n';
12000-
});
12000+
}
1200112001
issueBody += '\r\n\r\n';
1200212002
}
1200312003
issueBody += '**Deployer verifications:**';

.github/actions/javascript/checkSVGCompression/index.js

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20362,7 +20362,7 @@ class GithubUtils {
2036220362
static getStagingDeployCashData(issue) {
2036320363
try {
2036420364
const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g');
20365-
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replace(/`/g, '');
20365+
const version = (issue.body?.match(versionRegex)?.[0] ?? '').replaceAll('`', '');
2036620366
return {
2036720367
title: issue.title,
2036820368
url: issue.url,
@@ -20486,43 +20486,43 @@ class GithubUtils {
2048620486
// PR list
2048720487
if (sortedPRList.length > 0) {
2048820488
issueBody += '**This release contains changes from the following pull requests:**\r\n';
20489-
sortedPRList.forEach((URL) => {
20489+
for (const URL of sortedPRList) {
2049020490
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
2049120491
issueBody += ` ${URL}\r\n`;
20492-
});
20492+
}
2049320493
issueBody += '\r\n\r\n';
2049420494
}
2049520495
// Mobile-Expensify PR list
2049620496
if (sortedPRListMobileExpensify.length > 0) {
2049720497
issueBody += '**Mobile-Expensify PRs:**\r\n';
20498-
sortedPRListMobileExpensify.forEach((URL) => {
20498+
for (const URL of sortedPRListMobileExpensify) {
2049920499
issueBody += verifiedOrNoQAPRs.has(URL) ? '- [x]' : '- [ ]';
2050020500
issueBody += ` ${URL}\r\n`;
20501-
});
20501+
}
2050220502
issueBody += '\r\n\r\n';
2050320503
}
2050420504
// Internal QA PR list
2050520505
if (!(0, isEmptyObject_1.isEmptyObject)(internalQAPRMap)) {
2050620506
console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs);
2050720507
issueBody += '**Internal QA:**\r\n';
20508-
Object.keys(internalQAPRMap).forEach((URL) => {
20508+
for (const URL of Object.keys(internalQAPRMap)) {
2050920509
const merger = internalQAPRMap[URL];
2051020510
const mergerMention = `@${merger}`;
2051120511
issueBody += `${resolvedInternalQAPRs.includes(URL) ? '- [x]' : '- [ ]'} `;
2051220512
issueBody += `${URL}`;
2051320513
issueBody += ` - ${mergerMention}`;
2051420514
issueBody += '\r\n';
20515-
});
20515+
}
2051620516
issueBody += '\r\n\r\n';
2051720517
}
2051820518
// Deploy blockers
2051920519
if (deployBlockers.length > 0) {
2052020520
issueBody += '**Deploy Blockers:**\r\n';
20521-
sortedDeployBlockers.forEach((URL) => {
20521+
for (const URL of sortedDeployBlockers) {
2052220522
issueBody += resolvedDeployBlockers.includes(URL) ? '- [x] ' : '- [ ] ';
2052320523
issueBody += URL;
2052420524
issueBody += '\r\n';
20525-
});
20525+
}
2052620526
issueBody += '\r\n\r\n';
2052720527
}
2052820528
issueBody += '**Deployer verifications:**';
@@ -21042,7 +21042,9 @@ function validateSvgFiles(filePaths) {
2104221042
}
2104321043
if (errors.length) {
2104421044
console.error('Validation errors:');
21045-
errors.forEach((error) => console.error(` ${error}`));
21045+
for (const error of errors) {
21046+
console.error(` ${error}`);
21047+
}
2104621048
throw new Error('SVG file validation failed');
2104721049
}
2104821050
return validFiles;
@@ -21073,19 +21075,19 @@ function logIgnoredFiles(ignoredFiles) {
2107321075
return;
2107421076
}
2107521077
console.log('\nFiles skipped (ignore-compression):');
21076-
ignoredFiles.forEach((filePath) => {
21078+
for (const filePath of ignoredFiles) {
2107721079
console.log(`${filePath}: ⏭️ Skipped`);
21078-
});
21080+
}
2107921081
}
2108021082
function logSummary(summary) {
2108121083
const { totalFiles, totalCompressedFilesLength, totalOriginalSize, totalCompressedSize, totalSavings, totalSavingsPercent, results, ignoredFiles } = summary;
2108221084
logIgnoredFiles(ignoredFiles);
2108321085
if (totalCompressedFilesLength) {
2108421086
console.log('\nFiles compressed:');
21085-
results.forEach((result) => {
21087+
for (const result of results) {
2108621088
const { compressedSize, originalSize, savings, savingsPercent, filePath } = result;
2108721089
if (!result.savings) {
21088-
return;
21090+
continue;
2108921091
}
2109021092
const prefix = `${filePath}: ✅`;
2109121093
console.log(getSummarySavingString({
@@ -21095,7 +21097,7 @@ function logSummary(summary) {
2109521097
savings,
2109621098
savingsPercent,
2109721099
}));
21098-
});
21100+
}
2109921101
const ignoreFilesLength = ignoredFiles.length;
2110021102
console.log(`\nFiles processed: ${totalFiles}`);
2110121103
console.log(`Files already properly compressed: ${totalFiles - ignoreFilesLength - totalCompressedFilesLength}`);
@@ -21116,10 +21118,10 @@ function logSummary(summary) {
2111621118
function logSummaryCheck(summary) {
2111721119
const { totalFiles, totalCompressedFilesLength, results, ignoredFiles } = summary;
2111821120
console.log('');
21119-
results.forEach((result) => {
21121+
for (const result of results) {
2112021122
const { filePath, savings } = result;
2112121123
console.log(`${filePath}: ${savings > 0 ? 'Not properly compressed ❌' : 'Compressed ✅'}`);
21122-
});
21124+
}
2112321125
logIgnoredFiles(ignoredFiles);
2112421126
console.log(`\nFiles processed: ${totalFiles}`);
2112521127
console.log(`Files ignored: ${ignoredFiles.length}`);

0 commit comments

Comments
 (0)