Skip to content

Commit a6d2a1a

Browse files
committed
Merge branch 'main' into fix/45896
2 parents 9135bd0 + 7ef3254 commit a6d2a1a

File tree

419 files changed

+9073
-4966
lines changed

Some content is hidden

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

419 files changed

+9073
-4966
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ EXPENSIFY_ACCOUNT_ID_RECEIPTS=-1
3030
EXPENSIFY_ACCOUNT_ID_REWARDS=-1
3131
EXPENSIFY_ACCOUNT_ID_STUDENT_AMBASSADOR=-1
3232
EXPENSIFY_ACCOUNT_ID_SVFG=-1
33+
EXPENSIFY_ACCOUNT_ID_MANAGER_MCTEST=-1
3334

3435
FB_API_KEY=YOUR_API_KEY
3536
FB_APP_ID=YOUR_APP_ID

.env.staging

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66
66
PUSHER_APP_KEY=268df511a204fbb60884
77
USE_WEB_PROXY=false
88
ENVIRONMENT=staging
9-
SEND_CRASH_REPORTS=true
9+
SEND_CRASH_REPORTS=true

.eslintrc.changed.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ module.exports = {
2020
],
2121
},
2222
overrides: [
23-
{
24-
files: ['src/pages/workspace/WorkspaceInitialPage.tsx', 'src/pages/home/report/PureReportActionItem.tsx', 'src/libs/SidebarUtils.ts'],
25-
rules: {
26-
'rulesdir/no-default-id-values': 'off',
27-
},
28-
},
2923
{
3024
files: ['**/libs/**/*.{ts,tsx}'],
3125
rules: {

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ const restrictedImportPaths = [
8787
importNames: ['memoize'],
8888
message: "Please use '@src/libs/memoize' instead.",
8989
},
90+
{
91+
name: 'react-native-animatable',
92+
message: "Please use 'react-native-reanimated' instead.",
93+
},
9094
];
9195

9296
const restrictedImportPatterns = [

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ runs:
3131
uses: actions/cache@v4
3232
with:
3333
path: node_modules
34-
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json', 'patches/**') }}
35-
34+
key: ${{ inputs.IS_HYBRID_BUILD == 'true' && format('{0}-node-modules-{1}', runner.os, hashFiles('package-lock.json', 'patches/**', 'Mobile-Expensify/patches/**')) || format('{0}-node-modules-{1}', runner.os, hashFiles('package-lock.json', 'patches/**'))}}
35+
3636
- id: cache-old-dot-node-modules
3737
if: inputs.IS_HYBRID_BUILD == 'true'
3838
uses: actions/cache@v4

.github/scripts/checkParser.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
ROOT_DIR=$(dirname "$(dirname "$(dirname "${BASH_SOURCE[0]}")")")
6+
cd "$ROOT_DIR" || exit 1
7+
8+
autocomplete_parser_backup="src/libs/SearchParser/autocompleteParser.js.bak"
9+
search_parser_backup="src/libs/SearchParser/searchParser.js.bak"
10+
11+
#Copying the current .js parser files
12+
cp src/libs/SearchParser/autocompleteParser.js "$autocomplete_parser_backup" 2>/dev/null
13+
cp src/libs/SearchParser/searchParser.js "$search_parser_backup" 2>/dev/null
14+
15+
#Running the scripts that generate the .js parser files
16+
npm run generate-search-parser
17+
npm run generate-autocomplete-parser
18+
19+
#Checking if the saved files differ from the newly generated
20+
if ! diff -q "$autocomplete_parser_backup" src/libs/SearchParser/autocompleteParser.js >/dev/null ||
21+
! diff -q "$search_parser_backup" src/libs/SearchParser/searchParser.js >/dev/null; then
22+
echo "The files generated from the .peggy files using the commands: generate-search-parser and generate-autocomplete-parser are not identical to those currently on this branch."
23+
echo "The parser .js files should never be edited manually. Make sure you’ve run locally: npm run generate-search-parser and npm run generate-autocomplete-parser, and committed the changes."
24+
exit 1
25+
else
26+
echo "The files generated from the .peggy files using the commands: generate-search-parser and generate-autocomplete-parser are identical to those currently on this branch."
27+
exit 0
28+
fi

.github/workflows/cherryPick.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
with:
4040
ref: staging
4141
token: ${{ secrets.OS_BOTIFY_TOKEN }}
42+
submodules: true
4243

4344
- name: Set up git for OSBotify
4445
id: setupGitForOSBotify
@@ -85,14 +86,13 @@ jobs:
8586
if git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}; then
8687
echo "🎉 No conflicts! CP was a success, PR can be automerged 🎉"
8788
echo "HAS_CONFLICTS=false" >> "$GITHUB_OUTPUT"
89+
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(CP triggered by ${{ github.actor }})"
8890
else
8991
echo "😞 PR can't be automerged, there are merge conflicts in the following files:"
9092
git --no-pager diff --name-only --diff-filter=U
91-
git add .
92-
GIT_MERGE_AUTOEDIT=no git cherry-pick --continue
93+
git cherry-pick --abort
9394
echo "HAS_CONFLICTS=true" >> "$GITHUB_OUTPUT"
9495
fi
95-
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(CP triggered by ${{ github.actor }})"
9696
9797
- name: Push changes
9898
run: |
@@ -109,19 +109,38 @@ jobs:
109109
run: |
110110
gh pr create \
111111
--title "🍒 Cherry pick PR #${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒" \
112-
--body "🍒 Cherry pick https://github.com/Expensify/App/pull/${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒" \
112+
--body \
113+
"🍒 Cherry pick https://github.com/Expensify/App/pull/${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒
114+
This PR had conflicts when we tried to cherry-pick it to staging. You'll need to manually perform the cherry-pick, using the following steps:
115+
116+
\`\`\`bash
117+
git fetch
118+
git checkout ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}
119+
git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}
120+
\`\`\`
121+
122+
Then manually resolve conflicts, and commit the change with \`git cherry-pick --continue\`. Lastly, please run:
123+
124+
\`\`\`bash
125+
git commit --amend -m \"$(git log -1 --pretty=%B)\" -m \"(CP triggered by ${{ github.actor }})\"
126+
\`\`\`
127+
128+
That will help us keep track of who triggered this CP. Once all that's done, push your changes with \`git push origin ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }}\`, and then open this PR for review.
129+
130+
Note that you **must** test this PR, and both the author and reviewer checklist should be completed, just as if you were merging the PR to main." \
113131
--label "Engineering,Hourly" \
114132
--base "staging"
115133
sleep 5
116134
gh pr comment --body \
117135
"This pull request has merge conflicts and can not be automatically merged. :disappointed:
118136
Please manually resolve the conflicts, push your changes, and then request another reviewer to review and merge.
119137
**Important:** There may be conflicts that GitHub is not able to detect, so please _carefully_ review this pull request before approving."
120-
gh pr edit --add-assignee "${{ github.actor }},${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }}"
138+
ORIGINAL_PR_AUTHOR="$(gh pr view ${{ github.event.inputs.PULL_REQUEST_NUMBER }} --json author --jq .author.login)"
139+
gh pr edit --add-assignee "${{ github.actor }},${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }},$ORIGINAL_PR_AUTHOR"
121140
env:
122141
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
123142

124-
- name: Label PR with CP Staging
143+
- name: Label original PR with CP Staging
125144
run: gh pr edit ${{ inputs.PULL_REQUEST_NUMBER }} --add-label 'CP Staging'
126145
env:
127146
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/commentOnNativeFileChanged.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Build and profile Android apps
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
buildHybridAppAndroid:
8+
name: Build HybridApp Android
9+
runs-on: ubuntu-latest-xl
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
16+
17+
- name: Update submodule to match main
18+
run: |
19+
git submodule update --init --remote
20+
cd Mobile-Expensify
21+
git fetch
22+
git checkout main
23+
24+
- name: Configure MapBox SDK
25+
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
26+
27+
- name: Setup Node
28+
id: setup-node
29+
uses: ./.github/actions/composite/setupNode
30+
with:
31+
IS_HYBRID_BUILD: 'true'
32+
33+
- name: Run grunt build
34+
run: |
35+
cd Mobile-Expensify
36+
npm run grunt:build:shared
37+
38+
- name: Setup Java
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: 'oracle'
42+
java-version: '17'
43+
44+
- name: Setup Ruby
45+
uses: ruby/[email protected]
46+
with:
47+
bundler-cache: true
48+
49+
- name: Install New Expensify Gems
50+
run: bundle install
51+
52+
- name: Install 1Password CLI
53+
uses: 1password/install-cli-action@v1
54+
55+
- name: Load files from 1Password
56+
env:
57+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
58+
run: |
59+
op document get --output ./upload-key.keystore upload-key.keystore
60+
op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json
61+
# Copy the keystore to the Android directory for Fullstory
62+
cp ./upload-key.keystore Mobile-Expensify/Android
63+
64+
- name: Load Android upload keystore credentials from 1Password
65+
id: load-credentials
66+
uses: 1password/load-secrets-action@v2
67+
with:
68+
export-env: false
69+
env:
70+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
71+
ANDROID_UPLOAD_KEYSTORE_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD
72+
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS
73+
ANDROID_UPLOAD_KEY_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD
74+
75+
- name: Build Android Release
76+
working-directory: Mobile-Expensify/Android
77+
run: |
78+
./gradlew --profile assembleRelease \
79+
-Pandroid.injected.signing.store.file="./upload-key.keystore" \
80+
-Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \
81+
-Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \
82+
-Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }}
83+
84+
echo "Printing Gradle profile report:"
85+
# Print the latest generated profile report
86+
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
87+
cat "$PROFILE_REPORT"
88+
89+
buildStandaloneAndroid:
90+
name: Build Standalone Android
91+
runs-on: ubuntu-latest-xl
92+
steps:
93+
- name: Checkout
94+
uses: actions/checkout@v4
95+
with:
96+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
97+
98+
- name: Configure MapBox SDK
99+
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }}
100+
101+
- name: Setup Node
102+
id: setup-node
103+
uses: ./.github/actions/composite/setupNode
104+
with:
105+
IS_HYBRID_BUILD: 'false'
106+
107+
- name: Decrypt keystore to sign the APK/AAB
108+
run: gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg
109+
working-directory: android/app
110+
111+
- name: Build Android Release
112+
working-directory: android
113+
env:
114+
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }}
115+
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
116+
run: |
117+
./gradlew --profile assembleProductionRelease
118+
119+
echo "Printing Gradle profile report:"
120+
# Print the latest generated profile report
121+
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f)
122+
cat "$PROFILE_REPORT"

0 commit comments

Comments
 (0)