Skip to content

Commit 9057baa

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into fix/74735-navigation-transition
2 parents 5520388 + 78f196d commit 9057baa

839 files changed

Lines changed: 47085 additions & 34536 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.

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ USE_REDUX_DEVTOOLS=false
1414
CAPTURE_METRICS=false
1515
ONYX_METRICS=false
1616
USE_THIRD_PARTY_SCRIPTS=false
17+
IS_EXPENSIFY_EMPLOYEE=false
1718

1819
EXPENSIFY_ACCOUNT_ID_ACCOUNTING=-1
1920
EXPENSIFY_ACCOUNT_ID_ACCOUNTS_PAYABLE=-1
@@ -42,3 +43,4 @@ GITHUB_TOKEN=YOUR_TOKEN
4243
OPENAI_API_KEY=YOUR_TOKEN
4344

4445
SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN
46+
SENTRY_ALLOW_FAILURE=true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Get Java version
2+
description: Reads the Java version from .java-version file
3+
4+
outputs:
5+
version:
6+
description: The Java version from .java-version file
7+
value: ${{ steps.getVersion.outputs.VERSION }}
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Get Java version
13+
id: getVersion
14+
shell: bash
15+
run: echo "VERSION=$(cat .java-version | tr -d '\n')" >> "$GITHUB_OUTPUT"

.github/actions/composite/setupNode/action.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ inputs:
66
description: "Indicates if node is set up for hybrid app"
77
required: false
88
default: 'false'
9+
IS_DESKTOP_BUILD:
10+
description: "Indicates if node is set up for desktop app"
11+
required: false
12+
default: 'false'
913

1014
outputs:
1115
cache-hit:
@@ -23,7 +27,9 @@ runs:
2327
with:
2428
node-version-file: '.nvmrc'
2529
cache: npm
26-
cache-dependency-path: normalized-package-lock.json
30+
cache-dependency-path: |
31+
normalized-package-lock.json
32+
desktop/package-lock.json
2733
2834
- id: cache-node-modules
2935
# v4
@@ -40,6 +46,14 @@ runs:
4046
path: Mobile-Expensify/node_modules
4147
key: ${{ runner.os }}-node-modules-${{ hashFiles('Mobile-Expensify/package-lock.json', 'Mobile-Expensify/patches/**') }}
4248

49+
- id: cache-desktop-node-modules
50+
if: inputs.IS_DESKTOP_BUILD == 'true'
51+
# v4
52+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
53+
with:
54+
path: desktop/node_modules
55+
key: ${{ runner.os }}-desktop-node-modules-${{ hashFiles('desktop/package-lock.json', 'desktop/patches/**') }}
56+
4357
- name: Remove ND node_modules if needed for hybrid app build
4458
if: inputs.IS_HYBRID_BUILD == 'true' && steps.cache-node-modules.outputs.cache-hit == 'true' && steps.cache-old-dot-node-modules.outputs.cache-hit != 'true'
4559
shell: bash
@@ -51,4 +65,12 @@ runs:
5165
with:
5266
timeout_minutes: 30
5367
max_attempts: 3
54-
command: npm ci
68+
command: npm ci
69+
70+
- name: Install node packages for desktop submodule
71+
if: inputs.IS_DESKTOP_BUILD == 'true' && steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
72+
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847
73+
with:
74+
timeout_minutes: 30
75+
max_attempts: 3
76+
command: cd desktop && npm ci

.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,23 +164,21 @@ async function run(): Promise<IssuesCreateResponse | void> {
164164
});
165165

166166
// Then make sure we include any demoted or closed blockers as well, and just check them off automatically
167-
// eslint-disable-next-line unicorn/no-array-for-each
168-
currentChecklistData?.deployBlockers.forEach((deployBlocker) => {
167+
for (const deployBlocker of currentChecklistData?.deployBlockers ?? []) {
169168
const isResolved = deployBlockers.findIndex((openBlocker) => openBlocker.number === deployBlocker.number) < 0;
170169
deployBlockers.push({
171170
...deployBlocker,
172171
isResolved,
173172
});
174-
});
173+
}
175174

176175
// Include any existing Mobile-Expensify PRs from the current checklist that aren't in the new merged list
177-
// eslint-disable-next-line unicorn/no-array-for-each
178-
currentChecklistData?.PRListMobileExpensify.forEach((existingPR) => {
176+
for (const existingPR of currentChecklistData?.PRListMobileExpensify ?? []) {
179177
const isAlreadyIncluded = PRListMobileExpensify.findIndex((pr) => pr.number === existingPR.number) >= 0;
180178
if (!isAlreadyIncluded) {
181179
PRListMobileExpensify.push(existingPR);
182180
}
183-
});
181+
}
184182

185183
const didVersionChange = newVersion !== currentChecklistData?.version;
186184
const stagingDeployCashBodyAndAssignees = await GithubUtils.generateStagingDeployCashBodyAndAssignees(

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11674,22 +11674,20 @@ async function run() {
1167411674
};
1167511675
});
1167611676
// Then make sure we include any demoted or closed blockers as well, and just check them off automatically
11677-
// eslint-disable-next-line unicorn/no-array-for-each
11678-
currentChecklistData?.deployBlockers.forEach((deployBlocker) => {
11677+
for (const deployBlocker of currentChecklistData?.deployBlockers ?? []) {
1167911678
const isResolved = deployBlockers.findIndex((openBlocker) => openBlocker.number === deployBlocker.number) < 0;
1168011679
deployBlockers.push({
1168111680
...deployBlocker,
1168211681
isResolved,
1168311682
});
11684-
});
11683+
}
1168511684
// Include any existing Mobile-Expensify PRs from the current checklist that aren't in the new merged list
11686-
// eslint-disable-next-line unicorn/no-array-for-each
11687-
currentChecklistData?.PRListMobileExpensify.forEach((existingPR) => {
11685+
for (const existingPR of currentChecklistData?.PRListMobileExpensify ?? []) {
1168811686
const isAlreadyIncluded = PRListMobileExpensify.findIndex((pr) => pr.number === existingPR.number) >= 0;
1168911687
if (!isAlreadyIncluded) {
1169011688
PRListMobileExpensify.push(existingPR);
1169111689
}
11692-
});
11690+
}
1169311691
const didVersionChange = newVersion !== currentChecklistData?.version;
1169411692
const stagingDeployCashBodyAndAssignees = await GithubUtils_1.default.generateStagingDeployCashBodyAndAssignees(newVersion, PRList.map((pr) => pr.url), PRListMobileExpensify.map((pr) => pr.url), PRList.filter((pr) => pr.isVerified).map((pr) => pr.url), PRListMobileExpensify.filter((pr) => pr.isVerified).map((pr) => pr.url), deployBlockers.map((blocker) => blocker.url), deployBlockers.filter((blocker) => blocker.isResolved).map((blocker) => blocker.url), currentChecklistData?.internalQAPRList.filter((pr) => pr.isResolved).map((pr) => pr.url), didVersionChange ? false : currentChecklistData.isFirebaseChecked, didVersionChange ? false : currentChecklistData.isGHStatusChecked);
1169511693
if (stagingDeployCashBodyAndAssignees) {

.github/actions/javascript/getGraphiteString/getGraphiteString.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ const run = () => {
2323

2424
// Initialize string to store Graphite metrics
2525
let graphiteString = '';
26-
let timestamp: number;
26+
let timestamp: number | null = null;
2727

2828
// Iterate over each entry
29-
// eslint-disable-next-line unicorn/no-array-for-each
30-
regressionEntries.forEach((entry) => {
29+
for (const entry of regressionEntries) {
3130
// Skip empty lines
3231
if (entry.trim() === '') {
33-
return;
32+
continue;
3433
}
3534

3635
try {
@@ -56,7 +55,7 @@ const run = () => {
5655
console.error(error.message);
5756
core.setFailed(error);
5857
}
59-
});
58+
}
6059

6160
// Set generated graphite string to the github variable
6261
core.setOutput('GRAPHITE_STRING', graphiteString);

.github/actions/javascript/getGraphiteString/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,13 +2745,12 @@ const run = () => {
27452745
const regressionEntries = regressionFile.split('\n');
27462746
// Initialize string to store Graphite metrics
27472747
let graphiteString = '';
2748-
let timestamp;
2748+
let timestamp = null;
27492749
// Iterate over each entry
2750-
// eslint-disable-next-line unicorn/no-array-for-each
2751-
regressionEntries.forEach((entry) => {
2750+
for (const entry of regressionEntries) {
27522751
// Skip empty lines
27532752
if (entry.trim() === '') {
2754-
return;
2753+
continue;
27552754
}
27562755
try {
27572756
const current = JSON.parse(entry);
@@ -2773,7 +2772,7 @@ const run = () => {
27732772
console.error(error.message);
27742773
core.setFailed(error);
27752774
}
2776-
});
2775+
}
27772776
// Set generated graphite string to the github variable
27782777
core.setOutput('GRAPHITE_STRING', graphiteString);
27792778
};

.github/actions/javascript/markPullRequestsAsDeployed/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ inputs:
2020
ANDROID:
2121
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
2222
required: true
23+
DESKTOP:
24+
description: "Desktop job result ('success', 'failure', 'cancelled', or 'skipped')"
25+
required: true
2326
IOS:
2427
description: "iOS job result ('success', 'failure', 'cancelled', or 'skipped')"
2528
required: true

.github/actions/javascript/markPullRequestsAsDeployed/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12840,6 +12840,7 @@ async function run() {
1284012840
const isProd = ActionUtils.getJSONInput('IS_PRODUCTION_DEPLOY', { required: true });
1284112841
const version = core.getInput('DEPLOY_VERSION', { required: true });
1284212842
const androidResult = getDeployTableMessage(core.getInput('ANDROID', { required: true }));
12843+
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true }));
1284312844
const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true }));
1284412845
const webResult = getDeployTableMessage(core.getInput('WEB', { required: true }));
1284512846
const date = core.getInput('DATE');
@@ -12851,7 +12852,7 @@ async function run() {
1285112852
message += `on ${date}`;
1285212853
}
1285312854
message += `🚀`;
12854-
message += `\n\nplatform | result\n---|---`;
12855+
message += `\n\nplatform | result\n---|---\n🖥 desktop 🖥|${desktopResult}`;
1285512856
message += `\n🕸 web 🕸|${webResult}`;
1285612857
message += `\n🤖 android 🤖|${androidResult}\n🍎 iOS 🍎|${iOSResult}`;
1285712858
if (note) {

.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async function run() {
103103
const version = core.getInput('DEPLOY_VERSION', {required: true});
104104

105105
const androidResult = getDeployTableMessage(core.getInput('ANDROID', {required: true}) as PlatformResult);
106+
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', {required: true}) as PlatformResult);
106107
const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult);
107108
const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult);
108109

@@ -116,7 +117,7 @@ async function run() {
116117
message += `on ${date}`;
117118
}
118119
message += `🚀`;
119-
message += `\n\nplatform | result\n---|---`;
120+
message += `\n\nplatform | result\n---|---\n🖥 desktop 🖥|${desktopResult}`;
120121
message += `\n🕸 web 🕸|${webResult}`;
121122
message += `\n🤖 android 🤖|${androidResult}\n🍎 iOS 🍎|${iOSResult}`;
122123

0 commit comments

Comments
 (0)