Skip to content

Commit 17be7f2

Browse files
author
Nabi Ebrahimi
committed
Merge branch 'main' into fix/map-preview-resize
2 parents b64fde1 + 2bc400a commit 17be7f2

916 files changed

Lines changed: 52230 additions & 34556 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

.github/ISSUE_TEMPLATE/Standard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ___
1010
**Version Number:**
1111
**Reproducible in staging?:**
1212
**Reproducible in production?:**
13-
**If this was caught during regression testing, add the test name, ID and link from TestRail:**
13+
**If this was caught during regression testing, add the test name, ID and link from BrowserStack:**
1414
**Email or phone of affected tester (no customers):**
1515
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
1616
**Expensify/Expensify Issue URL:**
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/getPullRequestIncrementalChanges/index.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12746,6 +12746,24 @@ class Git {
1274612746
hasChanges: files.length > 0,
1274712747
};
1274812748
}
12749+
/**
12750+
* Check if a file from a Git diff is added.
12751+
*
12752+
* @param file - The file to check
12753+
* @returns true if the file is added, false otherwise
12754+
*/
12755+
static isAddedDiffFile(file) {
12756+
const hasAddedLines = file.addedLines.size > 0;
12757+
const hasModifiedLines = file.modifiedLines.size > 0;
12758+
const hasRemovedLines = file.removedLines.size > 0;
12759+
if (!hasAddedLines || hasModifiedLines || hasRemovedLines) {
12760+
return false;
12761+
}
12762+
if (file.hunks.length === 1 && file.hunks.at(0)?.oldStart === 0 && file.hunks.at(0)?.oldCount === 0) {
12763+
return true;
12764+
}
12765+
return false;
12766+
}
1274912767
/**
1275012768
* Calculate the line number for a diff line based on the hunk and line type.
1275112769
*/

.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

0 commit comments

Comments
 (0)