Skip to content

Commit 2b2fd86

Browse files
committed
Merge branch 'main' of https://github.com/Expensify/App into feat/#Expensify#23229-linking
2 parents 65edb74 + 09e3d0d commit 2b2fd86

File tree

187 files changed

+2262
-1443
lines changed

Some content is hidden

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

187 files changed

+2262
-1443
lines changed

.github/actions/composite/buildAndroidAPK/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313

1414
- uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7
1515
with:
16-
ruby-version: '2.7'
16+
ruby-version: "2.7"
1717
bundler-cache: true
1818

1919
- uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef
@@ -26,4 +26,4 @@ runs:
2626
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
2727
with:
2828
name: ${{ inputs.ARTIFACT_NAME }}
29-
path: android/app/build/outputs/apk/e2eRelease/app-e2eRelease.apk
29+
path: android/app/build/outputs/apk/e2e/release/app-e2e-release.apk

.github/actions/composite/setupGitForOSBotify/action.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
name: 'Setup Git for OSBotify'
2-
description: 'Setup Git for OSBotify'
1+
name: "Setup Git for OSBotify"
2+
description: "Setup Git for OSBotify"
33

44
inputs:
55
GPG_PASSPHRASE:
6-
description: 'Passphrase used to decrypt GPG key'
6+
description: "Passphrase used to decrypt GPG key"
7+
required: true
8+
OS_BOTIFY_APP_ID:
9+
description: "Application ID for OS Botify"
10+
required: true
11+
OS_BOTIFY_PRIVATE_KEY:
12+
description: "OS Botify's private key"
713
required: true
814

15+
outputs:
16+
# Do not try to use this for committing code. Use `secrets.OS_BOTIFY_COMMIT_TOKEN` instead
17+
OS_BOTIFY_API_TOKEN:
18+
description: Token to use for GitHub API interactions.
19+
value: ${{ steps.generateToken.outputs.token }}
20+
921
runs:
1022
using: composite
1123
steps:
@@ -29,3 +41,10 @@ runs:
2941
shell: bash
3042
if: runner.debug == '1'
3143
run: echo "GIT_TRACE=true" >> "$GITHUB_ENV"
44+
45+
- name: Generate a token
46+
id: generateToken
47+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
48+
with:
49+
app_id: ${{ inputs.OS_BOTIFY_APP_ID }}
50+
private_key: ${{ inputs.OS_BOTIFY_PRIVATE_KEY }}

.github/actions/javascript/getPullRequestDetails/action.yml

+6
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ inputs:
1313
outputs:
1414
MERGE_COMMIT_SHA:
1515
description: 'The merge_commit_sha of the given pull request'
16+
HEAD_COMMIT_SHA:
17+
description: 'The head_commit_sha of the given pull request'
1618
MERGE_ACTOR:
1719
description: 'The actor who merged the pull request'
20+
IS_MERGED:
21+
description: 'True if the pull request is merged'
22+
FORKED_REPO_URL:
23+
description: 'Output forked repo URL if PR includes changes from a fork'
1824
runs:
1925
using: 'node16'
2026
main: './index.js'

.github/workflows/cherryPick.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ jobs:
4444
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
4545
with:
4646
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
47+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
48+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
4749

4850
- name: Get previous app version
4951
id: getPreviousVersion
5052
uses: Expensify/App/.github/actions/javascript/getPreviousVersion@main
5153
with:
52-
SEMVER_LEVEL: 'PATCH'
54+
SEMVER_LEVEL: "PATCH"
5355

5456
- name: Fetch history of relevant refs
5557
run: |
@@ -119,7 +121,7 @@ jobs:
119121
env:
120122
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
121123

122-
- name: 'Announces a CP failure in the #announce Slack room'
124+
- name: "Announces a CP failure in the #announce Slack room"
123125
uses: 8398a7/action-slack@v3
124126
if: ${{ failure() }}
125127
with:

.github/workflows/createNewVersion.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ on:
2626
LARGE_SECRET_PASSPHRASE:
2727
description: Passphrase used to decrypt GPG key
2828
required: true
29-
OS_BOTIFY_TOKEN:
30-
description: Token for the OSBotify user
31-
required: true
3229
SLACK_WEBHOOK:
3330
description: Webhook used to comment in slack
3431
required: true
32+
OS_BOTIFY_COMMIT_TOKEN:
33+
description: OSBotify personal access token, used to workaround committing to protected branch
34+
required: true
35+
OS_BOTIFY_APP_ID:
36+
description: Application ID for OS Botify App
37+
required: true
38+
OS_BOTIFY_PRIVATE_KEY:
39+
description: OSBotify private key
40+
required: true
3541

3642
jobs:
3743
validateActor:
@@ -43,7 +49,7 @@ jobs:
4349
id: getUserPermissions
4450
run: echo "PERMISSION=$(gh api /repos/${{ github.repository }}/collaborators/${{ github.actor }}/permission | jq -r '.permission')" >> "$GITHUB_OUTPUT"
4551
env:
46-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
52+
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
4753

4854
createNewVersion:
4955
runs-on: macos-latest
@@ -65,18 +71,23 @@ jobs:
6571
uses: actions/checkout@v3
6672
with:
6773
ref: main
68-
token: ${{ secrets.OS_BOTIFY_TOKEN }}
74+
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
75+
# This is a workaround to allow pushes to a protected branch
76+
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
6977

7078
- name: Setup git for OSBotify
7179
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
80+
id: setupGitForOSBotify
7281
with:
7382
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
83+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
84+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
7485

7586
- name: Generate version
7687
id: bumpVersion
7788
uses: Expensify/App/.github/actions/javascript/bumpVersion@main
7889
with:
79-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
90+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
8091
SEMVER_LEVEL: ${{ inputs.SEMVER_LEVEL }}
8192

8293
- name: Commit new version

.github/workflows/deploy.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.ref == 'refs/heads/staging'
1111
steps:
12+
- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
13+
id: setupGitForOSBotify
14+
with:
15+
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
16+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
17+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
18+
1219
- name: Checkout staging branch
1320
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
1421
with:
1522
ref: staging
16-
token: ${{ secrets.OS_BOTIFY_TOKEN }}
17-
18-
- name: Setup git for OSBotify
19-
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
20-
with:
21-
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
23+
token: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
2224

2325
- name: Tag version
2426
run: git tag "$(npm run print-version --silent)"
@@ -30,11 +32,19 @@ jobs:
3032
runs-on: ubuntu-latest
3133
if: github.ref == 'refs/heads/production'
3234
steps:
35+
- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
36+
id: setupGitForOSBotify
37+
with:
38+
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
39+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
40+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
41+
42+
- uses: actions/checkout@v3
3343
- name: Checkout
3444
uses: actions/checkout@v3
3545
with:
3646
ref: production
37-
token: ${{ secrets.OS_BOTIFY_TOKEN }}
47+
token: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
3848

3949
- name: Setup git for OSBotify
4050
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
@@ -49,7 +59,7 @@ jobs:
4959
uses: Expensify/App/.github/actions/javascript/getDeployPullRequestList@main
5060
with:
5161
TAG: ${{ env.PRODUCTION_VERSION }}
52-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
62+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
5363
IS_PRODUCTION_DEPLOY: true
5464

5565
- name: Generate Release Body
@@ -64,4 +74,4 @@ jobs:
6474
tag_name: ${{ env.PRODUCTION_VERSION }}
6575
body: ${{ steps.getReleaseBody.outputs.RELEASE_BODY }}
6676
env:
67-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
77+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}

.github/workflows/e2ePerformanceTests.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@ jobs:
8484
- name: Unmerged PR - Fetch head ref of unmerged PR
8585
if: ${{ !fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) }}
8686
run: |
87-
if [[ ${{ steps.getPullRequestDetails.outputs.FORKED_REPO_URL }} != '' ]]; then
88-
git remote add pr_remote ${{ steps.getPullRequestDetails.outputs.FORKED_REPO_URL }}
89-
git fetch pr_remote ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }} --no-tags --depth=1
90-
else
91-
git fetch origin ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }} --no-tags --depth=1
92-
fi
87+
git fetch origin ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }} --no-tags --depth=1
9388
9489
- name: Unmerged PR - Set dummy git credentials before merging
9590
if: ${{ !fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) }}
@@ -101,7 +96,7 @@ jobs:
10196
if: ${{ !fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) }}
10297
id: getMergeCommitShaIfUnmergedPR
10398
run: |
104-
git merge --no-commit ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }}
99+
git merge --allow-unrelated-histories --no-commit ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }}
105100
git checkout ${{ steps.getPullRequestDetails.outputs.HEAD_COMMIT_SHA }}
106101
env:
107102
GITHUB_TOKEN: ${{ github.token }}
@@ -140,18 +135,19 @@ jobs:
140135
name: baseline-apk-${{ needs.buildBaseline.outputs.VERSION }}
141136
path: zip
142137

143-
# The downloaded artifact will be a file named "app-e2eRelease.apk" so we have to rename it
138+
# The downloaded artifact will be a file named "app-e2e-release.apk" so we have to rename it
144139
- name: Rename baseline APK
145-
run: mv "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease.apk" "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease-baseline.apk"
140+
run: mv "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2e-release.apk" "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease-baseline.apk"
146141

147142
- name: Download delta APK
148143
uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
144+
id: downloadDeltaAPK
149145
with:
150146
name: delta-apk-${{ needs.buildDelta.outputs.DELTA_REF }}
151147
path: zip
152148

153149
- name: Rename delta APK
154-
run: mv "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease.apk" "${{steps.downloadBaselineAPK.outputs.download-path}}/app-e2eRelease-compare.apk"
150+
run: mv "${{steps.downloadDeltaAPK.outputs.download-path}}/app-e2e-release.apk" "${{steps.downloadDeltaAPK.outputs.download-path}}/app-e2eRelease-compare.apk"
155151

156152
- name: Copy e2e code into zip folder
157153
run: cp -r tests/e2e zip

.github/workflows/finishReleaseCycle.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ jobs:
1212
outputs:
1313
isValid: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && !fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }}
1414
steps:
15+
- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
16+
id: setupGitForOSBotify
17+
with:
18+
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
19+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
20+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
21+
1522
- name: Validate actor is deployer
1623
id: isDeployer
1724
run: |
@@ -21,13 +28,13 @@ jobs:
2128
echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT"
2229
fi
2330
env:
24-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
31+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
2532

2633
- name: Reopen and comment on issue (not a team member)
2734
if: ${{ !fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }}
2835
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
2936
with:
30-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
37+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
3138
ISSUE_NUMBER: ${{ github.event.issue.number }}
3239
COMMENT: |
3340
Sorry, only members of @Expensify/Mobile-Deployers can close deploy checklists.
@@ -38,14 +45,14 @@ jobs:
3845
id: checkDeployBlockers
3946
uses: Expensify/App/.github/actions/javascript/checkDeployBlockers@main
4047
with:
41-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
48+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
4249
ISSUE_NUMBER: ${{ github.event.issue.number }}
4350

4451
- name: Reopen and comment on issue (has blockers)
4552
if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS || 'false') }}
4653
uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main
4754
with:
48-
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
55+
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
4956
ISSUE_NUMBER: ${{ github.event.issue.number }}
5057
COMMENT: |
5158
This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval.
@@ -70,9 +77,12 @@ jobs:
7077
token: ${{ secrets.OS_BOTIFY_TOKEN }}
7178

7279
- name: Setup Git for OSBotify
80+
id: setupGitForOSBotify
7381
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
7482
with:
7583
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
84+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
85+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
7686

7787
- name: Update production branch
7888
run: |
@@ -112,6 +122,8 @@ jobs:
112122
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
113123
with:
114124
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
125+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
126+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
115127

116128
- name: Update staging branch to trigger staging deploy
117129
run: |

.github/workflows/preDeploy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ jobs:
9595
uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main
9696
with:
9797
GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }}
98+
OS_BOTIFY_APP_ID: ${{ secrets.OS_BOTIFY_APP_ID }}
99+
OS_BOTIFY_PRIVATE_KEY: ${{ secrets.OS_BOTIFY_PRIVATE_KEY }}
98100

99101
- name: Update staging branch from main
100102
run: |

.storybook/preview.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import './fonts.css';
66
import ComposeProviders from '../src/components/ComposeProviders';
77
import HTMLEngineProvider from '../src/components/HTMLEngineProvider';
88
import OnyxProvider from '../src/components/OnyxProvider';
9-
import {LocaleContextProvider} from '../src/components/withLocalize';
9+
import {LocaleContextProvider} from '../src/components/LocaleContextProvider';
1010
import {KeyboardStateProvider} from '../src/components/withKeyboardState';
1111
import {EnvironmentProvider} from '../src/components/withEnvironment';
1212
import {WindowDimensionsProvider} from '../src/components/withWindowDimensions';

.well-known/apple-app-site-association

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@
7575
{
7676
"/": "/teachersunite/*",
7777
"comment": "Teachers Unite!"
78+
},
79+
{
80+
"/": "/search/*",
81+
"comment": "Search"
7882
}
7983
]
8084
}

android/app/build.gradle

+14-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ project.ext.envConfigFiles = [
5858
adhocRelease: ".env.adhoc",
5959
developmentRelease: ".env",
6060
developmentDebug: ".env",
61-
e2eRelease: ".env.production"
61+
e2eRelease: "tests/e2e/.env.e2e"
6262
]
6363

6464
/**
@@ -90,8 +90,8 @@ android {
9090
minSdkVersion rootProject.ext.minSdkVersion
9191
targetSdkVersion rootProject.ext.targetSdkVersion
9292
multiDexEnabled rootProject.ext.multiDexEnabled
93-
versionCode 1001037403
94-
versionName "1.3.74-3"
93+
versionCode 1001037508
94+
versionName "1.3.75-8"
9595
}
9696

9797
flavorDimensions "default"
@@ -136,10 +136,20 @@ android {
136136
signingConfig signingConfigs.debug
137137
}
138138
release {
139-
signingConfig signingConfigs.release
140139
productFlavors.production.signingConfig signingConfigs.release
141140
minifyEnabled enableProguardInReleaseBuilds
142141
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
142+
143+
signingConfig null
144+
// buildTypes take precedence over productFlavors when it comes to the signing configuration,
145+
// thus we need to manually set the signing config, so that the e2e uses the debug config again.
146+
// In other words, the signingConfig setting above will be ignored when we build the flavor in release mode.
147+
productFlavors.all { flavor ->
148+
// All release builds should be signed with the release config ...
149+
flavor.signingConfig signingConfigs.release
150+
}
151+
// ... except for the e2e flavor, which we maybe want to build locally:
152+
productFlavors.e2e.signingConfig signingConfigs.debug
143153
}
144154
}
145155

0 commit comments

Comments
 (0)