Prevent accidental pull requests to upstream when working on a fork #199506
Replies: 5 comments 6 replies
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
As a possible workaround, you may find it safer to create pull requests from the "Pull requests" tab and manually select both repositories and branches rather than relying on the banner suggestion, although I understand that doesn't fully solve the issue. I'm curious whether other fork maintainers have run into the same problem, especially those who maintain forks long-term rather than using them only for upstream contributions. |
Beta Was this translation helpful? Give feedback.
-
|
hey @PeopleInside 👋 . Levi's workaround is the right direction but there's actually a more permanent fix that solves this at the source : ,,, disable the upstream sync /comparison link entirely . your fork -> settings ->scroll to the bottom-> in older githubb layouts this was "default branch" settings,,but the more reliable method now is:
the workaround that actually sticks(better than manual selection each time ): if you want to keep the fork relationship for occasional upstream merges,,,,,Levi's approach (always use the pulll requests tab ,never the banner)combined with double-checking the base repo dropdown before clicking "create" is really the only current option. agree this should be a per-repo default setting though,,,solid feedback. |
Beta Was this translation helpful? Give feedback.
-
|
Finally I have unforked every fork repo I manage. |
Beta Was this translation helpful? Give feedback.
-
|
hey @PeopleInside 👋 . glad you also filed it as a real github ticket and not just here,,, thats genuinely the right move for something like this since its a product gap,not user error.hopefully your ticket gets traction evenn without an immediate response. since your core problem(accidental prs to upstream)is now fully resolved ,,, even if not the way youd have preferred ,, mind marking this thread as answered?itll help other long-term fork maintainers who hit the same issue find this conversation faster,including the detach / unfork option as the only current real fix. really appreciate you pushing back honestly throughout this thread btw,,,made for a much more useful discussion than if you'd just accepted the first(wrong)answer🩷🩷🩷🩷 . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Other
Body
Hi everyone,
I'd like to share a recurring issue I've experienced when working on forks and see if others have encountered the same problem or have suggestions.
Context
I maintain a fork of a Flarum extension:
My fork: https://github.com/PeopleInside/flarum-ext-first-post-approval
Original: https://github.com/clarkwinkelmann/flarum-ext-first-post-approval
My workflow involves creating version branches for testing before tagging a release. I often need to open pull requests within my own fork (from a version branch to my fork's master).
The problem
GitHub's "Compare & pull request" banner and default suggestions almost always default to the upstream repository as the base. As a result, I have accidentally opened pull requests against the original maintainer's repository multiple times. Each accidental PR generates email notifications for the original developer, and when I close them and accidentally open another one, it creates repeated noise.
You can see some of these unintended PRs here:
https://github.com/clarkwinkelmann/flarum-ext-first-post-approval/pulls?q=is%3Apr+is%3Aclosed
I always end up having to manually change the base repository to my own fork, but it's easy to miss, especially when working quickly.
Suggested improvements
I think the following would be very helpful for anyone maintaining an active fork:
Suppress the "Compare & pull request" banner when the comparison is against the upstream master and the user is working on a long-lived fork.
Has anyone else run into this? Are there any workarounds I might be missing, or is this something that would need to be addressed by GitHub directly?
Thanks in advance for any thoughts or suggestions.
Beta Was this translation helpful? Give feedback.
All reactions