Refined-github: Warn when creating a PR from master branch

Created on 12 Dec 2018  路  2Comments  路  Source: sindresorhus/refined-github

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]_

enhancement good first issue help wanted

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sompylasar picture sompylasar  路  3Comments

mischah picture mischah  路  3Comments

Arcanemagus picture Arcanemagus  路  3Comments

alexanderadam picture alexanderadam  路  3Comments

durka picture durka  路  3Comments