bors squash command to squash a specific PR. Unlike the existing
use_squash_merge option, this will allow to select squash or merge on the case-by-case basis.
Some projects want to maintain a "clean" commit history on a best-effort basis. For example, for open source projects maintainers typically pay a lot of attention to crafting a good sequence of commits for a pull request, while less experience contributors often end up with "semanticless" merge and fixup commits. For these cases, it would be useful to merge one PR as is, and squash the other down to a single PR. It is possible to ask the contributor to do the required git fu, but this is pretty hard and discouraging, there's no reason why a robot can't do that!
Note that today, using the
use_squash_merge option, it is possible to squash all pull requests. This solves the fixup commits problem. However, it prevents expert git users from creating a good multi-commit history for larger PRs.
squash modifier to
bors r+ /
bors merge, such that it also squashes all PR's commits to one.
bors r+ [squash]
- this adds one more choice the user can/has to make for every PR.
Rationale and alternatives
- When merging PR via GitHub UI, there's a similar squash and merge option.
- What is the interaction between
use_squash_merge? Do we need a
nosquashmodifier to supress squashing in a specific case when
use_squash_mergeis set to
bors squashbe supported as a shorthand notation for
bors r+ squash?
Tracking issue: https://github.com/bors-ng/bors-ng/issues/1028