Skip to content

Commit d47628c

Browse files
committed
Merge branch 'main' into issa-update-usage-of-ONYXKEYS_USER-to-ONYXKEYS_ACCOUNT-part1
2 parents 6ed6bb7 + f1a0d5e commit d47628c

File tree

426 files changed

+4460
-4467
lines changed

Some content is hidden

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

426 files changed

+4460
-4467
lines changed

.github/ISSUE_TEMPLATE/Accessibility.md

+4-2
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

+6-8
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

+6-9
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/actions/javascript/markPullRequestsAsDeployed/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12787,7 +12787,7 @@ async function run() {
1278712787
});
1278812788
const prNumForCPMergeCommit = commit.message.match(/Merge pull request #(\d+)[\S\s]*\(cherry picked from commit .*\)/);
1278912789
if (prNumForCPMergeCommit?.at(1) === String(prNumber)) {
12790-
const cpActor = commit.message.match(/.*\(CP triggered by (.*)\)/)?.at(1);
12790+
const cpActor = commit.message.match(/.*\(cherry-picked to .* by (.*)\)/)?.at(1);
1279112791
if (cpActor) {
1279212792
deployer = cpActor;
1279312793
}

.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async function run() {
140140
});
141141
const prNumForCPMergeCommit = commit.message.match(/Merge pull request #(\d+)[\S\s]*\(cherry picked from commit .*\)/);
142142
if (prNumForCPMergeCommit?.at(1) === String(prNumber)) {
143-
const cpActor = commit.message.match(/.*\(CP triggered by (.*)\)/)?.at(1);
143+
const cpActor = commit.message.match(/.*\(cherry-picked to .* by (.*)\)/)?.at(1);
144144
if (cpActor) {
145145
deployer = cpActor;
146146
}

.github/workflows/cherryPick.yml

+43-53
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ on:
44
workflow_dispatch:
55
inputs:
66
PULL_REQUEST_URL:
7-
description: The full URL of the Expensify/App pull request to cherry-pick
7+
description: The full URL of the E/App or E/Mobile-Expensify pull request to cherry-pick
88
required: true
9+
TARGET:
10+
description: CP to staging or production?
11+
required: true
12+
type: choice
13+
options:
14+
- staging
15+
- production
16+
default: staging
917

1018
jobs:
1119
createNewVersion:
1220
uses: ./.github/workflows/createNewVersion.yml
1321
secrets: inherit
22+
with:
23+
# In order to submit a new build for production review, it must have a higher PATCH version than the previously-submitted build
24+
SEMVER_LEVEL: ${{ inputs.TARGET == 'staging' && 'BUILD' || 'PATCH' }}
1425

1526
cherryPick:
1627
needs: createNewVersion
@@ -24,32 +35,20 @@ jobs:
2435
2536
- name: Verify repository
2637
run: |
27-
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != ${{ github.repository }} ]] && [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != "Expensify/Mobile-Expensify" ]]; then
38+
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" != ${{ github.repository }} ]] && [[ ! "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" =~ Expensify/Mobile-Expensify* ]]; then
2839
echo "::error::❌ Cherry picks are only supported for the Expensify/App and Expensify/Mobile-Expensify repositories. Found: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}"
2940
exit 1
3041
fi
3142
3243
- name: Set conflict branch name
3344
id: getBranchName
34-
run: echo "CONFLICT_BRANCH_NAME=cherry-pick-staging-${{ steps.getPRInfo.outputs.PR_NUMBER }}-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
45+
run: echo "CONFLICT_BRANCH_NAME=cherry-pick-${{ inputs.TARGET }}-${{ steps.getPRInfo.outputs.PR_NUMBER }}-${{ github.run_id }}-${{ github.run_attempt }}" >> "$GITHUB_OUTPUT"
3546

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' }}
4947
# v4
48+
- name: Checkout target branch without full history if cherry picking App
5049
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
5150
with:
52-
ref: staging
51+
ref: ${{ inputs.TARGET }}
5352
token: ${{ secrets.OS_BOTIFY_TOKEN }}
5453
submodules: true
5554

@@ -74,24 +73,13 @@ jobs:
7473
id: getPreviousVersion
7574
uses: ./.github/actions/javascript/getPreviousVersion
7675
with:
77-
SEMVER_LEVEL: "PATCH"
76+
SEMVER_LEVEL: ${{ inputs.TARGET == 'staging' && 'PATCH' || 'MINOR' }}
7877

79-
- name: Fetch history of relevant refs if cherry picking an App change
80-
if: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/App' }}
78+
- name: Fetch history of relevant refs
8179
run: |
82-
# Temporary hack during transition when -staging suffix is being added to tags
83-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
84-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
85-
else
86-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
87-
fi
80+
git fetch origin main ${{ inputs.TARGET }} --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
8881
cd Mobile-Expensify
89-
# Temporary hack during transition when -staging suffix is being added to tags
90-
if git ls-remote origin refs/tags/${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }} | grep -q . ; then
91-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
92-
else
93-
git fetch origin main staging --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}-staging
94-
fi
82+
git fetch origin main ${{ inputs.TARGET }} --no-recurse-submodules --no-tags --shallow-exclude ${{ steps.getPreviousVersion.outputs.PREVIOUS_VERSION }}
9583
9684
- name: Get E/App version bump commit
9785
id: getVersionBumpCommit
@@ -129,33 +117,35 @@ jobs:
129117
env:
130118
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
131119

132-
- name: Cherry-pick the Mobile-Expensify version bump to Mobile-Expensify staging
120+
- name: Cherry-pick the Mobile-Expensify version bump to Mobile-Expensify target branch
133121
working-directory: Mobile-Expensify
134122
run: |
135-
git switch staging
123+
git switch ${{ inputs.TARGET }}
136124
git cherry-pick -S -x --mainline 1 --strategy=recursive -Xtheirs ${{ steps.getMobileExpensifyVersionBumpCommit.outputs.VERSION_BUMP_SHA }}
137-
git push origin staging
125+
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(cherry-picked to ${{ inputs.TARGET }} by ${{ github.actor }})"
126+
git push origin ${{ inputs.TARGET }}
138127
139-
- name: Cherry-pick the E/App version-bump to staging
128+
- name: Cherry-pick the E/App version-bump to target branch
140129
run: |
141-
git switch staging
130+
git switch ${{ inputs.TARGET }}
142131
git cherry-pick -S -x --mainline 1 --strategy=recursive -Xtheirs ${{ steps.getVersionBumpCommit.outputs.VERSION_BUMP_SHA }}
132+
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(cherry-picked to ${{ inputs.TARGET }} by ${{ github.actor }})"
143133
144-
- name: Update the Mobile-Expensify submodule on E/App staging
134+
- name: Update the Mobile-Expensify submodule on E/App target branch
145135
run: |
146136
git add Mobile-Expensify
147137
git commit -m "Update Mobile-Expensify submodule version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
148138
149139
- name: Cherry-pick the merge commit of target PR
150140
id: cherryPick
151141
# If cherry picking a Mobile-Expensify change, we need to run the cherry pick in the Mobile-Expensify directory
152-
working-directory: ${{ steps.getPRInfo.outputs.REPO_FULL_NAME == 'Expensify/Mobile-Expensify' && 'Mobile-Expensify' || '.' }}
142+
working-directory: ${{ startsWith(steps.getPRInfo.outputs.REPO_FULL_NAME, 'Expensify/Mobile-Expensify') && 'Mobile-Expensify' || '.' }}
153143
run: |
154144
echo "Attempting to cherry-pick ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}"
155145
if git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}; then
156146
echo "🎉 No conflicts! CP was a success, PR can be automerged 🎉"
157147
echo "HAS_CONFLICTS=false" >> "$GITHUB_OUTPUT"
158-
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(CP triggered by ${{ github.actor }})"
148+
git commit --amend -m "$(git log -1 --pretty=%B)" -m "(cherry-picked to ${{ inputs.TARGET }} by ${{ github.actor }})"
159149
else
160150
echo "😞 PR can't be automerged, there are merge conflicts in the following files:"
161151
git --no-pager diff --name-only --diff-filter=U
@@ -169,10 +159,10 @@ jobs:
169159
git checkout -b ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}
170160
git push --set-upstream origin ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}
171161
else
172-
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" == "Expensify/Mobile-Expensify" ]]; then
162+
if [[ "${{ steps.getPRInfo.outputs.REPO_FULL_NAME }}" =~ Expensify/Mobile-Expensify* ]]; then
173163
# Push Mobile-Expensify changes first
174164
cd Mobile-Expensify
175-
git push origin staging
165+
git push origin ${{ inputs.TARGET }}
176166
cd ..
177167
178168
# Update and commit the submodule reference in E/App
@@ -181,7 +171,7 @@ jobs:
181171
fi
182172
183173
# Push E/App changes
184-
git push origin staging
174+
git push origin ${{ inputs.TARGET }}
185175
fi
186176
187177
- name: Create Pull Request to manually finish CP
@@ -191,9 +181,9 @@ jobs:
191181
AUTHOR_CHECKLIST=$(sed -n '/### PR Author Checklist/,$p' .github/PULL_REQUEST_TEMPLATE.md)
192182
193183
PR_DESCRIPTION=$(cat <<EOF
194-
🍒 Cherry pick ${{ github.event.inputs.PULL_REQUEST_URL }} to staging 🍒
184+
🍒 Cherry pick ${{ github.event.inputs.PULL_REQUEST_URL }} to ${{ inputs.TARGET }} 🍒
195185
196-
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:
186+
This PR had conflicts when we tried to cherry-pick it to ${{ inputs.TARGET }}. You'll need to manually perform the cherry-pick, using the following steps:
197187
198188
\`\`\`bash
199189
git fetch
@@ -204,25 +194,25 @@ jobs:
204194
Then manually resolve conflicts, and commit the change with \`git cherry-pick --continue\`. Lastly, please run:
205195
206196
\`\`\`bash
207-
git commit --amend -m "\$(git log -1 --pretty=%B)" -m "(CP triggered by ${{ github.actor }})"
197+
git commit --amend -m "\$(git log -1 --pretty=%B)" -m "(cherry-picked to ${{ inputs.TARGET }} by ${{ github.actor }})"
208198
\`\`\`
209199
210-
That will help us keep track of who triggered this CP. Once all that's done, push your changes with \`git push origin ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}\`, and then open this PR for review.
200+
This last part is important. It will help us keep track of who triggered this CP, and will ensure that version bumps are tracked correctly. Once all that's done, push your changes with \`git push origin ${{ steps.getBranchName.outputs.CONFLICT_BRANCH_NAME }}\`, and then open this PR for review.
211201
212202
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.
213203
214-
_Pro-tip:_ If this PR appears to have conflicts against the _staging_ base, it means that the version on staging has been updated. The easiest thing to do if you see this is to close the PR and re-run the CP.
204+
_Pro-tip:_ If this PR appears to have conflicts against the _${{ inputs.TARGET }}_ base, it means that the version on ${{ inputs.TARGET }} has been updated. The easiest thing to do if you see this is to close the PR and re-run the CP.
215205
216206
$AUTHOR_CHECKLIST
217207
EOF
218208
)
219209
220210
# Create PR
221211
gh pr create \
222-
--title "🍒 Cherry pick PR #${{ steps.getPRInfo.outputs.PR_NUMBER }} to staging 🍒" \
212+
--title "🍒 Cherry pick PR #${{ steps.getPRInfo.outputs.PR_NUMBER }} to ${{ inputs.TARGET }} 🍒" \
223213
--body "$PR_DESCRIPTION" \
224214
--label "Engineering,Hourly" \
225-
--base "staging"
215+
--base "${{ inputs.TARGET }}"
226216
sleep 5
227217
env:
228218
GITHUB_TOKEN: ${{ steps.setupGitForOSBotify.outputs.OS_BOTIFY_API_TOKEN }}
@@ -238,8 +228,8 @@ jobs:
238228
# In cases when the original PR author is outside the org, the `gh pr edit` command will fail. But we don't want to fail the workflow in that case.
239229
continue-on-error: true
240230

241-
- name: Label original PR with CP Staging
242-
run: gh pr edit ${{ github.event.inputs.PULL_REQUEST_URL }} --add-label 'CP Staging'
231+
- name: Label original PR with CP label
232+
run: gh pr edit ${{ github.event.inputs.PULL_REQUEST_URL }} --add-label '${{ inputs.TARGET == 'staging' && 'CP Staging' || 'CP Production' }}'
243233
env:
244234
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
245235

@@ -255,7 +245,7 @@ jobs:
255245
attachments: [{
256246
color: "#DB4545",
257247
pretext: `<!subteam^S4TJJ3PSL>`,
258-
text: `💥 Failed to CP ${{ github.event.inputs.PULL_REQUEST_URL }} to staging 💥`,
248+
text: `💥 Failed to CP ${{ github.event.inputs.PULL_REQUEST_URL }} to ${{ inputs.TARGET }} 💥`,
259249
}]
260250
}
261251
env:

0 commit comments

Comments
 (0)