-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push rebased PRs before merging #9391
Comments
It's a pain for collaborators to push to a PR because AFAIK you have to clone/check out the PR author's fork first, unless there is some trick that I'm not aware of that prevents having to do that. |
This was added to the merging PRs guide in #8774, (the comments there have some useful information about checking out PR branches @mscdex , and there's also this). But the conclusion was that it should only be done when merging in people's own PRs. Maybe we should add something in the PR template that allows people to opt-in? |
It may only help a little, but you don’t need to have a git repository listed locally as a remote to push to it, e.g. you can do |
This only works if PR authors have made their PR branch available for us to push to... |
Which they mostly won't. There was some excitement about the enhancements github made to green-button merges, @Fishrock123 IIRC, you thought it would allow squashing, fast-forwarding, and adding commit metadata all from github UI, did that work out? |
Why not ? The option is checked by default. |
That's surprising, the github docs say otherwise:
But it looks like github has enabled it by default. Curious, does that allow force-pushing? Because its force-pushing we would need to do, which seems like a dangerous thing to allow by default. |
@sam-github there are currently two options:
Unfortunately that doesn't fully cover our needs but can cover simple cases. |
(Note: I think it appends to the commit message, so it may make an invalid commit message. Try it on your own repos FIRST!) |
I'm - 1 on this idea. this will involve force pushing over other individuals feature branches. while having the purple merge label on a commit is nice to have, I do not On Tue, Nov 1, 2016, 8:41 AM Jeremiah Senkpiel notifications@github.com
|
@thealphanerd I agree, it's also an issue if something goes wrong and you merge in a bad commit, if you force-push to someone's fork then you lose your backup. Perhaps we could leave the PR open after updating, and allow the person who created the branch to force-push themselves (after checking that the commit in master is okay)? I'm not sure if that would work in Github. |
The closed PR should usually have a comment with "Landed in xxxx". What's the problem with it showing as closed rather than merged? By the way, collaborator's PRs are also closed rather than merged. |
Depends on the collaborator, see #9257. I force-pushed the branch, so it matches a commit in the history and shows as merged. Its a nicety, having the merged status, but it doesn't work in general with how node merges code, which isn't supported well by github. |
from a backporting perspective I would prefer to see the "landed in" On Tue, Nov 1, 2016, 12:02 PM Sam Roberts notifications@github.com wrote:
|
@fhinkel those comments aren't helpful when looking at https://github.com/nodejs/node/pulls?q=is%3Apr+is%3Aclosed. I should also point out that checking out someone else's repo could be a pain unless it's automated, which should be relatively easy to do. |
@thealphanerd what if you asked contributors to squash themselves, but then whoever merged would rebase on top of |
-1 for me. I think the "Landed in ..." comments should be required. It sure makes cutting releases easier |
I don't think this is workable because of how GitHub works. Ideally we'd be able to mark a PR as merged and point so some commits. |
I've noticed that PRs sent by people outside of Node.js core (i.e. people who can't merge their own PRs) show as closed on GitHub even though technically speaking they were rebased and merged.
I'm not 100% sure as I haven't tested it but I believe that if whoever merges the PR pushes the rebased commits first - which can be done if the "allow edits from maintainers" box is checked - and then does a fast-forward merge, GitHub should mark the PR as merged.
Someone should test it on an open PR. If it doesn't work, oh well, but if it does it would be kinda nice if the merge policy was changed to use this so people could see which PRs were merged and which were closed for some other reason, which is currently impossible to determine when looking at the list of PRs.
The text was updated successfully, but these errors were encountered: