From 2b7366e41ddbf191be1ded1f77f359b3a37893c9 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 15 Jul 2021 12:22:38 -0700 Subject: [PATCH] RN: Update CI & Bots to `main` Summary: Updates CI and bot configurations to use `main` instead of `master`. I will land this after I conver the repository to `main`. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D29717337 fbshipit-source-id: 9aa9711df921cd7d3d94fbc3d8bb9d6e22abf5c1 --- .circleci/config.yml | 2 +- bots/dangerfile.js | 8 ++++---- bots/report-bundle-size.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48759d49d51..d876cd99b02 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -900,7 +900,7 @@ workflows: filters: branches: only: - - master + - main jobs: - nightly_job diff --git a/bots/dangerfile.js b/bots/dangerfile.js index d0f6bbfc5a1..428652b8020 100644 --- a/bots/dangerfile.js +++ b/bots/dangerfile.js @@ -79,17 +79,17 @@ if (!includesChangelog) { } // Warns if the PR is opened against stable, as commits need to be cherry picked and tagged by a release maintainer. -// Fails if the PR is opened against anything other than `master` or `-stable`. -const isMergeRefMaster = danger.github.pr.base.ref === 'master'; +// Fails if the PR is opened against anything other than `main` or `-stable`. +const isMergeRefMaster = danger.github.pr.base.ref === 'main'; const isMergeRefStable = danger.github.pr.base.ref.indexOf('-stable') !== -1; if (!isMergeRefMaster && isMergeRefStable) { const title = ':grey_question: Base Branch'; const idea = - 'The base branch for this PR is something other than `master`. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on `master` first and then cherry-pick the commits into the branch for that release. The [Releases Guide](https://github.com/facebook/react-native/blob/HEAD/Releases.md) has more information.'; + 'The base branch for this PR is something other than `main`. Are you sure you want to merge these changes into a stable release? If you are interested in backporting updates to an older release, the suggested approach is to land those changes on `main` first and then cherry-pick the commits into the branch for that release. The [Releases Guide](https://github.com/facebook/react-native/blob/HEAD/Releases.md) has more information.'; warn(`${title} - ${idea}`); } else if (!isMergeRefMaster && !isMergeRefStable) { const title = ':exclamation: Base Branch'; const idea = - 'The base branch for this PR is something other than `master`. [Are you sure you want to target something other than the `master` branch?](https://reactnative.dev/docs/contributing.html#pull-requests)'; + 'The base branch for this PR is something other than `main`. [Are you sure you want to target something other than the `main` branch?](https://reactnative.dev/docs/contributing.html#pull-requests)'; fail(`${title} - ${idea}`); } diff --git a/bots/report-bundle-size.js b/bots/report-bundle-size.js index 29e03d60a85..e70004d44e3 100644 --- a/bots/report-bundle-size.js +++ b/bots/report-bundle-size.js @@ -25,7 +25,7 @@ const datastore = require('./datastore'); const {createOrUpdateComment} = require('./make-comment'); /** - * Generates and submits a comment. If this is run on master branch, data is + * Generates and submits a comment. If this is run on main branch, data is * committed to the store instead. * @param {{ 'android-hermes-arm64-v8a'?: number; @@ -47,7 +47,7 @@ async function reportSizeStats(stats, replacePattern) { ); const collection = datastore.getBinarySizesCollection(store); - if (GITHUB_REF === 'master') { + if (GITHUB_REF === 'main') { // Ensure we only store numbers greater than zero. const validatedStats = Object.keys(stats).reduce((validated, key) => { const value = stats[key];