Skip to content

Commit

Permalink
Merge branch 'main' into han-fix-magnifying-glass
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/components/ImageView/index.js
#	src/styles/styles.js
  • Loading branch information
railway17 committed Dec 2, 2021
2 parents 2167b00 + fa46930 commit 11fce35
Show file tree
Hide file tree
Showing 278 changed files with 5,475 additions and 3,722 deletions.
25 changes: 22 additions & 3 deletions .github/actions/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,33 @@ const {execSync} = __nccwpck_require__(3129);
* @returns {Array}
*/
function getPullRequestsMergedBetween(fromRef, toRef) {
const command = `git log --format="%s" ${fromRef}...${toRef}`;
const command = `git log --format="{[%B]}" ${fromRef}...${toRef}`;
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
console.log('Running command: ', command);
const localGitLogs = execSync(command).toString();
return _.map(
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],

// Parse the git log into an array of commit messages between the two refs
const commitMessages = _.map(
[...localGitLogs.matchAll(/{\[([\s\S]*?)\]}/gm)],
match => match[1],
);
console.log(`A list of commits made between ${fromRef} and ${toRef}:\n${commitMessages}`);

// We need to find which commit messages correspond to merge commits and get PR numbers.
// Additionally, we omit merge commits made while cherry picking using negative lookahead in the regexp.
const pullRequestIDs = _.reduce(commitMessages, (mergedPRs, commitMessage) => {
const mergeCommits = [
...commitMessage.matchAll(/Merge pull request #(\d{1,6}) from (?!(?:Expensify\/(?:master|main|version-))|(?:([\s\S]*?)\(cherry picked from commit .*\)\s*))/gm),
];

// Get the PR number of the first match (there should not be multiple matches in one commit message)
if (_.size(mergeCommits)) {
mergedPRs.push(mergeCommits[0][1]);
}
return mergedPRs;
}, []);
console.log(`A list of pull requests merged between ${fromRef} and ${toRef}:\n${pullRequestIDs}`);
return pullRequestIDs;
}

module.exports = {
Expand Down
25 changes: 22 additions & 3 deletions .github/actions/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,33 @@ const {execSync} = __nccwpck_require__(3129);
* @returns {Array}
*/
function getPullRequestsMergedBetween(fromRef, toRef) {
const command = `git log --format="%s" ${fromRef}...${toRef}`;
const command = `git log --format="{[%B]}" ${fromRef}...${toRef}`;
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
console.log('Running command: ', command);
const localGitLogs = execSync(command).toString();
return _.map(
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],

// Parse the git log into an array of commit messages between the two refs
const commitMessages = _.map(
[...localGitLogs.matchAll(/{\[([\s\S]*?)\]}/gm)],
match => match[1],
);
console.log(`A list of commits made between ${fromRef} and ${toRef}:\n${commitMessages}`);

// We need to find which commit messages correspond to merge commits and get PR numbers.
// Additionally, we omit merge commits made while cherry picking using negative lookahead in the regexp.
const pullRequestIDs = _.reduce(commitMessages, (mergedPRs, commitMessage) => {
const mergeCommits = [
...commitMessage.matchAll(/Merge pull request #(\d{1,6}) from (?!(?:Expensify\/(?:master|main|version-))|(?:([\s\S]*?)\(cherry picked from commit .*\)\s*))/gm),
];

// Get the PR number of the first match (there should not be multiple matches in one commit message)
if (_.size(mergeCommits)) {
mergedPRs.push(mergeCommits[0][1]);
}
return mergedPRs;
}, []);
console.log(`A list of pull requests merged between ${fromRef} and ${toRef}:\n${pullRequestIDs}`);
return pullRequestIDs;
}

module.exports = {
Expand Down
25 changes: 22 additions & 3 deletions .github/libs/GitUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,33 @@ const {execSync} = require('child_process');
* @returns {Array}
*/
function getPullRequestsMergedBetween(fromRef, toRef) {
const command = `git log --format="%s" ${fromRef}...${toRef}`;
const command = `git log --format="{[%B]}" ${fromRef}...${toRef}`;
console.log('Getting pull requests merged between the following refs:', fromRef, toRef);
console.log('Running command: ', command);
const localGitLogs = execSync(command).toString();
return _.map(
[...localGitLogs.matchAll(/Merge pull request #(\d{1,6}) from (?!Expensify\/(?:master|main|version-))/g)],

// Parse the git log into an array of commit messages between the two refs
const commitMessages = _.map(
[...localGitLogs.matchAll(/{\[([\s\S]*?)\]}/gm)],
match => match[1],
);
console.log(`A list of commits made between ${fromRef} and ${toRef}:\n${commitMessages}`);

// We need to find which commit messages correspond to merge commits and get PR numbers.
// Additionally, we omit merge commits made while cherry picking using negative lookahead in the regexp.
const pullRequestIDs = _.reduce(commitMessages, (mergedPRs, commitMessage) => {
const mergeCommits = [
...commitMessage.matchAll(/Merge pull request #(\d{1,6}) from (?!(?:Expensify\/(?:master|main|version-))|(?:([\s\S]*?)\(cherry picked from commit .*\)\s*))/gm),
];

// Get the PR number of the first match (there should not be multiple matches in one commit message)
if (_.size(mergeCommits)) {
mergedPRs.push(mergeCommits[0][1]);
}
return mergedPRs;
}, []);
console.log(`A list of pull requests merged between ${fromRef} and ${toRef}:\n${pullRequestIDs}`);
return pullRequestIDs;
}

module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* [Local Development](#local-development)
* [Running The Tests](#running-the-tests)
* [Debugging](#debugging)
* [Structure of the app](#structure-of-the-app)
* [App Structure and Conventions](#app-structure-and-conventions)
* [Philosophy](#Philosophy)
* [Internationalization](#Internationalization)
* [Deploying](#deploying)
Expand Down Expand Up @@ -124,7 +124,7 @@ Our React Native Android app now uses the `Hermes` JS engine which requires your

---

# App structure and conventions
# App Structure and Conventions

## Onyx
This is a persistent storage solution wrapped in a Pub/Sub library. In general that means:
Expand Down Expand Up @@ -373,13 +373,13 @@ The [preDeploy workflow](https://github.com/Expensify/App/blob/main/.github/work
- Otherwise:
- Create a new version by triggering the [`createNewVersion` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/createNewVersion.yml)
- Use the [`updateProtectedBranch` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/updateProtectedBranch.yml) to update the `staging` branch.
- Also, if the pull request has the `CP Staging` label, it will execute the [`cherryPick` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/cherryPick.yml) to deploy the pull request directly to staging, even if the `StagingDeployCash` is locked
- Also, if the pull request has the `CP Staging` label, it will execute the [`cherryPick` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/cherryPick.yml) to deploy the pull request directly to staging, even if the `StagingDeployCash` is locked.

### deploy
The [`deploy` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/deploy.yml) is really quite simple. It runs when code is pushed to the `staging` or `production` branches, and:

- If `staging` was updated, it creates a tag matching the new version, and pushes tags.
- If `production` was updated, it creates a GitHub Release for the new version
- If `production` was updated, it creates a GitHub Release for the new version.

### platformDeploy
The [`platformDeploy` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/platformDeploy.yml) is what actually runs the deployment on all four platforms (iOS, Android, Web, macOS Desktop). It runs a staging deploy whenever a new tag is pushed to GitHub, and runs a production deploy whenever a new release is created.
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001011601
versionName "1.1.16-1"
versionCode 1001011704
versionName "1.1.17-4"
}
splits {
abi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import androidx.multidex.MultiDexApplication;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.existfragger.rnimagesize.RNImageSizePackage;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<resources>
<color name="bootsplash_background">#FFFFFF</color>
<color name="white">#FAFAFA</color>
<color name="accent">#0185ff</color>
<color name="dark">#0b1b34</color>
<color name="gray4">#7D8B8F</color>
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<item name="android:textColor">@color/dark</item>
<item name="android:colorEdgeEffect">@color/gray4</item>
<item name="colorAccent">@color/accent</item>
<item name="android:statusBarColor">@color/white</item>
<item name="android:windowLightStatusBar">true</item>
</style>

<style name="BootTheme" parent="AppTheme">
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'NewExpensify'
include ':react-native-image-size'
project(':react-native-image-size').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-size/android')
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
Expand Down
15 changes: 15 additions & 0 deletions assets/images/eye-disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/images/three-dots.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions build/react-native-web.sh

This file was deleted.

2 changes: 1 addition & 1 deletion config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const webpackConfig = {
{from: 'assets/css', to: 'css'},
{from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'},
{from: 'assets/images/shadow.png', to: 'images/shadow.png'},
{from: '.well-known/apple-app-site-association'},
{from: '.well-known/apple-app-site-association', to: '.well-known/apple-app-site-association'},

// These files are copied over as per instructions here
// https://github.com/wojtekmaj/react-pdf#copying-cmaps
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/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.1.16</string>
<string>1.1.17</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.16.1</string>
<string>1.1.17.4</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/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.1.16</string>
<string>1.1.17</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.16.1</string>
<string>1.1.17.4</string>
</dict>
</plist>
35 changes: 32 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ PODS:
- GoogleUtilities/Logger
- hermes-engine (0.7.2)
- libevent (2.1.12)
- libwebp (1.2.1):
- libwebp/demux (= 1.2.1)
- libwebp/mux (= 1.2.1)
- libwebp/webp (= 1.2.1)
- libwebp/demux (1.2.1):
- libwebp/webp
- libwebp/mux (1.2.1):
- libwebp/demux
- libwebp/webp (1.2.1)
- nanopb (2.30908.0):
- nanopb/decode (= 2.30908.0)
- nanopb/encode (= 2.30908.0)
Expand Down Expand Up @@ -416,7 +425,7 @@ PODS:
- React-Core
- react-native-image-picker (4.0.3):
- React-Core
- react-native-netinfo (5.9.10):
- react-native-netinfo (7.1.3):
- React-Core
- react-native-pdf (6.2.2):
- React-Core
Expand Down Expand Up @@ -509,6 +518,10 @@ PODS:
- React-Core
- RNDateTimePicker (3.5.2):
- React-Core
- RNFastImage (8.5.11):
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFBAnalytics (12.3.0):
- Firebase/Analytics (= 8.4.0)
- React-Core
Expand Down Expand Up @@ -563,6 +576,12 @@ PODS:
- React-Core
- RNSVG (12.1.0):
- React
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
- SDWebImage/Core (5.11.1)
- SDWebImageWebPCoder (0.8.4):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- urbanairship-react-native (11.0.2):
- Airship (= 14.4.2)
- React-Core
Expand Down Expand Up @@ -646,6 +665,7 @@ DEPENDENCIES:
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
- "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)"
- RNFastImage (from `../node_modules/react-native-fast-image`)
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)"
Expand Down Expand Up @@ -685,12 +705,15 @@ SPEC REPOS:
- GoogleUtilities
- hermes-engine
- libevent
- libwebp
- nanopb
- Onfido
- OpenSSL-Universal
- Plaid
- PromisesObjC
- Protobuf
- SDWebImage
- SDWebImageWebPCoder
- YogaKit

EXTERNAL SOURCES:
Expand Down Expand Up @@ -794,6 +817,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-picker/picker"
RNDateTimePicker:
:path: "../node_modules/@react-native-community/datetimepicker"
RNFastImage:
:path: "../node_modules/react-native-fast-image"
RNFBAnalytics:
:path: "../node_modules/@react-native-firebase/analytics"
RNFBApp:
Expand Down Expand Up @@ -825,7 +850,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
FBReactNativeSpec: 1d564cbdef3e1546843d1f1ceb0e4463b7993e3a
FBReactNativeSpec: 884d4cc2b011759361797a4035c47e10099393b5
Firebase: 54cdc8bc9c9b3de54f43dab86e62f5a76b47034f
FirebaseABTesting: c3e48ebf5e7e5c674c5a131c68e941d7921d83dc
FirebaseAnalytics: 4751d6a49598a2b58da678cc07df696bcd809ab9
Expand All @@ -849,6 +874,7 @@ SPEC CHECKSUMS:
GoogleUtilities: 3df19e3c24f7bbc291d8b5809aa6b0d41e642437
hermes-engine: 7d97ba46a1e29bacf3e3c61ecb2804a5ddd02d4f
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
Onfido: 116a268e4cb8b767c15285e8071c2e8304673cdf
onfido-react-native-sdk: b8f1b7cbe1adab6479d735275772390161630dcd
Expand All @@ -874,7 +900,7 @@ SPEC CHECKSUMS:
react-native-document-picker: 0e3602a4064da040321bafad6848d8b0edcb1d55
react-native-flipper: 169e8ba429b73ad637ce007337ce4b415e783799
react-native-image-picker: 4089335b89b625d4e34d53fb249c48a7a791b3ea
react-native-netinfo: 52cf0ee8342548a485e28f4b09e56b477567244d
react-native-netinfo: 3a61a486f2329f5884753fd5bab21450a535d97c
react-native-pdf: 4b5a9e4465a6a3b399e91dc4838eb44ddf716d1f
react-native-performance: 8edfa2bbc9a2af4a02f01d342118e413a95145e0
react-native-plaid-link-sdk: dcc247a441571b6e0b9029ab00a30f82e4cfa906
Expand All @@ -900,6 +926,7 @@ SPEC CHECKSUMS:
RNCMaskedView: 138134c4d8a9421b4f2bf39055a79aa05c2d47b1
RNCPicker: 6780c753e9e674065db90d9c965920516402579d
RNDateTimePicker: c9911be59b1f8670b9f244b85af3a7c295e175ed
RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7
RNFBAnalytics: 8ba84c2d31c64374d054c8621b998f25145ffddc
RNFBApp: 64c90ab78b6010ed5c3ade026dfe5ff6442c21fd
RNFBCrashlytics: 1de18b8cc36d9bcf86407c4a354399228cc84a61
Expand All @@ -910,6 +937,8 @@ SPEC CHECKSUMS:
RNReanimated: 833ebd229b31e18a8933ebd0cd744a0f47d88c42
RNScreens: e8e8dd0588b5da0ab57dcca76ab9b2d8987757e0
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
urbanairship-react-native: 60b4b4235838ff109a2639b639e2ef01d54ad455
Yoga: a7de31c64fe738607e7a3803e3f591a4b1df7393
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
Expand Down
Loading

0 comments on commit 11fce35

Please sign in to comment.