Skip to content

Commit

Permalink
Merge pull request #18 from Expensify/main
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
tugbadogan committed Apr 23, 2021
2 parents bada5ba + 64e56c6 commit d16c1b2
Show file tree
Hide file tree
Showing 44 changed files with 453 additions and 407 deletions.
3 changes: 3 additions & 0 deletions .github/actions/markPullRequestsAsDeployed/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
description: "Check if deploying to production"
required: false
default: "false"
VERSION:
description: "The app version in which the pull requests were deployed"
required: true
GITHUB_TOKEN:
description: "Github token for authentication"
required: true
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const prList = JSON.parse(core.getInput('PR_LIST', {required: true}));
const isProd = JSON.parse(
core.getInput('IS_PRODUCTION_DEPLOY', {required: true}),
);
const version = JSON.parse(core.getInput('VERSION', {required: true}));
const token = core.getInput('GITHUB_TOKEN', {required: true});
const octokit = github.getOctokit(token);
const githubUtils = new GithubUtils(octokit);
Expand Down Expand Up @@ -48,7 +49,7 @@ const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}));
const workflowURL = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}`
+ `/actions/runs/${process.env.GITHUB_RUN_ID}`;

let message = `🚀 [Deployed](${workflowURL}) to ${isProd ? 'production' : 'staging'} 🚀`;
let message = `🚀 [Deployed](${workflowURL}) to ${isProd ? 'production' : 'staging'} in version: ${version}🚀`;
message += `\n\n platform | result \n ---|--- \n🤖 android 🤖|${androidResult} \n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult} \n🕸 web 🕸|${webResult}`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const prList = JSON.parse(core.getInput('PR_LIST', {required: true}));
const isProd = JSON.parse(
core.getInput('IS_PRODUCTION_DEPLOY', {required: true}),
);
const version = JSON.parse(core.getInput('VERSION', {required: true}));
const token = core.getInput('GITHUB_TOKEN', {required: true});
const octokit = github.getOctokit(token);
const githubUtils = new GithubUtils(octokit);
Expand Down Expand Up @@ -38,7 +39,7 @@ const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}));
const workflowURL = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}`
+ `/actions/runs/${process.env.GITHUB_RUN_ID}`;

let message = `🚀 [Deployed](${workflowURL}) to ${isProd ? 'production' : 'staging'} 🚀`;
let message = `🚀 [Deployed](${workflowURL}) to ${isProd ? 'production' : 'staging'} in version: ${version}🚀`;
message += `\n\n platform | result \n ---|--- \n🤖 android 🤖|${androidResult} \n🖥 desktop 🖥|${desktopResult}`;
message += `\n🍎 iOS 🍎|${iOSResult} \n🕸 web 🕸|${webResult}`;

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployBlocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
NEW_DEPLOY_BLOCKERS: ${{ github.event.issue.html_url }}

- name: Update StagingDeployCash with issue
- name: Update StagingDeployCash with pull request
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
if: ${{ github.event_name == 'pull_request' }}
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ jobs:
with:
PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }}
IS_PRODUCTION_DEPLOY: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
VERSION: ${{ env.VERSION }}
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
ANDROID: ${{ needs.android.result }}
DESKTOP: ${{ needs.desktop.result }}
Expand Down
38 changes: 22 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,46 @@ If you are hired for an Upwork job and have any job-specific questions, please a
If you've found a vulnerability, please email security@expensify.com with the subject `Vulnerability Report` instead of creating an issue.

## Payment for Contributions
We hire and pay external contributors via Upwork.com. If you'd like to be paid for contributing, please create an Upwork account and apply for a job in the [Upwork issue list](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Payment for your contributions will be made no less than 7 days after the pull request is merged to allow for regression testing. We hire one contributor for each Upwork job. New Expensify.cash contributors are limited to working on one job at a time, however experienced contributors may work on numerous jobs simultaneously. If you have not received payment after 8 days of the PR being deployed to production, please email contributors@expensify.com referencing the GH issue and your GH handle.
We hire and pay external contributors via Upwork.com. If you'd like to be paid for contributing, please create an Upwork account and apply for a job in the [Upwork issue list](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Payment for your contributions will be made no less than 7 days after the pull request is merged to allow for regression testing. We hire one contributor for each Upwork job. New Expensify.cash contributors are limited to working on one job at a time, however experienced contributors may work on numerous jobs simultaneously. If you have not received payment after 8 days of the PR being deployed to production, please email contributors@expensify.com referencing the GH issue and your GH handle.

## Finding Expensify.cash Jobs
There are two ways you can find an Expensify.cash job that you can contribute to:
There are two ways you can find an Expensify.cash job that you can contribute to:

#### Finding a job that Expensify posted
This is the most common scenario for contributors. The Expensify team posts Expensify.cash jobs to the Upwork job list [here](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Each job in Upwork has a corresponding GitHub issue, which will include instructions to follow.
This is the most common scenario for contributors. The Expensify team posts Expensify.cash jobs to the Upwork job list [here](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2). Each job in Upwork has a corresponding GitHub issue, which will include instructions to follow.

#### Proposing a job that Expensify hasn’t posted

In this scenario, it’s possible that you found a bug or enhancement that we haven’t posted to the [Upwork job list](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2) or [Github repository](https://github.com/Expensify/Expensify.cash/issues?q=is%3Aissue). This is an opportunity to propose a job, and (optionally) a solution. If it's a valid job proposal, we will compensate you for the solution and give an additional bonus of $150 for proactively proposing the job. In this case, please take the following steps:

1. Check to ensure an issue does not already exist in the Expensify.cash Issue list or Upwork job list. Please use your best judgement to search for similar titles and issue descriptions.
2. If your bug or enhancement matches an existing issue, please feel free to comment on that GitHub issue with your findings if you think it’ll help solve a problem.
3. If there is no existing issue or Upwork job, create a new GitHub issue in the Expensify.cash repo.
4. Make sure to fill out all the required information fields in the issue template.
5. Optional: If you would like to solve the bug or enhancement that you are proposing, please add a comment on your issue with a solution proposal.
1. Check to ensure an issue does not already exist in the Expensify.cash Issue list or Upwork job list. Please use your best judgement to search for similar titles and issue descriptions.
2. If your bug or enhancement matches an existing issue, please feel free to comment on that GitHub issue with your findings if you think it’ll help solve a problem.
3. If there is no existing issue or Upwork job, create a new GitHub issue in the Expensify.cash repo.
4. Make sure to fill out all the required information fields in the issue template.
5. Optional: If you would like to solve the bug or enhancement that you are proposing, please add a comment on your issue with a solution proposal.
6. Pause on this step until a member of the Expensify team responds on your issue with next steps.

## Working on an Expensify.cash Jobs
>**Note:** Our problem solving approach at Expensify is to focus on high value problems and avoid small optimizations with results that are difficult to measure. We also prefer to identify and solve problems at their root. Given that, please ensure all proposed jobs fix a specific problem in a measurable way with evidence so they are easy to evaluate. Here's an example of a good problem/solution:
>
>**Problem:** The app start up time has regressed because we introduced "New Feature" in PR #12345 and is now 1042ms slower because `SomeComponent` is re-rendering 42 times.
>
>**Solution:** Start up time will perceptibly decrease by 1042ms if we prevent the unnecessary re-renders of this component.
## Working on Expensify.cash Jobs
*Reminder: For technical guidance please refer to the [README](https://github.com/Expensify/Expensify.cash/blob/main/README.md)*.

#### Express interest for the job on Upwork.com

1. If you are interested in working on a job posted in Upwork, click **Submit a Proposal** in Upwork to express your interest to the Expensify team.
1. If you are interested in working on a job posted in Upwork, click **Submit a Proposal** in Upwork to express your interest to the Expensify team.

#### Make sure you can reproduce the problem
2. Use your test account(s) to reproduce the problem by following the steps in the GitHub issue.
2. Use your test account(s) to reproduce the problem by following the steps in the GitHub issue.
3. If you cannot reproduce the problem, pause on this step and add a comment to the issue explaining where you are stuck.

#### Propose a solution for the job
#### Propose a solution for the job
4. After you reproduce the issue, make a proposal for your solution and post it as a comment in the corresponding GitHub issue (linked in the Upwork job). Your solution proposal should include a brief technical explanation of the changes you will make.
5. Pause at this step until Expensify provides feedback on your proposal (do not begin coding or creating a pull request yet).
6. If your solution proposal is accepted, Expensify will hire you on Upwork and assign the GitHub issue to you.
5. Pause at this step until Expensify provides feedback on your proposal (do not begin coding or creating a pull request yet).
6. If your solution proposal is accepted, Expensify will hire you on Upwork and assign the GitHub issue to you.

#### Begin coding your solution in a pull request
7. When you are ready to start, fork the repository and create a new branch.
Expand All @@ -79,8 +85,8 @@ In this scenario, it’s possible that you found a bug or enhancement that we ha
13. Please never force push when a PR review has already started (because this messes with the PR review history)
14. Upon submission of a PR, please include a numbered list of explicit testing steps for each platform (Web, Desktop, iOS, and Android) to confirm the fix works as expected and there are no regressions.

#### Timeline expectations and asking for help along the way
- If you have made a change to your pull request and are ready for another review, leave a comment that says "Updated" on the pull request itself.
#### Timeline expectations and asking for help along the way
- If you have made a change to your pull request and are ready for another review, leave a comment that says "Updated" on the pull request itself.
- Please keep the conversation in GitHub, and do not ping individual reviewers in Slack or Upwork to get their attention.
- Pull Request reviews can sometimes take a few days. If your pull request has not been addressed after four days please let us know via the #expensify-open-source Slack channel.

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001002702
versionName "1.0.27-2"
versionCode 1001002902
versionName "1.0.29-2"
}
splits {
abi {
Expand Down
4 changes: 2 additions & 2 deletions ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.27</string>
<string>1.0.29</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.27.2</string>
<string>1.0.29.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.27</string>
<string>1.0.29</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.27.2</string>
<string>1.0.29.2</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.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.27-2",
"version": "1.0.29-2",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand All @@ -10,6 +10,7 @@
"android": "react-native run-android",
"ios": "react-native run-ios",
"ipad": "react-native run-ios --simulator=\"iPad Pro (12.9-inch) (4th generation)\"",
"ipad-sm": "react-native run-ios --simulator=\"iPad Pro (9.7-inch)\"",
"desktop": "node desktop/start.js",
"start": "react-native start",
"web": "node web/proxy.js & webpack-dev-server --open --config config/webpack/webpack.dev.js",
Expand Down
10 changes: 6 additions & 4 deletions src/ROUTES.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import lodashGet from 'lodash/get';
import {addTrailingForwardSlash} from './libs/Url';
import {wrapWithForwardSlash} from './libs/Url';

/**
* This is a file containing constants for all of the routes we want to be able to go to
Expand All @@ -21,8 +21,10 @@ export default {
REPORT,
REPORT_WITH_ID: 'r/:reportID',
getReportRoute: reportID => `r/${reportID}`,
IOU_REQUEST: 'iou/request',
IOU_BILL: 'iou/split',
IOU_REQUEST: 'iou/request/:reportID',
getIouRequestRoute: reportID => `iou/request/${reportID}`,
IOU_BILL: 'iou/split/:reportID',
getIouSplitRoute: reportID => `iou/split/${reportID}`,
SEARCH: 'search',
SIGNIN: 'signin',
SET_PASSWORD_WITH_VALIDATE_CODE: 'setpassword/:accountID/:validateCode',
Expand All @@ -41,7 +43,7 @@ export default {
* @returns {Object}
*/
parseReportRouteParams: (route) => {
if (!route.startsWith(addTrailingForwardSlash(REPORT))) {
if (!route.startsWith(wrapWithForwardSlash(REPORT))) {
return {};
}

Expand Down
7 changes: 3 additions & 4 deletions src/components/AnchorForCommentsOnly/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {StyleSheet, Text} from 'react-native';
import {StyleSheet} from 'react-native';
import anchorForCommentsOnlyPropTypes from './anchorForCommentsOnlyPropTypes';

const defaultProps = {
Expand All @@ -18,17 +18,16 @@ const AnchorForCommentsOnly = ({
style,
...props
}) => (
<Text
<a
style={StyleSheet.flatten(style)}
accessibilityRole="link"
href={href}
rel={rel}
target={target}
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
>
{children}
</Text>
</a>
);

AnchorForCommentsOnly.propTypes = anchorForCommentsOnlyPropTypes;
Expand Down
117 changes: 0 additions & 117 deletions src/components/CreateMenu.js

This file was deleted.

Loading

0 comments on commit d16c1b2

Please sign in to comment.