Skip to content

Commit b63d080

Browse files
committed
Merge branch 'main' into @chrispader/fix-start-chat-page-offline-indicator
2 parents 62fde4c + 3885a40 commit b63d080

419 files changed

Lines changed: 9744 additions & 3882 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.

.github/ISSUE_TEMPLATE/Accessibility.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ What can we do to fix the issue?
3535
Check off any platforms that are affected by this issue
3636
--->
3737
Which of our officially supported platforms is this issue occurring on? Please only tick the box if you have provided a screen-recording in the thread for each platform:
38-
- [ ] Android: Native
38+
- [ ] Android: App
3939
- [ ] Android: mWeb Chrome
40-
- [ ] iOS: Native
40+
- [ ] iOS: App
4141
- [ ] iOS: mWeb Safari
42+
- [ ] iOS: mWeb Chrome
43+
- [ ] Windows: Chrome
4244
- [ ] MacOS: Chrome / Safari
4345
- [ ] MacOS: Desktop
4446

.github/ISSUE_TEMPLATE/Performance.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ Note: These should be the same as the benchmarks collected before any changes.
2525

2626
## Platforms:
2727
Select the officially supported platforms where the issue was reproduced:
28-
- [ ] Android: Standalone
29-
- [ ] Android: HybridApp
28+
- [ ] Android: App
3029
- [ ] Android: mWeb Chrome
31-
- [ ] iOS: Standalone
32-
- [ ] iOS: HybridApp
30+
- [ ] iOS: App
3331
- [ ] iOS: mWeb Safari
32+
- [ ] iOS: mWeb Chrome
3433
- [ ] Windows: Chrome
3534
- [ ] MacOS: Chrome / Safari
3635
- [ ] MacOS: Desktop
@@ -39,12 +38,11 @@ Select the officially supported platforms where the issue was reproduced:
3938
<summary>Platforms Tested:</summary>
4039
On which of our officially supported platforms was this issue tested:
4140

42-
- [ ] Android: Standalone
43-
- [ ] Android: HybridApp
41+
- [ ] Android: App
4442
- [ ] Android: mWeb Chrome
45-
- [ ] iOS: Standalone
46-
- [ ] iOS: HybridApp
43+
- [ ] iOS: App
4744
- [ ] iOS: mWeb Safari
45+
- [ ] iOS: mWeb Chrome
4846
- [ ] Windows: Chrome
4947
- [ ] MacOS: Chrome / Safari
5048
- [ ] MacOS: Desktop

.github/ISSUE_TEMPLATE/Standard.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ ___
1010
**Version Number:**
1111
**Reproducible in staging?:**
1212
**Reproducible in production?:**
13-
**If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:**
1413
**If this was caught during regression testing, add the test name, ID and link from TestRail:**
1514
**Email or phone of affected tester (no customers):**
1615
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
@@ -32,12 +31,11 @@ Can the user still use Expensify without this being fixed? Have you informed the
3231

3332
## Platforms:
3433
Select the officially supported platforms where the issue was reproduced:
35-
- [ ] Android: Standalone
36-
- [ ] Android: HybridApp
34+
- [ ] Android: App
3735
- [ ] Android: mWeb Chrome
38-
- [ ] iOS: Standalone
39-
- [ ] iOS: HybridApp
36+
- [ ] iOS: App
4037
- [ ] iOS: mWeb Safari
38+
- [ ] iOS: mWeb Chrome
4139
- [ ] Windows: Chrome
4240
- [ ] MacOS: Chrome / Safari
4341
- [ ] MacOS: Desktop
@@ -46,12 +44,11 @@ Select the officially supported platforms where the issue was reproduced:
4644
<summary>Platforms Tested:</summary>
4745
On which of our officially supported platforms was this issue tested:
4846

49-
- [ ] Android: Standalone
50-
- [ ] Android: HybridApp
47+
- [ ] Android: App
5148
- [ ] Android: mWeb Chrome
52-
- [ ] iOS: Standalone
53-
- [ ] iOS: HybridApp
49+
- [ ] iOS: App
5450
- [ ] iOS: mWeb Safari
51+
- [ ] iOS: mWeb Chrome
5552
- [ ] Windows: Chrome
5653
- [ ] MacOS: Chrome / Safari
5754
- [ ] MacOS: Desktop

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
8787
- [ ] MacOS: Chrome / Safari
8888
- [ ] MacOS: Desktop
8989
- [ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
90+
- [ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx`
9091
- [ ] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
9192
- [ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`)
9293
- [ ] I verified that comments were added to code that is not self explanatory

.github/actions/composite/announceFailedWorkflowInSlack/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
SLACK_WEBHOOK:
66
description: 'URL of the slack webhook'
77
required: true
8+
CHANNEL:
9+
description: 'Slack channel to post announcement in'
10+
required: false
11+
default: '#announce'
812

913
runs:
1014
using: composite
@@ -16,7 +20,7 @@ runs:
1620
fields: workflow, repo
1721
custom_payload: |
1822
{
19-
channel: '#announce',
23+
channel: '${{ inputs.CHANNEL }}',
2024
attachments: [{
2125
color: "#DB4545",
2226
pretext: `<!subteam^S4TJJ3PSL>`,
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
if [ -z "$GITHUB_TOKEN" ]; then
4+
echo "GITHUB_TOKEN env variable is not set"
5+
exit 1
6+
fi
7+
8+
if [[ "$IS_HYBRID_BUILD" == "true" ]]; then
9+
readonly PACKAGE="react-hybrid"
10+
else
11+
readonly PACKAGE="react-standalone"
12+
fi
13+
14+
VERSION="$(jq -r '.dependencies["react-native"]' package.json)"
15+
readonly VERSION
16+
17+
# List all versions of the package
18+
PACKAGE_VERSIONS="$(gh api "/orgs/Expensify/packages/maven/com.expensify.${PACKAGE}.react-android/versions" --paginate --jq '.[].name')"
19+
20+
# Filter only versions matching the base React Native version
21+
PACKAGE_VERSIONS="$(echo "$PACKAGE_VERSIONS" | grep "$VERSION")"
22+
23+
# Grab the highest patch version from there
24+
LATEST_PATCHED_VERSION="$(echo "$PACKAGE_VERSIONS" | sort | tail -n1)"
25+
26+
if [[ -n "$LATEST_PATCHED_VERSION" ]]; then
27+
PATCH_ITERATION=${LATEST_PATCHED_VERSION##*-}
28+
INCREMENTED_PATCH_ITERATION=$((PATCH_ITERATION + 1))
29+
echo "${VERSION}-${INCREMENTED_PATCH_ITERATION}"
30+
else
31+
echo "$VERSION-0"
32+
fi

.github/workflows/cherryPick.yml

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,43 @@ jobs:
1616
needs: createNewVersion
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout staging branch
20-
# v4
21-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
22-
with:
23-
ref: staging
24-
token: ${{ secrets.OS_BOTIFY_TOKEN }}
25-
submodules: true
26-
2719
- name: Extract PR information
2820
id: getPRInfo
2921
run: |
30-
echo "REPO_FULL_NAME=$(echo '${{ github.event.inputs.PULL_REQUEST_URL }}' | sed -E 's|https://github.com/([^/]+/[^/]+)/pull/.*|\1|')" >> "$GITHUB_OUTPUT"
22+
echo "REPO_FULL_NAME=$(echo '${{ github.event.inputs.PULL_REQUEST_URL }}' | sed -E 's|https?://github.com/([^/]+/[^/]+)/pull/.*|\1|')" >> "$GITHUB_OUTPUT"
3123
echo "PR_NUMBER=$(echo '${{ github.event.inputs.PULL_REQUEST_URL }}' | sed -E 's|.*/pull/([0-9]+).*|\1|')" >> "$GITHUB_OUTPUT"
3224
3325
- name: Verify repository
3426
run: |
35-
if [ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != "Expensify/App" ]; then
36-
echo "::error::❌ Cherry picks are only supported for the Expensify/App repository. Found: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}"
27+
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != ${{ github.repository }} ]] && [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != "Expensify/Mobile-Expensify" ]]; then
28+
echo "::error::❌ Cherry picks are only supported for the Expensify/App and Expensify/Mobile-Expensify repositories. Found: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}"
3729
exit 1
3830
fi
3931
4032
- name: Set conflict branch name
4133
id: getBranchName
4234
run: echo "CONFLICT_BRANCH_NAME=cherry-pick-staging-${{ steps.getPRInfo.outputs.PR_NUMBER }}-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
4335

36+
- name: Checkout staging branch with full history if cherry picking Mobile-Expensify
37+
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/Mobile-Expensify' }}
38+
# v4
39+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
40+
with:
41+
ref: staging
42+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
43+
submodules: true
44+
# Only fetch depth 0 for Mobile-Expensify, because it's a submodule and we need more history to cherry pick successfully
45+
fetch-depth: 0
46+
47+
- name: Checkout staging branch without full history if cherry picking App
48+
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/App' }}
49+
# v4
50+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
51+
with:
52+
ref: staging
53+
token: ${{ secrets.OS_BOTIFY_TOKEN }}
54+
submodules: true
55+
4456
# This command is necessary to fetch any branch other than main in the submodule.
4557
# See https://github.com/actions/checkout/issues/1815#issuecomment-2777836442 for further context.
4658
- name: Enable branch-switching in submodules
@@ -64,22 +76,12 @@ jobs:
6476
with:
6577
SEMVER_LEVEL: "PATCH"
6678

67-
- name: Fetch history of relevant refs
79+
- name: Fetch history of relevant refs if cherry picking an App change
80+
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/App' }}
6881
run: |
69-
# Temporary hack during transition when -staging suffix is being added to tags
70-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
71-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
72-
else
73-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
74-
fi
75-
82+
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
7683
cd Mobile-Expensify
77-
# Temporary hack during transition when -staging suffix is being added to tags
78-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
79-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
80-
else
81-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
82-
fi
84+
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
8385
8486
- name: Get E/App version bump commit
8587
id: getVersionBumpCommit
@@ -108,13 +110,14 @@ jobs:
108110
fi
109111
echo "VERSION_BUMP_SHA=$VERSION_BUMP_COMMIT" >> "$GITHUB_OUTPUT"
110112
111-
- name: Get merge commit for E/App pull request to CP
113+
- name: Get merge commit for pull request to CP
112114
id: getCPMergeCommit
113-
uses: ./.github/actions/javascript/getPullRequestDetails
114-
with:
115-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116-
USER: ${{ github.actor }}
117-
PULL_REQUEST_NUMBER: ${{ steps.getPRInfo.outputs.PR_NUMBER }}
115+
run: |
116+
read -r MERGE_COMMIT_SHA MERGE_ACTOR <<< "$(gh pr view ${{ github.event.inputs.PULL_REQUEST_URL }} --json mergeCommit,author --jq '"\(.mergeCommit.oid) \(.author.login)"')"
117+
echo "MERGE_COMMIT_SHA=$MERGE_COMMIT_SHA" >> "$GITHUB_OUTPUT"
118+
echo "MERGE_ACTOR=$MERGE_ACTOR" >> "$GITHUB_OUTPUT"
119+
env:
120+
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
118121

119122
- name: Cherry-pick the Mobile-Expensify version bump to Mobile-Expensify staging
120123
working-directory: Mobile-Expensify
@@ -135,6 +138,8 @@ jobs:
135138
136139
- name: Cherry-pick the merge commit of target PR
137140
id: cherryPick
141+
# If cherry picking a Mobile-Expensify change, we need to run the cherry pick in the Mobile-Expensify directory
142+
working-directory: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/Mobile-Expensify' && 'Mobile-Expensify' || '.' }}
138143
run: |
139144
echo "Attempting to cherry-pick ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}"
140145
if git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}; then
@@ -154,6 +159,18 @@ jobs:
154159
git checkout -b ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}
155160
git push --set-upstream origin ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}
156161
else
162+
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" == "Expensify/Mobile-Expensify" ]]; then
163+
# Push Mobile-Expensify changes first
164+
cd Mobile-Expensify
165+
git push origin staging
166+
cd ..
167+
168+
# Update and commit the submodule reference in E/App
169+
git add Mobile-Expensify
170+
git commit -m "Update Mobile-Expensify submodule to include cherry-picked PR #${{ steps.getPRInfo.outputs.PR_NUMBER }}"
171+
fi
172+
173+
# Push E/App changes
157174
git push origin staging
158175
fi
159176
@@ -212,9 +229,9 @@ jobs:
212229
continue-on-error: true
213230

214231
- name: Label original PR with CP Staging
215-
run: gh pr edit ${{ github.event.inputs.PULL_REQUEST_URL }} --add-label 'CP Staging'
232+
run: gh pr edit ${{ github.event.inputs.PULL_REQUEST_URL }} --add-label 'CP Staging'
216233
env:
217-
GITHUB_TOKEN: ${{ github.token }}
234+
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
218235

219236
- name: "Announces a CP failure in the #announce Slack room"
220237
# v3

0 commit comments

Comments
 (0)