Skip to content

Commit

Permalink
Merge branch 'main' into issue46926P2
Browse files Browse the repository at this point in the history
  • Loading branch information
allgandalf authored Sep 26, 2024
2 parents d5e3428 + b930641 commit d47e156
Show file tree
Hide file tree
Showing 160 changed files with 2,093 additions and 1,204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ inputs:
GITHUB_TOKEN:
description: "Github token for authentication"
required: true
default: "${{ github.token }}"
ANDROID:
description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
Expand All @@ -27,6 +26,12 @@ inputs:
WEB:
description: "Web job result ('success', 'failure', 'cancelled', or 'skipped')"
required: true
DATE:
description: "The date of deployment"
required: false
NOTE:
description: "Additional note from the deployer"
required: false
runs:
using: "node20"
main: "./index.js"
11 changes: 10 additions & 1 deletion .github/actions/javascript/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12713,16 +12713,25 @@ async function run() {
const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true }));
const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true }));
const webResult = getDeployTableMessage(core.getInput('WEB', { required: true }));
const date = core.getInput('DATE');
const note = core.getInput('NOTE');
function getDeployMessage(deployer, deployVerb, prTitle) {
let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`;
message += ` by https://github.com/${deployer} in version: ${version} 🚀`;
message += ` by https://github.com/${deployer} in version: ${version} `;
if (date) {
message += `on ${date}`;
}
message += `🚀`;
message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`;
if (deployVerb === 'Cherry-picked' && !/no ?qa/gi.test(prTitle ?? '')) {
// eslint-disable-next-line max-len
message +=
'\n\n@Expensify/applauseleads please QA this PR and check it off on the [deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) if it passes.';
}
if (note) {
message += `\n\n_Note:_ ${note}`;
}
return message;
}
if (isProd) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ async function run() {
const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult);
const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult);

const date = core.getInput('DATE');
const note = core.getInput('NOTE');

function getDeployMessage(deployer: string, deployVerb: string, prTitle?: string): string {
let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`;
message += ` by https://github.com/${deployer} in version: ${version} 🚀`;
message += ` by https://github.com/${deployer} in version: ${version} `;
if (date) {
message += `on ${date}`;
}
message += `🚀`;
message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`;

Expand All @@ -67,6 +74,10 @@ async function run() {
'\n\n@Expensify/applauseleads please QA this PR and check it off on the [deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) if it passes.';
}

if (note) {
message += `\n\n_Note:_ ${note}`;
}

return message;
}

Expand Down
38 changes: 9 additions & 29 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -649,34 +649,14 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

postGithubComment:
name: Post a GitHub comments on all deployed PRs when platforms are done building and deploying
runs-on: ubuntu-latest
postGithubComments:
uses: ./.github/workflows/postDeployComments.yml
if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }}
needs: [prep, android, desktop, iOS, web, checkDeploymentSuccess, createPrerelease, finalizeRelease]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/composite/setupNode

- name: Get Release Pull Request List
id: getReleasePRList
uses: ./.github/actions/javascript/getDeployPullRequestList
with:
TAG: ${{ needs.prep.outputs.APP_VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}

- name: Comment on issues
uses: ./.github/actions/javascript/markPullRequestsAsDeployed
with:
PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }}
IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }}
DEPLOY_VERSION: ${{ needs.prep.outputs.APP_VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ANDROID: ${{ needs.android.result }}
DESKTOP: ${{ needs.desktop.result }}
IOS: ${{ needs.iOS.result }}
WEB: ${{ needs.web.result }}
with:
version: ${{ needs.prep.outputs.APP_VERSION }}
env: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }}
android: ${{ needs.android.result }}
ios: ${{ needs.iOS.result }}
web: ${{ needs.web.result }}
desktop: ${{ needs.desktop.result }}
118 changes: 118 additions & 0 deletions .github/workflows/postDeployComments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Post Deploy Comments

on:
workflow_call:
inputs:
version:
description: The version that was deployed
required: true
type: string
env:
description: The environment that was deployed (staging or prod)
required: true
type: string
android:
description: Android deploy status
required: true
type: string
ios:
description: iOS deploy status
required: true
type: string
web:
description: Web deploy status
required: true
type: string
desktop:
description: Desktop deploy status
required: true
type: string
workflow_dispatch:
inputs:
version:
description: The version that was deployed
required: true
type: string
env:
description: The environment that was deployed (staging or prod)
required: true
type: choice
options:
- staging
- production
android:
description: Android deploy status
required: true
type: choice
options:
- success
- failure
- cancelled
- skipped
ios:
description: iOS deploy status
required: true
type: choice
options:
- success
- failure
- cancelled
- skipped
web:
description: Web deploy status
required: true
type: choice
options:
- success
- failure
- cancelled
- skipped
desktop:
description: Desktop deploy status
required: true
type: choice
options:
- success
- failure
- cancelled
- skipped
date:
description: The date when this deploy occurred
required: false
type: string
note:
description: Any additional note you want to include with the deploy comment
required: false
type: string

jobs:
postDeployComments:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/composite/setupNode

- name: Get pull request list
id: getPullRequestList
uses: ./.github/actions/javascript/getDeployPullRequestList
with:
TAG: ${{ inputs.version }}
GITHUB_TOKEN: ${{ github.token }}
IS_PRODUCTION_DEPLOY: ${{ inputs.env == 'production' }}

- name: Comment on issues
uses: ./.github/actions/javascript/markPullRequestsAsDeployed
with:
PR_LIST: ${{ steps.getPullRequestList.outputs.PR_LIST }}
IS_PRODUCTION_DEPLOY: ${{ inputs.env == 'production' }}
DEPLOY_VERSION: ${{ inputs.version }}
GITHUB_TOKEN: ${{ github.token }}
ANDROID: ${{ inputs.android }}
DESKTOP: ${{ inputs.desktop }}
IOS: ${{ inputs.ios }}
WEB: ${{ inputs.web }}
DATE: ${{ inputs.date }}
NOTE: ${{ inputs.note }}
5 changes: 5 additions & 0 deletions __mocks__/react-native-haptic-feedback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type HapticFeedback from 'react-native-haptic-feedback';

const RNHapticFeedback: typeof HapticFeedback = {trigger: jest.fn()};

export default RNHapticFeedback;
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009003903
versionName "9.0.39-3"
versionCode 1009004001
versionName "9.0.40-1"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ MYAPP_UPLOAD_KEY_ALIAS=ReactNativeChat-Key-Alias
disableFrameProcessors=true

android.nonTransitiveRClass=false

org.gradle.parallel=true
73 changes: 73 additions & 0 deletions docs/articles/new-expensify/workspaces/Add-approvals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Add approvals
description: Add approvals to your workspace to require additional approval before authorizing payments.
---
<div id="new-expensify" markdown="1">

# Add approvals

Each Expensify workspace can be configured to require additional approvals before payments are authorized. Once approvals are enabled on a workspace, admins will be able to set a default approval workflow to apply to all members of the workspace, as well as set custom approval workflows for specific members.

When workspace members submit expenses, the expenses will require approval from each approver in their approval workflow before payment is authorized.

## Add approvals on a workspace

**To enable Add approvals on a workspace you are an admin on:**

1. Click your profile image or icon in the bottom left menu
2. Click **Workspaces** in the left menu
3. Select the workspace where you want to add approvals
4. Click **Workflows** in the left menu
5. Click the toggle next to **Add approvals**

Toggling on **Add approvals** will reveal an option to set a default approval workflow.

## Configure approval workflows

**To configure the default approval workflow for the workspace:**

1. Click your profile image or icon in the bottom left menu
2. Click **Workspaces** in the left menu
3. Select the workspace where you want to set the approval workflow
4. Click **Workflows** in the left menu
5. Under **Expenses from Everyone**, click on **First approver**
6. Select the workspace member who should be the first approver in the approval workflow
7. Under **Additional approver**, continue selecting workspace members until all the desired approvers are listed
8. Click **Save**

Note: When Add approvals is enabled, the workspace must have a default approval workflow.

**To set an approval workflow that applies only to specific workspace members:**

1. Click your profile image or icon in the bottom left menu
2. Click **Workspaces** in the left menu
3. Select the workspace where you want to add approvals
4. Click **Workflows** in the left menu
5. Under **Add approvals**, click on **Add approval workflow**
6. Choose the workspace member whose expenses should go through the custom approval workfow
7. Click **Next**
8. Choose the workspace member who should be the first approver on submitted expenses in the approval workflow
9. Click **Next**
10. Click **Additional approver** to continue selecting workspace members until all the desired approvers are listed
11. Click **Add workflow** to save it

## Edit or delete approval workflows

**To edit an approval workflow:**

1. On the **Workflows** page, click the approval workflow that should be edited
2. Click on the Approver field for the approval level where the edit should be made
3. Choose the workspace member who should be set as the approver for that level, or deselect them to remove the approval level from the workflow
4. Click **Save**

**To delete an approval workflow:**

1. On the **Workflows** page, click the approval workflow that shoudld be deleted
2. Click **Delete**
3. In the window that appears,click **Delete** again

# FAQ

## Can an employee have more than one approval workflow?
No, each employee can have only one approval workflow

50 changes: 50 additions & 0 deletions docs/articles/new-expensify/workspaces/Set-distance-rates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Set Distance Rates
description: Set distance rates on your Expensify workspace
---
<div id="new-expensify" markdown="1">

# Set Distance eates

Each Expensify workspace can be configured with one or more distance rates. Once distance rates are enabled on your workspace, employees will be able to choose between the available rates to create distance expenses.

## Enable distance rates on a workspace

**To enable distance rates on a workspace you are an admin on:**

1. Click your profile image or icon in the bottom left menu
2. Click **Workspaces** in the left menu
3. Select the workspace where you want to enable distance rates
4. Click **More features** in the left menu
5. Click the toggle next to **Distance rates**

After toggling on distance rates, you will see a new **Distance rates** option in the left menu.

## Add, delete, or edit distance rates

**To add a distance rate:**

1. Click your profile image or icon in the bottom left menu
2. Click **Workspaces** in the left menu
3. Select the workspace where you want to add distance rates
4. Click **Distance rates** in the left menu
5. Click **Add rate** in the top right
6. Enter a value, then click **Save**

**To enable, disable, edit or delete a single distance rate:**

1. Click the distance rate on the **Distance rates** settings page
2. To enable or disable the distance rate, click the toggle next to **Enable rate**, then click **Save**
3. To edit the rate amount, click on the amount field, enter the new value, then click **Save**
4. To permanently delete the distance rate, click **Delete**

Note: When Distance rates is enabled, the workspace must have at least one enabled distance rate.

**To enable, disable, edit or delete distance rates in bulk:**

1. On the **Distance rates** settings page, click the checkboxes next to the distance rates that should me modified
2. Click “x selected” at the top right
3. To enable or disable all the selected distance rates, click **Enable rates** or **Disable rates**
4. To permanently delete the distance rates, click **Delete rates**

Note: When Distance rates are enabled, the workspace must have at least one enabled distance rate.
Binary file modified ios/NewApp_AdHoc.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg
Binary file not shown.
Loading

0 comments on commit d47e156

Please sign in to comment.