From 90f0de99ada68fc0d877f2efe297538e733d9b56 Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 2 Dec 2021 12:10:17 -0800 Subject: [PATCH] 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 --- bots/dangerfile.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bots/dangerfile.js b/bots/dangerfile.js index 15ac14a1bd8..fcb2695fe89 100644 --- a/bots/dangerfile.js +++ b/bots/dangerfile.js @@ -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} - ${idea}`); -} 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} - ${idea}`); }