mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
92c13f0d1d
commit
2b7366e41d
@@ -900,7 +900,7 @@ workflows:
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- main
|
||||
jobs:
|
||||
- nightly_job
|
||||
|
||||
|
||||
+4
-4
@@ -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>`);
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user