-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:Expensify/App into aldo_fix-empty-l…
…ines
- Loading branch information
Showing
221 changed files
with
6,482 additions
and
4,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,2 @@ | ||
# Every PR gets a review from an internal Expensify engineer | ||
* @Expensify/pullerbear | ||
|
||
# Performance sensitive and problem areas | ||
src/pages/home/report/ReportActionsView.js @marcaaron | ||
src/libs/OptionsListUtils.js @marcaaron | ||
src/libs/Network.js @marcaaron | ||
src/libs/actions/Report.js @marcaaron | ||
src/pages/LogInWithShortLivedTokenPage.js @marcaaron | ||
src/pages/home/ReportScreen.js @marcaaron | ||
src/components/InvertedFlatList @marcaaron | ||
src/components/OptionsList @marcaaron | ||
src/components/OptionsSelector.js @marcaaron | ||
src/libs/Navigation/CustomActions.js @marcaaron | ||
src/libs/Navigation/Navigation.js @marcaaron | ||
src/libs/Navigation/NavigationRoot.js @marcaaron | ||
src/libs/NetworkConnection.js @marcaaron | ||
src/libs/actions/NetworkRequestQueue.js @marcaaron | ||
src/libs/actions/ReportActions.js @marcaaron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.github/actions/composite/announceFailedWorkflowInSlack/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Announce failed workflow in Slack' | ||
description: 'Post failed workflow in Slack #announce channel' | ||
|
||
inputs: | ||
SLACK_WEBHOOK: | ||
description: 'URL of the slack webhook' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: 8398a7/action-slack@v3 | ||
name: Job failed Slack notification | ||
with: | ||
status: custom | ||
fields: workflow, repo | ||
custom_payload: | | ||
{ | ||
channel: '#announce', | ||
attachments: [{ | ||
color: "#DB4545", | ||
pretext: `<!subteam^S4TJJ3PSL>`, | ||
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW} workflow 💥`, | ||
}] | ||
} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'Setup Git for OSBotify' | ||
description: 'Setup Git for OSBotify' | ||
|
||
inputs: | ||
GPG_PASSPHRASE: | ||
description: 'Passphrase used to decrypt GPG key' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Decrypt OSBotify GPG key | ||
run: cd .github/workflows && gpg --quiet --batch --yes --decrypt --passphrase=${{ inputs.GPG_PASSPHRASE }} --output OSBotify-private-key.asc OSBotify-private-key.asc.gpg | ||
shell: bash | ||
|
||
- name: Import OSBotify GPG Key | ||
shell: bash | ||
run: cd .github/workflows && gpg --import OSBotify-private-key.asc | ||
|
||
- name: Set up git for OSBotify | ||
shell: bash | ||
run: | | ||
git config user.signingkey 367811D53E34168C | ||
git config commit.gpgsign true | ||
git config user.name OSBotify | ||
git config user.email infra+osbotify@expensify.com |
132 changes: 132 additions & 0 deletions
132
.github/actions/composite/updateProtectedBranch/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
name: Update Protected Branch | ||
description: Create, approve, and merge a pull request against a protected branch | ||
|
||
inputs: | ||
TARGET_BRANCH: | ||
description: The target branch to update. This becomes the base branch of the pull request. | ||
required: true | ||
SOURCE_BRANCH: | ||
description: If updating main, you must also provide a head branch to update main with. | ||
required: false | ||
default: '' | ||
OS_BOTIFY_TOKEN: | ||
description: GitHub token for OSBotify | ||
required: true | ||
GPG_PASSPHRASE: | ||
description: Passphrase used to decrypt GPG key for OSBotify | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Validate target branch | ||
if: ${{ !contains(fromJSON('["main", "staging", "production"]'), inputs.TARGET_BRANCH) }} | ||
shell: bash | ||
run: | | ||
echo "Target branch must be one of ['main', 'staging', 'production]" | ||
exit 1 | ||
# If updating main, SOURCE_BRANCH must not be empty | ||
- name: Validate source branch | ||
if: inputs.TARGET_BRANCH == 'main' && inputs.SOURCE_BRANCH == '' | ||
shell: bash | ||
run: | | ||
echo "Cannot update main branch without specifying a source branch" | ||
exit 1 | ||
# If updating staging, the source branch will always be main | ||
# If updating production, the source branch will always be staging | ||
- name: Set source branch | ||
shell: bash | ||
run: | | ||
if [[ ${{ inputs.TARGET_BRANCH }} == 'staging' ]]; then | ||
echo "SOURCE_BRANCH=main" >> "$GITHUB_ENV" | ||
elif [[ ${{ inputs.TARGET_BRANCH }} == 'production' ]]; then | ||
echo "SOURCE_BRANCH=staging" >> "$GITHUB_ENV" | ||
else | ||
echo "SOURCE_BRANCH=${{ inputs.SOURCE_BRANCH }}" >> "$GITHUB_ENV" | ||
fi | ||
- uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main | ||
with: | ||
GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }} | ||
|
||
- name: Checkout source branch | ||
shell: bash | ||
run: git checkout ${{ env.SOURCE_BRANCH }} | ||
|
||
- name: Set New Version | ||
shell: bash | ||
run: echo "NEW_VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV" | ||
|
||
- name: Create temporary branch to resolve conflicts | ||
if: ${{ contains(fromJSON('["staging", "production"]'), inputs.TARGET_BRANCH) }} | ||
shell: bash | ||
run: | | ||
git checkout ${{ inputs.TARGET_BRANCH }} | ||
BRANCH_NAME=update-${{ inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }} | ||
git checkout -b "$BRANCH_NAME" | ||
git merge -Xtheirs ${{ env.SOURCE_BRANCH }} | ||
git push --set-upstream origin "$BRANCH_NAME" | ||
- name: Create Pull Request | ||
id: createPullRequest | ||
shell: bash | ||
run: | | ||
gh pr create \ | ||
--title "Update version to ${{ env.NEW_VERSION }} on ${{ inputs.TARGET_BRANCH }}" \ | ||
--body "Update version to ${{ env.NEW_VERSION }}" \ | ||
--label "automerge" \ | ||
--base ${{ inputs.TARGET_BRANCH }} | ||
sleep 5 | ||
echo "::set-output name=PR_NUMBER::$(gh pr view --json 'number' --jq '.number')" | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} | ||
|
||
- name: Check changed files | ||
if: ${{ inputs.TARGET_BRANCH == 'main' }} | ||
id: changedFiles | ||
# Version: 3.3.0 | ||
uses: umani/changed-files@1d252c611c64289d35243fc37ece7323ea5e93e1 | ||
with: | ||
repo-token: ${{ github.token }} | ||
pr-number: ${{ steps.createPullRequest.outputs.PR_NUMBER }} | ||
|
||
- name: Validate changed files | ||
if: ${{ inputs.TARGET_BRANCH == 'main' && (steps.changedFiles.outputs.files_updated != 'android/app/build.gradle ios/NewExpensify/Info.plist ios/NewExpensifyTests/Info.plist package-lock.json package.json' || steps.changedFiles.outputs.files_created != '' || steps.changedFiles.outputs.files_deleted != '') }} | ||
shell: bash | ||
run: exit 1 | ||
|
||
- name: Auto-approve the PR | ||
shell: bash | ||
run: gh pr review --approve | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Check if pull request is mergeable | ||
id: isPullRequestMergeable | ||
uses: Expensify/App/.github/actions/javascript/isPullRequestMergeable@main | ||
with: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.PR_NUMBER }} | ||
|
||
- name: Leave comment if PR is not mergeable | ||
if: ${{ !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }} | ||
shell: bash | ||
run: | | ||
gh pr comment --body \ | ||
":bell: @Expensify/mobile-deployers :bell: - The Update Protected Branch workflow has failed because this PR was not mergable. | ||
If you are the deployer this week, please resolve the error and merge this PR to continue the deploy process." | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} | ||
|
||
- name: Fail workflow if PR is not mergeable | ||
if: ${{ steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }} | ||
shell: bash | ||
run: exit 1 | ||
|
||
- name: Auto-merge the PR | ||
shell: bash | ||
run: gh pr merge ${{ steps.createPullRequest.outputs.PR_NUMBER }} --merge --delete-branch | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} |
60 changes: 0 additions & 60 deletions
60
.github/actions/isPullRequestMergeable/isPullRequestMergeable.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...waitStagingDeploys/awaitStagingDeploys.js → ...waitStagingDeploys/awaitStagingDeploys.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.