Skip to content

Commit ab9b642

Browse files
authored
Merge pull request #3531 from Expensify/update-staging-from-main
2 parents 4fa064e + faa4d75 commit ab9b642

File tree

20 files changed

+113
-47
lines changed

20 files changed

+113
-47
lines changed

.github/workflows/cherryPick.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: Save correct NEW_VERSION to env
8686
run: |
87-
if [[ -z ${{ github.event.inputs.NEW_VERSION }} ]]; then
87+
if [ -z ${{ github.event.inputs.NEW_VERSION }} ]; then
8888
echo "NEW_VERSION=${{ needs.createNewVersion.outputs.NEW_VERSION }}" >> $GITHUB_ENV
8989
echo "New version is ${{ env.NEW_VERSION }}"
9090
else
@@ -120,6 +120,9 @@ jobs:
120120
echo "::set-output name=SHOULD_AUTOMERGE::false"
121121
fi
122122
123+
- name: Push changes to CP branch
124+
run: git push
125+
123126
- name: Create Pull Request
124127
id: createPullRequest
125128
# Version: 2.4.3

.github/workflows/updateProtectedBranch.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
echo "Cannot update main branch without specifying a source branch"
3131
exit 1
3232
33-
# If updating staging, the head branch will always be main
34-
# If updating production, the head branch will always be staging
33+
# If updating staging, the source branch will always be main
34+
# If updating production, the source branch will always be staging
3535
- name: Set source branch
3636
run: |
3737
if [[ ${{ github.event.inputs.TARGET_BRANCH }} == 'staging' ]]; then
38-
echo "HEAD_BRANCH=main" >> $GITHUB_ENV
38+
echo "SOURCE_BRANCH=main" >> $GITHUB_ENV
3939
elif [[ ${{ github.event.inputs.TARGET_BRANCH }} == 'production' ]]; then
40-
echo "HEAD_BRANCH=staging" >> $GITHUB_ENV
40+
echo "SOURCE_BRANCH=staging" >> $GITHUB_ENV
4141
else
42-
echo "HEAD_BRANCH=${{ github.event.inputs.SOURCE_BRANCH }}" >> $GITHUB_ENV
42+
echo "SOURCE_BRANCH=${{ github.event.inputs.SOURCE_BRANCH }}" >> $GITHUB_ENV
4343
fi
4444
4545
# Version: 2.3.4
@@ -48,18 +48,28 @@ jobs:
4848
fetch-depth: 0
4949
token: ${{ secrets.OS_BOTIFY_TOKEN }}
5050

51-
- name: Checkout head branch
52-
run: git checkout ${{ env.HEAD_BRANCH }}
51+
- name: Checkout source branch
52+
run: git checkout ${{ env.SOURCE_BRANCH }}
5353

5454
- name: Set New Version
5555
run: echo "NEW_VERSION=$(npm run print-version --silent)" >> $GITHUB_ENV
5656

57+
- name: Create temporary branch to resolve conflicts
58+
if: ${{ contains(fromJSON('["staging", "production"]'), github.event.inputs.TARGET_BRANCH) }}
59+
run: |
60+
git config user.name ${{ github.actor }}
61+
git checkout ${{ github.event.inputs.TARGET_BRANCH }}
62+
git checkout -b update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}
63+
git merge -Xtheirs ${{ env.SOURCE_BRANCH }}
64+
git push --set-upstream origin update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}
65+
echo "SOURCE_BRANCH=update-${{ github.event.inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }}" >> $GITHUB_ENV
66+
5767
- name: Create Pull Request
5868
id: createPullRequest
5969
# Version: 2.4.3
6070
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3
6171
with:
62-
source_branch: ${{ env.HEAD_BRANCH }}
72+
source_branch: ${{ env.SOURCE_BRANCH }}
6373
destination_branch: ${{ github.event.inputs.TARGET_BRANCH }}
6474
github_token: ${{ secrets.OS_BOTIFY_TOKEN }}
6575
pr_title: Update version to ${{ env.NEW_VERSION }} on ${{ github.event.inputs.TARGET_BRANCH }}

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ android {
148148
minSdkVersion rootProject.ext.minSdkVersion
149149
targetSdkVersion rootProject.ext.targetSdkVersion
150150
multiDexEnabled rootProject.ext.multiDexEnabled
151-
versionCode 1001006605
152-
versionName "1.0.66-5"
151+
versionCode 1001006613
152+
versionName "1.0.66-13"
153153
}
154154
splits {
155155
abi {

ios/ExpensifyCash/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</dict>
3131
</array>
3232
<key>CFBundleVersion</key>
33-
<string>1.0.66.5</string>
33+
<string>1.0.66.13</string>
3434
<key>ITSAppUsesNonExemptEncryption</key>
3535
<false/>
3636
<key>LSApplicationQueriesSchemes</key>

ios/ExpensifyCashTests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>1.0.66.5</string>
22+
<string>1.0.66.13</string>
2323
</dict>
2424
</plist>

ios/Podfile.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
PODS:
2-
- Airship (14.2.0):
3-
- Airship/Automation (= 14.2.0)
4-
- Airship/Core (= 14.2.0)
5-
- Airship/ExtendedActions (= 14.2.0)
6-
- Airship/MessageCenter (= 14.2.0)
7-
- Airship/Automation (14.2.0):
2+
- Airship (14.3.0):
3+
- Airship/Automation (= 14.3.0)
4+
- Airship/Core (= 14.3.0)
5+
- Airship/ExtendedActions (= 14.3.0)
6+
- Airship/MessageCenter (= 14.3.0)
7+
- Airship/Automation (14.3.0):
88
- Airship/Core
9-
- Airship/Core (14.2.0)
10-
- Airship/ExtendedActions (14.2.0):
9+
- Airship/Core (14.3.0)
10+
- Airship/ExtendedActions (14.3.0):
1111
- Airship/Core
12-
- Airship/MessageCenter (14.2.0):
12+
- Airship/MessageCenter (14.3.0):
1313
- Airship/Core
1414
- boost-for-react-native (1.63.0)
1515
- CocoaAsyncSocket (7.6.5)
@@ -494,8 +494,8 @@ PODS:
494494
- React-Core
495495
- RNSVG (12.1.0):
496496
- React
497-
- urbanairship-react-native (10.0.0):
498-
- Airship (= 14.2.0)
497+
- urbanairship-react-native (11.0.1):
498+
- Airship (= 14.3.0)
499499
- React-Core
500500
- Yoga (1.14.0)
501501
- YogaKit (1.18.1):
@@ -728,12 +728,12 @@ EXTERNAL SOURCES:
728728
:path: "../node_modules/react-native/ReactCommon/yoga"
729729

730730
SPEC CHECKSUMS:
731-
Airship: 02ad73780f9eed21870e36b0aaab327acda6a102
731+
Airship: 7609d263d3a207f112d6db066af5852b80af6819
732732
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
733733
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
734-
DoubleConversion: cde416483dac037923206447da6e1454df403714
734+
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
735735
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
736-
FBReactNativeSpec: 884d4cc2b011759361797a4035c47e10099393b5
736+
FBReactNativeSpec: 825b0f0851f5cc5c6268a920286281f62fc96c37
737737
Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999
738738
FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f
739739
FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec
@@ -747,7 +747,7 @@ SPEC CHECKSUMS:
747747
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
748748
Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
749749
FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00
750-
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
750+
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
751751
GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e
752752
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
753753
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
@@ -808,7 +808,7 @@ SPEC CHECKSUMS:
808808
RNReanimated: b8c8004b43446e3c2709fe64b2b41072f87428ad
809809
RNScreens: e8e8dd0588b5da0ab57dcca76ab9b2d8987757e0
810810
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
811-
urbanairship-react-native: dfb6dc22b2f41ccaadd636b73d51b448cd1b2bbc
811+
urbanairship-react-native: d415a12e67ba93bf3ce914df9a310b66a88a5cc3
812812
Yoga: a7de31c64fe738607e7a3803e3f591a4b1df7393
813813
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
814814

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "expensify.cash",
3-
"version": "1.0.66-5",
3+
"version": "1.0.66-13",
44
"author": "Expensify, Inc.",
55
"homepage": "https://expensify.cash",
66
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
@@ -97,7 +97,7 @@
9797
"rn-fetch-blob": "^0.12.0",
9898
"save": "^2.4.0",
9999
"underscore": "^1.10.2",
100-
"urbanairship-react-native": "^10.0.0"
100+
"urbanairship-react-native": "^11.0.1"
101101
},
102102
"devDependencies": {
103103
"@actions/core": "^1.2.6",

src/CONST.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ const CONST = {
231231
WARNING: 'warning',
232232
DURATION: 2000,
233233
},
234+
235+
DEFAULT_LOCALE: 'en',
234236
};
235237

236238
export default CONST;

src/components/withLocalize.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {translate} from '../libs/translate';
88
import DateUtils from '../libs/DateUtils';
99
import {toLocalPhone, fromLocalPhone} from '../libs/LocalePhoneNumber';
1010
import numberFormat from '../libs/numberFormat';
11+
import CONST from '../CONST';
1112

1213
const withLocalizePropTypes = {
1314
/** Returns translated string for given locale and phrase */
@@ -66,7 +67,7 @@ function withLocalizeHOC(WrappedComponent) {
6667
]),
6768
};
6869
WithLocalize.defaultProps = {
69-
preferredLocale: 'en',
70+
preferredLocale: CONST.DEFAULT_LOCALE,
7071
forwardedRef: undefined,
7172
};
7273
return React.forwardRef((props, ref) => (

src/languages/en.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default {
7979
addAttachment: 'Add Attachment',
8080
writeSomething: 'Write something...',
8181
youAppearToBeOffline: 'You appear to be offline.',
82+
fileUploadFailed: 'Upload Failed. File is not supported.',
8283
},
8384
reportActionContextMenu: {
8485
copyToClipboard: 'Copy to Clipboard',
@@ -220,7 +221,7 @@ export default {
220221
phrase2: 'terms of service',
221222
phrase3: 'and',
222223
phrase4: 'privacy policy',
223-
phrase5: '. Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its',
224+
phrase5: 'Money transmission is provided by Expensify Payments LLC (NMLS ID:2017010) pursuant to its',
224225
phrase6: 'licenses',
225226
},
226227
passwordForm: {

src/languages/es.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default {
216216
phrase2: 'términos de servicio',
217217
phrase3: 'y',
218218
phrase4: 'política de privacidad',
219-
phrase5: '. El envío de dinero es brindado por Expensify Payments LLC (NMLS ID:2017010) de conformidad con sus',
219+
phrase5: 'El envío de dinero es brindado por Expensify Payments LLC (NMLS ID:2017010) de conformidad con sus',
220220
phrase6: 'licencias',
221221
},
222222
passwordForm: {

src/libs/Network.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Onyx.connect({
3939
// Merge the persisted requests with the requests in memory then clear out the queue as we only need to load
4040
// this once when the app initializes
4141
networkRequestQueue = [...networkRequestQueue, ...persistedRequests];
42-
Onyx.set(ONYXKEYS.NETWORK_REQUEST_QUEUE, []);
4342
didLoadPersistedRequests = true;
43+
Onyx.set(ONYXKEYS.NETWORK_REQUEST_QUEUE, []);
4444
},
4545
});
4646

src/libs/actions/Report.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import Log from '../Log';
2121
import {isReportMessageAttachment, sortReportsByLastVisited} from '../reportUtils';
2222
import Timers from '../Timers';
2323
import {dangerouslyGetReportActionsMaxSequenceNumber, isReportMissingActions} from './ReportActions';
24+
import Growl from '../Growl';
25+
import {translate} from '../translate';
2426

2527
let currentUserEmail;
2628
let currentUserAccountID;
@@ -57,6 +59,16 @@ Onyx.connect({
5759
},
5860
});
5961

62+
let translateLocal = (phrase, variables) => translate(CONST.DEFAULT_LOCALE, phrase, variables);
63+
Onyx.connect({
64+
key: ONYXKEYS.PREFERRED_LOCALE,
65+
callback: (preferredLocale) => {
66+
if (preferredLocale) {
67+
translateLocal = (phrase, variables) => translate(preferredLocale, phrase, variables);
68+
}
69+
},
70+
});
71+
6072
const typingWatchTimers = {};
6173

6274
/**
@@ -1043,7 +1055,17 @@ function addAction(reportID, text, file) {
10431055
// the same way report actions can.
10441056
persist: !isAttachment,
10451057
})
1046-
.then(({reportAction}) => updateReportWithNewAction(reportID, reportAction));
1058+
.then((response) => {
1059+
if (response.jsonCode === 408) {
1060+
Growl.show(translateLocal('reportActionCompose.fileUploadFailed'), CONST.GROWL.ERROR);
1061+
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, {
1062+
[optimisticReportActionID]: null,
1063+
});
1064+
console.error(response.message);
1065+
return;
1066+
}
1067+
updateReportWithNewAction(reportID, response.reportAction);
1068+
});
10471069
}
10481070

10491071
/**

src/libs/translate.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Str from 'expensify-common/lib/str';
33
import Log from './Log';
44
import Config from '../CONFIG';
55
import translations from '../languages/translations';
6+
import CONST from '../CONST';
67

78
/**
89
* Return translated string for given locale and phrase
@@ -12,7 +13,8 @@ import translations from '../languages/translations';
1213
* @param {Object} [variables]
1314
* @returns {String}
1415
*/
15-
function translate(locale = 'en', phrase, variables = {}) {
16+
// eslint-disable-next-line no-undef
17+
function translate(locale = CONST.DEFAULT_LOCALE, phrase, variables = {}) {
1618
const localeLanguage = locale.substring(0, 2);
1719
const fullLocale = lodashGet(translations, locale, {});
1820
const language = lodashGet(translations, localeLanguage, {});

src/pages/NewChatPage.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class NewChatPage extends Component {
6565
props.reports,
6666
props.personalDetails,
6767
'',
68+
false,
6869
props.betas,
6970
);
7071

@@ -153,6 +154,7 @@ class NewChatPage extends Component {
153154
this.props.reports,
154155
this.props.personalDetails,
155156
searchValue,
157+
false,
156158
this.props.betas,
157159
);
158160
this.setState({

src/pages/home/report/ReportActionItemMessageEdit.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class ReportActionItemMessageEdit extends React.Component {
6262
* @param {String} newDraft
6363
*/
6464
updateDraft(newDraft) {
65+
this.textInput.setNativeProps({text: newDraft});
6566
const trimmedNewDraft = newDraft.trim();
6667
this.setState({draft: trimmedNewDraft});
6768
this.debouncedSaveDraft(trimmedNewDraft);
@@ -113,6 +114,7 @@ class ReportActionItemMessageEdit extends React.Component {
113114
<View style={[styles.chatItemComposeBox, styles.flexRow, styles.chatItemComposeBoxColor]}>
114115
<TextInputFocusable
115116
multiline
117+
ref={el => this.textInput = el}
116118
onChangeText={this.updateDraft} // Debounced saveDraftComment
117119
onKeyPress={this.triggerSaveOrCancel}
118120
defaultValue={this.props.draftMessage}

0 commit comments

Comments
 (0)