Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍒 Cherry pick PR #10378 to staging 🍒 #10381

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions .github/actions/composite/updateProtectedBranch/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Update Protected Branch
description: Create, approve, and merge a pull request against a protected branch
description: Update a protected branch

inputs:
TARGET_BRANCH:
description: The target branch to update. This becomes the base branch of the pull request.
description: The target branch to update.
required: true
SOURCE_BRANCH:
description: If updating main, you must also provide a head branch to update main with.
Expand All @@ -23,7 +23,7 @@ runs:
if: ${{ !contains(fromJSON('["main", "staging", "production"]'), inputs.TARGET_BRANCH) }}
shell: bash
run: |
echo "Target branch must be one of ['main', 'staging', 'production]"
echo "Target branch must be one of ['main', 'staging', 'production']"
exit 1

# If updating main, SOURCE_BRANCH must not be empty
Expand Down Expand Up @@ -69,21 +69,9 @@ runs:
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 diff --name-only --diff-filter=U | xargs git rm;
git -c core.editor=true merge --continue;
}
git push --set-upstream origin "$BRANCH_NAME"

- name: Create Pull Request
id: createPullRequest
if: ${{ inputs.TARGET_BRANCH == 'main' }}
shell: bash
run: |
gh pr create \
Expand Down Expand Up @@ -111,20 +99,22 @@ runs:
run: exit 1

- name: Auto-approve the PR
if: ${{ inputs.TARGET_BRANCH == 'main' }}
shell: bash
run: gh pr review --approve
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Check if pull request is mergeable
if: ${{ inputs.TARGET_BRANCH == 'main' }}
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) }}
if: ${{ inputs.TARGET_BRANCH == 'main' && !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }}
shell: bash
run: |
gh pr comment --body \
Expand All @@ -134,12 +124,24 @@ runs:
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }}

- name: Fail workflow if PR is not mergeable
if: ${{ steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }}
if: ${{ inputs.TARGET_BRANCH == 'main' && steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }}
shell: bash
run: exit 1

- name: Auto-merge the PR
if: ${{ inputs.TARGET_BRANCH == 'main' }}
shell: bash
run: gh pr merge ${{ steps.createPullRequest.outputs.PR_NUMBER }} --merge --delete-branch
env:
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }}

- name: Delete staging/production and replace it with contents of main/staging
if: ${{ inputs.TARGET_BRANCH != 'main' }}
shell: bash
run: |
git checkout ${{ env.SOURCE_BRANCH }}
git branch -D ${{ inputs.TARGET_BRANCH }}
git checkout -b ${{ inputs.TARGET_BRANCH }}
git push --force origin ${{ inputs.TARGET_BRANCH }}
env:
GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }}
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001018807
versionName "1.1.88-7"
versionCode 1001018808
versionName "1.1.88-8"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.88.7</string>
<string>1.1.88.8</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.88.7</string>
<string>1.1.88.8</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.1.88-7",
"version": "1.1.88-8",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down