Skip to content

Commit

Permalink
Remove warning against PR for release branch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Luna Wei authored and Saadnajmi committed Jan 9, 2022
1 parent 877d09a commit 370e3e1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bots/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} - <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 `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} - <i>${idea}</i>`);
}

0 comments on commit 370e3e1

Please sign in to comment.