Skip to content

Commit 4532e8f

Browse files
Merge branch 'main' of github.com:Expensify/App into feat/57562-localize-onboarding-tasks
2 parents b9d21bc + f223c8f commit 4532e8f

470 files changed

Lines changed: 14016 additions & 6174 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.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ web/gtm.js
1414
src/libs/SearchParser/searchParser.js
1515
src/libs/SearchParser/autocompleteParser.js
1616
help/_scripts/**
17+
modules/ExpensifyNitroUtils/nitrogen/**
1718
Mobile-Expensify/**
1819
vendor

.github/actionlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ self-hosted-runner:
1010
paths:
1111
'**/*':
1212
ignore:
13-
# This is meant to be a temporary workaround for a bug in actionslint. Upstream:
13+
# This is meant to be a temporary workaround for a bug in actionlint. Upstream:
1414
# - issue: https://github.com/rhysd/actionlint/issues/511
1515
# - PR: https://github.com/rhysd/actionlint/pull/513
1616
- '"env" is not allowed in "runs" section because .* is a Composite action.*'

.github/actions/javascript/postTestBuildComment/index.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11515,11 +11515,21 @@ function getTestBuildMessage(appPr, mobileExpensifyPr) {
1151511515
acc[platform] = { link: 'N/A', qrCode: 'N/A' };
1151611516
return acc;
1151711517
}
11518-
const isSuccess = input === 'success';
11519-
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
11520-
const qrCode = isSuccess
11521-
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
11522-
: `The QR code can't be generated, because the ${names[platform]} build failed`;
11518+
let link = '';
11519+
let qrCode = '';
11520+
switch (input) {
11521+
case 'success':
11522+
link = core.getInput(`${platform}_LINK`);
11523+
qrCode = `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`;
11524+
break;
11525+
case 'skipped':
11526+
link = '⏩ SKIPPED ⏩';
11527+
qrCode = `The build for ${names[platform]} was skipped`;
11528+
break;
11529+
default:
11530+
link = '❌ FAILED ❌';
11531+
qrCode = `The QR code can't be generated, because the ${names[platform]} build failed`;
11532+
}
1152311533
acc[platform] = {
1152411534
link,
1152511535
qrCode,
@@ -11532,12 +11542,12 @@ Built from${appPr ? ` App PR Expensify/App#${appPr}` : ''}${mobileExpensifyPr ?
1153211542
| ------------- | ------------- |
1153311543
| ${result.ANDROID.link} | ${result.IOS.link} |
1153411544
| ${result.ANDROID.qrCode} | ${result.IOS.qrCode} |
11535-
${appPr
11536-
? `\n| Desktop :computer: | Web :spider_web: |
11545+
11546+
| Desktop :computer: | Web :spider_web: |
1153711547
| ------------- | ------------- |
1153811548
| ${result.DESKTOP.link} | ${result.WEB.link} |
11539-
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |\n`
11540-
: ''}
11549+
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |
11550+
1154111551
---
1154211552

1154311553
:eyes: [View the workflow run that generated this build](https://github.com/${github_1.context.repo.owner}/${github_1.context.repo.repo}/actions/runs/${github_1.context.runId}) :eyes:

.github/actions/javascript/postTestBuildComment/postTestBuildComment.ts

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,21 @@ function getTestBuildMessage(appPr?: number, mobileExpensifyPr?: number): string
2222
return acc;
2323
}
2424

25-
const isSuccess = input === 'success';
26-
27-
const link = isSuccess ? core.getInput(`${platform}_LINK`) : '❌ FAILED ❌';
28-
const qrCode = isSuccess
29-
? `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`
30-
: `The QR code can't be generated, because the ${names[platform]} build failed`;
25+
let link = '';
26+
let qrCode = '';
27+
switch (input) {
28+
case 'success':
29+
link = core.getInput(`${platform}_LINK`);
30+
qrCode = `![${names[platform]}](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${link})`;
31+
break;
32+
case 'skipped':
33+
link = '⏩ SKIPPED ⏩';
34+
qrCode = `The build for ${names[platform]} was skipped`;
35+
break;
36+
default:
37+
link = '❌ FAILED ❌';
38+
qrCode = `The QR code can't be generated, because the ${names[platform]} build failed`;
39+
}
3140

3241
acc[platform] = {
3342
link,
@@ -44,14 +53,12 @@ Built from${appPr ? ` App PR Expensify/App#${appPr}` : ''}${mobileExpensifyPr ?
4453
| ------------- | ------------- |
4554
| ${result.ANDROID.link} | ${result.IOS.link} |
4655
| ${result.ANDROID.qrCode} | ${result.IOS.qrCode} |
47-
${
48-
appPr
49-
? `\n| Desktop :computer: | Web :spider_web: |
56+
57+
| Desktop :computer: | Web :spider_web: |
5058
| ------------- | ------------- |
5159
| ${result.DESKTOP.link} | ${result.WEB.link} |
52-
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |\n`
53-
: ''
54-
}
60+
| ${result.DESKTOP.qrCode} | ${result.WEB.qrCode} |
61+
5562
---
5663
5764
:eyes: [View the workflow run that generated this build](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) :eyes:

.github/scripts/validateActionsAndWorkflows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title 'Validating the Github Actions and workflows using the json schemas provid
77
function downloadSchema {
88
[[ $1 = 'github-action.json' ]] && SCHEMA_NAME='GitHub Action' || SCHEMA_NAME='GitHub Workflow'
99
info "Downloading $SCHEMA_NAME schema..."
10-
if curl "https://json.schemastore.org/$1" --output "./tempSchemas/$1" --silent; then
10+
if curl "https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/$1" --output "./tempSchemas/$1" --silent; then
1111
success "Successfully downloaded $SCHEMA_NAME schema!"
1212
else
1313
error "Failed downloading $SCHEMA_NAME schema"

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ jobs:
273273
attachments: [{
274274
color: "#DB4545",
275275
pretext: `<!subteam^S4TJJ3PSL>`,
276-
text: `💥 Android HybridApp production <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|deploy run> failed. Please <https://stackoverflowteams.com/c/expensify/questions/5738|manually submit> ${{ needs.prep.outputs.APP_VERSION }} in the <https://play.google.com/console/u/0/developers/8765590895836334604/app/4974129597497161901/releases/overview|Google Play Store>. 💥 But first check the workflow, it's likely that the release was successful and <https://github.com/Expensify/Expensify/issues/488492|this error> is occuring)`,
276+
text: `💥 Android HybridApp production <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|deploy run> failed. Please <https://stackoverflowteams.com/c/expensify/questions/5738|manually submit> ${{ needs.prep.outputs.APP_VERSION }} in the <https://play.google.com/console/u/0/developers/8765590895836334604/app/4974129597497161901/releases/overview|Google Play Store> 💥`,
277277
}]
278278
}
279279
env:

.github/workflows/lint-changed.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,47 @@ jobs:
1717
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
1818
runs-on: ubuntu-latest
1919
steps:
20+
- name: Count commits between merge base and HEAD
21+
id: count
22+
run: |
23+
# Compare the base commit and HEAD to get the count of commits after base
24+
# up to and including HEAD. Add 2 to this total when fetching history.
25+
#
26+
# When opening a PR, GitHub will create a merge commit that squashes
27+
# your changes for use in the workflow. So your history locally
28+
# may look like
29+
# o---o---o---B - development
30+
# /
31+
# ---o---1---C---o---o---A - main
32+
# Note that the `1` is the merge-base of development and main. The
33+
# number of commits after `1` upto and including `A` is 4.
34+
# In the workflow, GitHub squashs development, so it becomes:
35+
# ---o---1---C---o---o---A - main
36+
# \--M - PR branch
37+
# Where `M`` is the new squashed commit. To fetch enough history to
38+
# include the merge base, we need to fetch `M`, `A` through `C` and
39+
# `1` for total of 4+2=6 commits. The +2 commits accounts for the
40+
# base `1` and merge commit `M`.
41+
RAW_COUNT="$(gh api "repos/$REPO/compare/${BASE}...main" | jq -r '.total_commits')"
42+
ADJUSTED_COUNT=$((RAW_COUNT + 2))
43+
echo "count=$ADJUSTED_COUNT" >> "$GITHUB_OUTPUT"
44+
env:
45+
GH_TOKEN: ${{ github.token }}
46+
BASE: ${{ github.event.pull_request.base.sha }}
47+
REPO: ${{ github.repository }}
48+
2049
- name: Checkout
2150
# v4
2251
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
52+
with:
53+
fetch-depth: ${{ fromJSON(steps.count.outputs.count) }}
2354

2455
- name: Setup Node
2556
uses: ./.github/actions/composite/setupNode
2657
with:
2758
IS_DESKTOP_BUILD: true
28-
59+
2960
- name: Run ESLint to check for deprecation warnings
3061
run: |
31-
# This will just fetch the latest commit from main
32-
git fetch origin main --no-tags --depth=1
33-
3462
# shellcheck disable=SC2046
3563
npm run lint-changed

.github/workflows/publishReactNativeAndroidArtifacts.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: Publish React Native Android Artifacts
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
build_standalone:
7+
description: 'Build Standalone artifacts'
8+
required: false
9+
type: boolean
10+
build_hybridapp:
11+
description: 'Build HybridApp artifacts'
12+
required: false
13+
type: boolean
414
push:
515
branches:
616
- main
@@ -23,20 +33,23 @@ jobs:
2333
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
2434
with:
2535
submodules: true
26-
ref: ${{ github.event.before }}
36+
ref: ${{ github.event.before || 'main' }}
2737
token: ${{ secrets.OS_BOTIFY_TOKEN }}
2838

2939
- name: Get previous patches hash
40+
if: ${{ github.event_name != 'workflow_dispatch' }}
3041
id: getOldPatchesHash
3142
run: |
3243
echo "HYBRID_APP_HASH=$(./scripts/compute-patches-hash.sh patches Mobile-Expensify/patches)" >> "$GITHUB_OUTPUT"
3344
echo "STANDALONE_APP_HASH=$(./scripts/compute-patches-hash.sh patches)" >> "$GITHUB_OUTPUT"
3445
3546
- name: Get previous react-native version
47+
if: ${{ github.event_name != 'workflow_dispatch' }}
3648
id: getOldVersion
3749
run: echo "VERSION=$(jq -r '.dependencies["react-native"]' package.json)" >> "$GITHUB_OUTPUT"
3850

3951
- name: Checkout new ref
52+
if: ${{ github.event_name != 'workflow_dispatch' }}
4053
run: |
4154
git fetch origin ${{ github.event.after }} --depth=1
4255
git checkout ${{ github.event.after }}
@@ -49,10 +62,12 @@ jobs:
4962
echo "STANDALONE_APP_HASH=$(./scripts/compute-patches-hash.sh patches)" >> "$GITHUB_OUTPUT"
5063
5164
- name: Get new react-native version
65+
if: ${{ github.event_name != 'workflow_dispatch' }}
5266
id: getNewVersion
5367
run: echo "VERSION=$(jq -r '.dependencies["react-native"]' package.json)" >> "$GITHUB_OUTPUT"
5468

5569
- name: Check if version changed
70+
if: ${{ github.event_name != 'workflow_dispatch' }}
5671
id: didVersionChange
5772
run: |
5873
readonly DID_VERSION_CHANGE=${{ steps.getOldVersion.outputs.VERSION != steps.getNewVersion.outputs.VERSION && 'true' || 'false' }}
@@ -62,6 +77,7 @@ jobs:
6277
fi
6378
6479
- name: Check if patches changed
80+
if: ${{ github.event_name != 'workflow_dispatch' }}
6581
id: didPatchesChange
6682
run: |
6783
readonly DID_HYBRID_APP_PATCHES_CHANGE=${{ steps.getOldPatchesHash.outputs.HYBRID_APP_HASH != steps.getNewPatchesHash.outputs.HYBRID_APP_HASH && 'true' || 'false' }}
@@ -80,6 +96,23 @@ jobs:
8096
- name: Get artifact build targets
8197
id: getArtifactBuildTargets
8298
run: |
99+
if [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then
100+
BUILD_TARGETS=()
101+
102+
if [[ '${{ inputs.build_standalone }}' == 'true' ]]; then
103+
BUILD_TARGETS+=(false)
104+
fi
105+
106+
if [[ '${{ inputs.build_hybridapp }}' == 'true' ]]; then
107+
BUILD_TARGETS+=(true)
108+
fi
109+
110+
if [[ ${#BUILD_TARGETS[@]} -ne 0 ]]; then
111+
echo "BUILD_TARGETS=$(printf '%s\n' "${BUILD_TARGETS[@]}" | jq -R . | jq -c -s .)" >> "$GITHUB_OUTPUT"
112+
fi
113+
exit 0
114+
fi
115+
83116
# When there is a version change or standalone app patches change, we need to build for both hybrid and standalone
84117
if [[ '${{ steps.didVersionChange.outputs.DID_VERSION_CHANGE }}' == 'true' || '${{ steps.didPatchesChange.outputs.DID_STANDALONE_APP_PATCHES_CHANGE }}' == 'true' ]]; then
85118
echo "BUILD_TARGETS=[\"true\", \"false\"]" >> "$GITHUB_OUTPUT"

.github/workflows/remote-build-android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
IS_HYBRID_BUILD: ${{ matrix.is_hybrid_build && 'true' || 'false' }}
3636

3737
- name: RNEF Remote Build - Android
38-
uses: callstackincubator/android@333f590005be752c28f07e36fa7151be3b2e18da
38+
uses: callstackincubator/android@2f67a7003e5ed1bb4e483619ab582fabff25677d
3939
env:
4040
IS_HYBRID_APP: ${{ matrix.is_hybrid_build }}
4141
with:
4242
variant: ${{ matrix.variant }}
4343
github-token: ${{ github.token }}
44-
rnef-build-extra-params: '-PreactNativeArchitectures=arm64-v8a,x86_64'
44+
rnef-build-extra-params: '--extra-params -PreactNativeArchitectures=arm64-v8a,x86_64'
4545
comment-bot: false

.github/workflows/remote-build-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
IS_HYBRID_BUILD: ${{ matrix.is_hybrid_build && 'true' || 'false' }}
3838

3939
- name: RNEF Remote Build - iOS
40-
uses: callstackincubator/ios@f8aeffabe13be32e9aa69b86726de67bff5a694e
40+
uses: callstackincubator/ios@78ed46313dac4ed09cb5cc73b9b1b9193d59d863
4141
env:
4242
IS_HYBRID_APP: ${{ matrix.is_hybrid_build }}
4343
with:

0 commit comments

Comments
 (0)