Repository navigation
Warn users when they attempt to create a PR from default branch - #1758
Conversation
9ff6d93 to
6eef52b
Compare
|
You can replace everything after the first select(/* container selector */).append(
<div class=“...”> your JSX here </div>
);The style should be borrowed from GitHub’s own alerts, by using their classes. The alert should be placed after the branch selector, not inside the blank state (which will be missing when there are commits). Also maybe this should appear once the Pull Request form is open, or under the “create pull request” button. |
|
Thanks for the feedback! Haven't touched JS in a while so I'm glad you pointed out the issues you found. I had trouble figuring out what class to use for the warning (surprise the Here's what it looks like after making the changes you mentioned: I think the warning div looks a little out of place though (could probably use some padding and a border to fit in with the rest of the page). I'm not familiar with github's styling and I'm not sure if there's a better way to style this (without introducing any extra CSS). Any idea if there are already some github styles I could leverage? |
bb47dab to
7310fe2
Compare
|
Found the right style on <div class="flash flash-error my-3">
<strong>Note:</strong>
<a href="https://developer.github.com/changes/2018-04-25-github-services-deprecation/">GitHub
Services have been deprecated</a>. Please contact your integrator for more
information on how to migrate or replace a service with
<a href="https://developer.github.com/webhooks/">webhooks</a> or
<a href="https://developer.github.com/apps/differences-between-apps/#about-github-apps/">GitHub Apps</a>.
</div> |
This will also make it work on PRs from organization accounts
This comment has been minimized.
This comment has been minimized.
|
Excellent! Thanks @vacuus 🍏 |



Closes #1664 .
I think the commit name is pretty self-explanatory. I'm open to any suggestions on the wording of the message. Should we link to a page like this one https://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/ ? It's pretty informative, but I'm worried that this link might break eventually.
Here's a screenshot of the warning: