Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

[rfc] command to squash and merge #70

Open
sourcefrog opened this issue Dec 13, 2016 · 11 comments
Open

[rfc] command to squash and merge #70

sourcefrog opened this issue Dec 13, 2016 · 11 comments

Comments

@sourcefrog
Copy link

It is common in the rust repo for at least small changes that reviewers ask the contributor to squash the changes before they're merged. (For example rust-lang/rust#38158 (comment).)

To avoid another round-trip to the contributor, perhaps Bors/Homu could be given a command to squash and merge, ie to do git commit --merge?

Looking at the code there seems to be a per-repo option for autosquash but Rust might want it to be per-PR.

@nox
Copy link

nox commented Dec 13, 2016

What would be the commit message?

@KiChjang
Copy link

FTR, we've been actually thinking of squashing PRs ourselves ever since maintainers gained the ability to push to/pull from PR branches.

@sourcefrog
Copy link
Author

What would be the commit message?

I guess it would be the PR title, but perhaps it could be included in the command to Bors?

@Manishearth
Copy link
Member

This also means that the PR won't get marked as merged unless homu first pushes the squashed version to the PR.

@sourcefrog
Copy link
Author

True, which it probably cannot do when the PR is coming from a third party. However it could mark it as closed, and the author would presumably see the new commits in their name in their activity.

@sourcefrog
Copy link
Author

Would it work for Homu to tell Github to do the merge (https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button)? There is a squash option there.

@Manishearth
Copy link
Member

I ... guess. That's pretty incompatible with the current architecture. If github gave you a way of fetching the "post squash merge commit" that would be nice.

Then again, we already have support for rebasing (which just doesn't mark the PR as merged)

@nox
Copy link

nox commented Dec 14, 2016

A PR title isn't always a good commit message.

@asajeffrey
Copy link
Member

We've also had cases of multi-author PRs, where we decided not to squash everything in order to preserve authorship.

@sourcefrog
Copy link
Author

sourcefrog commented Dec 14, 2016 via email

@asajeffrey
Copy link
Member

Yes, having an option to automate "squash and r=me" would be nice, since we do it a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants