diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index 12c95c8c76f..b109be49c62 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/checkDeployBlockers/index.js @@ -291,6 +291,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js index 75b89093447..9ea8c688b53 100644 --- a/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js +++ b/.github/actions/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js @@ -80,9 +80,9 @@ const run = function () { console.log('Parsed the following data from the current StagingDeployCash:', currentStagingDeployCashData); currentStagingDeployCashIssueNumber = currentStagingDeployCashData.number; - const newDeployBlockers = _.map(deployBlockerResponse.data, ({url}) => ({ - url, - number: GithubUtils.getIssueOrPullRequestNumberFromURL(url), + const newDeployBlockers = _.map(deployBlockerResponse.data, ({html_url}) => ({ + url: html_url, + number: GithubUtils.getIssueOrPullRequestNumberFromURL(html_url), isResolved: false, })); diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index 4bc71ff41a4..85c791c418c 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -90,9 +90,9 @@ const run = function () { console.log('Parsed the following data from the current StagingDeployCash:', currentStagingDeployCashData); currentStagingDeployCashIssueNumber = currentStagingDeployCashData.number; - const newDeployBlockers = _.map(deployBlockerResponse.data, ({url}) => ({ - url, - number: GithubUtils.getIssueOrPullRequestNumberFromURL(url), + const newDeployBlockers = _.map(deployBlockerResponse.data, ({html_url}) => ({ + url: html_url, + number: GithubUtils.getIssueOrPullRequestNumberFromURL(html_url), isResolved: false, })); @@ -413,6 +413,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/getMergeCommitForPullRequest/index.js b/.github/actions/getMergeCommitForPullRequest/index.js index cbb10320c6a..6543b49dd7b 100644 --- a/.github/actions/getMergeCommitForPullRequest/index.js +++ b/.github/actions/getMergeCommitForPullRequest/index.js @@ -319,6 +319,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/getReleaseBody/index.js b/.github/actions/getReleaseBody/index.js index 4321be9b829..dfcf37b35c4 100644 --- a/.github/actions/getReleaseBody/index.js +++ b/.github/actions/getReleaseBody/index.js @@ -262,6 +262,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/isPullRequestMergeable/index.js b/.github/actions/isPullRequestMergeable/index.js index c1c4c59e8bd..4b23532cded 100644 --- a/.github/actions/isPullRequestMergeable/index.js +++ b/.github/actions/isPullRequestMergeable/index.js @@ -265,6 +265,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/isStagingDeployLocked/index.js b/.github/actions/isStagingDeployLocked/index.js index 1808c24b2b7..41e2bd60714 100644 --- a/.github/actions/isStagingDeployLocked/index.js +++ b/.github/actions/isStagingDeployLocked/index.js @@ -241,6 +241,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/markPullRequestsAsDeployed/index.js b/.github/actions/markPullRequestsAsDeployed/index.js index 9ce5a031d0d..5b71719b6e1 100644 --- a/.github/actions/markPullRequestsAsDeployed/index.js +++ b/.github/actions/markPullRequestsAsDeployed/index.js @@ -315,6 +315,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/reopenIssueWithComment/index.js b/.github/actions/reopenIssueWithComment/index.js index 9e09931d78b..5ac3d3f1a47 100644 --- a/.github/actions/reopenIssueWithComment/index.js +++ b/.github/actions/reopenIssueWithComment/index.js @@ -254,6 +254,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/actions/triggerWorkflowAndWait/index.js b/.github/actions/triggerWorkflowAndWait/index.js index 559a754eff7..f7b68e5dca7 100644 --- a/.github/actions/triggerWorkflowAndWait/index.js +++ b/.github/actions/triggerWorkflowAndWait/index.js @@ -405,6 +405,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 025a9c9281b..f57a0576762 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -203,6 +203,7 @@ class GithubUtils { return this.octokit.pulls.list({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, + state: 'all', per_page: 100, }) .then(({data}) => { diff --git a/android/app/build.gradle b/android/app/build.gradle index 0b25d4bfdf8..1b88329cd34 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -148,8 +148,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001007006 - versionName "1.0.70-6" + versionCode 1001007007 + versionName "1.0.70-7" } splits { abi { diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index eb88392ed51..a8b11323048 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 1.0.70.6 + 1.0.70.7 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/ExpensifyCashTests/Info.plist b/ios/ExpensifyCashTests/Info.plist index 72d5cd2666b..9bcd23f2af2 100644 --- a/ios/ExpensifyCashTests/Info.plist +++ b/ios/ExpensifyCashTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.0.70.6 + 1.0.70.7 diff --git a/package-lock.json b/package-lock.json index 5d6cf3f669f..6a96408db36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.70-6", + "version": "1.0.70-7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 96cd3622c6b..a5984b25d7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.70-6", + "version": "1.0.70-7", "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.", diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index e8a349daa11..8a6f3ddb620 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -162,7 +162,7 @@ Onyx.connect({ Onyx.connect({ key: ONYXKEYS.PREFERRED_LOCALE, - callback: val => preferredLocale = val || 'en', + callback: val => preferredLocale = val || CONST.DEFAULT_LOCALE, }); /** diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 66c52a79a36..397690b7dae 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -8,7 +8,14 @@ function setCurrentURL(url) { Onyx.set(ONYXKEYS.CURRENT_URL, url); } +/** + * @param {String} locale + */ +function setLocale(locale) { + Onyx.set(ONYXKEYS.PREFERRED_LOCALE, locale); +} + export { - // eslint-disable-next-line import/prefer-default-export setCurrentURL, + setLocale, }; diff --git a/src/pages/settings/PreferencesPage.js b/src/pages/settings/PreferencesPage.js index 933c16df82a..2896f1bdd68 100755 --- a/src/pages/settings/PreferencesPage.js +++ b/src/pages/settings/PreferencesPage.js @@ -1,6 +1,6 @@ import React from 'react'; import {View} from 'react-native'; -import Onyx, {withOnyx} from 'react-native-onyx'; +import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import HeaderWithCloseButton from '../../components/HeaderWithCloseButton'; @@ -12,6 +12,7 @@ import Text from '../../components/Text'; import NameValuePair from '../../libs/actions/NameValuePair'; import CONST from '../../CONST'; import {setExpensifyNewsStatus} from '../../libs/actions/User'; +import {setLocale} from '../../libs/actions/App'; import ScreenWrapper from '../../components/ScreenWrapper'; import Switch from '../../components/Switch'; import Picker from '../../components/Picker'; @@ -28,15 +29,16 @@ const propTypes = { expensifyNewsStatus: PropTypes.bool, }), - ...withLocalizePropTypes, + /** Indicates which locale the user currently has selected */ + preferredLocale: PropTypes.string, - // Indicates which locale the user currently has selected - preferredLocale: PropTypes.string.isRequired, + ...withLocalizePropTypes, }; const defaultProps = { priorityMode: CONST.PRIORITY_MODE.DEFAULT, user: {}, + preferredLocale: CONST.DEFAULT_LOCALE, }; const PreferencesPage = ({ @@ -112,7 +114,11 @@ const PreferencesPage = ({ Onyx.merge(ONYXKEYS.PREFERRED_LOCALE, locale)} + onChange={(locale) => { + if (locale !== preferredLocale) { + setLocale(locale); + } + }} items={Object.values(localesToLanguages)} value={preferredLocale} /> @@ -136,5 +142,8 @@ export default compose( user: { key: ONYXKEYS.USER, }, + preferredLocale: { + key: ONYXKEYS.PREFERRED_LOCALE, + }, }), )(PreferencesPage); diff --git a/tests/unit/createOrUpdateStagingDeployTest.js b/tests/unit/createOrUpdateStagingDeployTest.js index fce7a09a977..e9bd461c5f8 100644 --- a/tests/unit/createOrUpdateStagingDeployTest.js +++ b/tests/unit/createOrUpdateStagingDeployTest.js @@ -144,19 +144,19 @@ describe('createOrUpdateStagingDeployCash', () => { const currentOpenDeployBlockers = [ { - url: 'https://github.com/Expensify/Expensify.cash/pull/6', + html_url: 'https://github.com/Expensify/Expensify.cash/pull/6', number: 6, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], }, { - url: 'https://github.com/Expensify/Expensify.cash/issues/9', + html_url: 'https://github.com/Expensify/Expensify.cash/issues/9', number: 9, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], }, { - url: 'https://github.com/Expensify/Expensify.cash/issues/10', + html_url: 'https://github.com/Expensify/Expensify.cash/issues/10', number: 10, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], @@ -196,13 +196,13 @@ describe('createOrUpdateStagingDeployCash', () => { data: [ ...currentOpenDeployBlockers, { - url: 'https://github.com/Expensify/Expensify.cash/issues/11', // New + html_url: 'https://github.com/Expensify/Expensify.cash/issues/11', // New number: 11, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], }, { - url: 'https://github.com/Expensify/Expensify.cash/issues/12', // New + html_url: 'https://github.com/Expensify/Expensify.cash/issues/12', // New number: 12, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], @@ -246,13 +246,13 @@ describe('createOrUpdateStagingDeployCash', () => { data: [ ...currentOpenDeployBlockers, { - url: 'https://github.com/Expensify/Expensify.cash/issues/11', // New + html_url: 'https://github.com/Expensify/Expensify.cash/issues/11', // New number: 11, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH], }, { - url: 'https://github.com/Expensify/Expensify.cash/issues/12', // New + html_url: 'https://github.com/Expensify/Expensify.cash/issues/12', // New number: 12, state: 'open', labels: [LABELS.DEPLOY_BLOCKER_CASH],