Remove warning against PR for release branch

Summary:
Changelog: [Internal] Remove warning about creating a pull request to a release branch

We want to support this use case as we want pick requesters to land the cherry-picks themselves and rely on CircleCI automation to test

Reviewed By: cortinico

Differential Revision: D32780819

fbshipit-source-id: 882625a016653dbf480da33fd499d3718b2b5524
This commit is contained in:
Luna Wei
2021-12-02 12:11:52 -08:00
committed by Facebook GitHub Bot
parent 9e2ec4d3dd
commit 90f0de99ad
+2 -7
View File
@@ -91,14 +91,9 @@ if (!includesChangelog) {
// 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 `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) {
if (!isMergeRefMaster && !isMergeRefStable) {
const title = ':exclamation: Base Branch';
const idea =
'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#pull-requests)';
'The base branch for this PR is something other than `main` or a `-stable` branch. [Are you sure you want to target something other than the `main` branch?](https://reactnative.dev/docs/contributing#pull-requests)';
fail(`${title} - <i>${idea}</i>`);
}