From a0e0b73483f52360385e2b6fc8bb49771bd9ae9c Mon Sep 17 00:00:00 2001 From: Rocio Perez-Cano Date: Fri, 4 Feb 2022 15:30:58 -0500 Subject: [PATCH] Remove last references to master --- .github/actions/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/getDeployPullRequestList/index.js | 2 +- .github/libs/GitUtils.js | 2 +- .github/scripts/verifyActions.sh | 2 +- STYLE.md | 8 ++++---- tests/unit/GitUtilsTest.js | 1 - 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/actions/createOrUpdateStagingDeploy/index.js b/.github/actions/createOrUpdateStagingDeploy/index.js index f1cabf7d78bd..a524628455ce 100644 --- a/.github/actions/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/createOrUpdateStagingDeploy/index.js @@ -221,7 +221,7 @@ function getValidMergedPRs(commitMessages) { return mergedPRs; } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/); + const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); if (!_.isNull(match) && match[1]) { mergedPRs.push(match[1]); } diff --git a/.github/actions/getDeployPullRequestList/index.js b/.github/actions/getDeployPullRequestList/index.js index 0832734cc5cd..0ad91cbdd8d6 100644 --- a/.github/actions/getDeployPullRequestList/index.js +++ b/.github/actions/getDeployPullRequestList/index.js @@ -143,7 +143,7 @@ function getValidMergedPRs(commitMessages) { return mergedPRs; } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/); + const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); if (!_.isNull(match) && match[1]) { mergedPRs.push(match[1]); } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 7ecf06d3a840..931876037092 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -35,7 +35,7 @@ function getValidMergedPRs(commitMessages) { return mergedPRs; } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:master|main|version-|update-staging-from-main|update-production-from-staging))/); + const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); if (!_.isNull(match) && match[1]) { mergedPRs.push(match[1]); } diff --git a/.github/scripts/verifyActions.sh b/.github/scripts/verifyActions.sh index 945e5d151a0d..ad11ce053666 100755 --- a/.github/scripts/verifyActions.sh +++ b/.github/scripts/verifyActions.sh @@ -22,7 +22,7 @@ if [[ EXIT_CODE -eq 0 ]]; then echo -e "${GREEN}Github Actions are up to date!${NC}" exit 0 else - echo -e "${RED}Error: Diff found when Github Actions were rebuilt. Did you forget to run \`npm run gh-actions-build\`? Do you need to merge master?${NC}" + echo -e "${RED}Error: Diff found when Github Actions were rebuilt. Did you forget to run \`npm run gh-actions-build\`? Do you need to merge main?${NC}" echo "$DIFF_OUTPUT" | $LIB_PATH/diff-so-fancy | less --tabs=4 -RFX exit 1 fi diff --git a/STYLE.md b/STYLE.md index 642140c65784..c858669b3479 100644 --- a/STYLE.md +++ b/STYLE.md @@ -4,7 +4,7 @@ For almost all of our code style rules, refer to the [Airbnb JavaScript Style Gu When writing ES6 or React code, please also refer to the [Airbnb React/JSX Style Guide](https://github.com/airbnb/javascript/tree/master/react). -There are a few things that we have customized for our tastes which will take presidence over Airbnb's guide. +There are a few things that we have customized for our tastes which will take precedence over Airbnb's guide. ## Functions - Always wrap the function expression for immediately-invoked function expressions (IIFE) in parens: @@ -41,7 +41,7 @@ There are a few things that we have customized for our tastes which will take pr } ``` - - Place 1 space before the function keyword and the opening paren for anonymous functions. This does not count for named functions. + - Place 1 space before the function keyword and the opening parent for anonymous functions. This does not count for named functions. ```javascript // Bad @@ -329,7 +329,7 @@ export { ## Classes and constructors #### Class syntax -Using the `class` syntax is preferred wherever appropriate. Airbnb has clear [guidelines](https://github.com/airbnb/javascript#classes--constructors) in their JS styleguide which promotes using the _class_ syntax. Dont manipulate the `prototype` directly. The `class` syntax is generally considered more concise and easier to understand. +Using the `class` syntax is preferred wherever appropriate. Airbnb has clear [guidelines](https://github.com/airbnb/javascript#classes--constructors) in their JS style guide which promotes using the _class_ syntax. Don't manipulate the `prototype` directly. The `class` syntax is generally considered more concise and easier to understand. #### Constructor Classes have a default constructor if one is not specified. No need to write a constructor function that is empty or just delegates to a parent class. @@ -562,7 +562,7 @@ class SomeComponent { } ``` -## Inline Ternarys +## Inline Ternaries * Use inline ternary statements when rendering optional pieces of templates. Notice the white space and formatting of the ternary. ```javascript diff --git a/tests/unit/GitUtilsTest.js b/tests/unit/GitUtilsTest.js index 52b84cf4795f..adfac0d47419 100644 --- a/tests/unit/GitUtilsTest.js +++ b/tests/unit/GitUtilsTest.js @@ -33,7 +33,6 @@ const data = [ 'Merge pull request #1563 from Expensify/version-bump-e6498075e301df3e9c8d7866ea391a23c19ed9b0', 'Update version to 1.0.1-470', '[IS-1500] Updated textalignInput utility', - 'Merge pull request #1 from Expensify/master', 'Merge pull request #2 from Expensify/main', 'fix: set pdf width on large screens', ],