From 370e3e172f34dc37885f9a927eadeefd6c66e6ed 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 4e954ea270fc83..520e86fab30003 100644 --- a/bots/dangerfile.js +++ b/bots/dangerfile.js @@ -82,14 +82,9 @@ if (!includesChangelog) { // Fails if the PR is opened against anything other than `master` or `-stable`. const isMergeRefMaster = danger.github.pr.base.ref === 'master'; 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/master/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 `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` 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}`); }