Skip to content

Commit

Permalink
RN: Update CI & Bots to main
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yungsters authored and facebook-github-bot committed Jul 15, 2021
1 parent 92c13f0 commit 2b7366e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ workflows:
filters:
branches:
only:
- master
- main
jobs:
- nightly_job

Expand Down
8 changes: 4 additions & 4 deletions bots/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} - <i>${idea}</i>`);
} 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} - <i>${idea}</i>`);
}
4 changes: 2 additions & 2 deletions bots/report-bundle-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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];
Expand Down

0 comments on commit 2b7366e

Please sign in to comment.