Skip to content

Warn when creating a PR from master branch #1664

Closed

Description

@sindresorhus

Creating a PR from master branch is an anti-pattern, but I still see many users that do it. This creates many problems, like accidentally committing to an older open PR by just committing to their fork's master branch. Would be nice to show a big warning with a link to an explanation why they should create a PR-specific branch instead if they try to create a PR from master.


For anyone that wants this, please also send this feature request to GitHub: [email protected]

Activity

  1. added
    small
    and removed on Jan 17, 2019
  2. fregante commented on Jan 17, 2019

    @fregante
    Member

    This shouldn't be too hard.

    The URL looks like this:

    https://github.com/babel/babel/compare/master...bfred-it:master
    

    If feature.isCompare and if location.pathname ends in `${getUsername()}:${getDefaultBranch()}`, add warning somewhere on the page.

    PR welcome

  3. alejandro-angulo commented on Feb 8, 2019

    @alejandro-angulo

    Created a PR for this here: #1758 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions