You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
Mark PRs merged by bors as merged not closed #1217
Right now (at least with use_squash_merge = true), PRs merged by bors end up with [Merged by Bors] in the title, but are still considered "closed" instead of "merged" by github. This has a number of downsides:
Repository statistics about merged vs closed aren't useful
The "revert PR" button doesn't appear
I don't think "Closes #NNN" works in PR descriptions, since github considers the PR abandoned not resolved
I suspect there are technical limitations on the github side (this thread? that make this impossible, but it would be great if this limitation could be documented. The bors website shows everything working normally, so I guess this only comes up in certain configurations.
Reacted by Tim DeHerrera, Carter Anderson, Nate, Fichtelcoder, Patrik Buhring, Luna, Alice Cecile, Magnus Klingenberg, Taiki Endo, John Firebaugh and 8 more
Reacted by Nate, Magnus Klingenberg, Pedro Fidalgo and michael-curry
Yup this is causing issues for us in Bevy. We want clean squashed history without bors merge commits, so we enable use_squash_merge, but this comes at the cost of the problems mentioned above (broken stats are a huge loss for us). We also want to distinguish between merged state and closed state in our project boards, but right now that is impossible.
Reacted by Nate, Patrik Buhring and Lauren Campbell
In this scheme bors would act as it currently does, until it reaches the point where the PR would currently be closed. At that point, it would change the base branch of the PR to its own version of the target branch (say a branch with name bors/main). It would update that branch to the head commit of main (either before or after the relevant PR is merged, as #899 (comment) suggests either would work). It would then use the GitHub API to merge the PR into that branch, which marks the PR as merged.
Have run into this issue as well for our configuration. Just enabled use_squash_merge in the repo's bors.toml, but it's now closing all the merged PRs instead of merging them as before.
We are currently integrating bors in our CI system and we do need to have the PRs squashed and marked as merged.
Since this is currently a limitation, you either get a closed PR that is squashed or a merged PR but with all the history on the main branch, we decided to try and add some features to help us overcome this:
This is currently getting fixed in-house and I would like to know if there is interest so we will contribute this solution.
The idea is to introduce two new flags to bors.toml:
enforce_squashed_only_pr - This will cause bors to block a merge if the PR is not squashed (contains only 1 commit)
enable_squash_feature - This will enable a new command bors squash that will squash a PR automatically.
This way we will provide the users with the ability to squash the PR by a simple request to bors and then they will be able to ask to merge the PR.
The only downside of this implementation is that you lose the history of the PR itself.
Activity
cart commentedon May 26, 2021
Yup this is causing issues for us in Bevy. We want clean squashed history without bors merge commits, so we enable
use_squash_merge, but this comes at the cost of the problems mentioned above (broken stats are a huge loss for us). We also want to distinguish between merged state and closed state in our project boards, but right now that is impossible.DJMcNab commentedon Jul 21, 2021
I think this is related to #899.
A few of us (@bjorn3, @mockersf ) in the bevy discord have been theorising a potential way to workaround this.
In this scheme bors would act as it currently does, until it reaches the point where the PR would currently be closed. At that point, it would change the base branch of the PR to its own version of the target branch (say a branch with name
bors/main). It would update that branch to the head commit of main (either before or after the relevant PR is merged, as #899 (comment) suggests either would work). It would then use the GitHub API to merge the PR into that branch, which marks the PR as merged.yesthesoup commentedon Aug 11, 2021
Have run into this issue as well for our configuration. Just enabled
use_squash_mergein the repo'sbors.toml, but it's now closing all the merged PRs instead of merging them as before.jbasila-orca commentedon Oct 14, 2021
I would like to provide the following suggestion:
We are currently integrating bors in our CI system and we do need to have the PRs squashed and marked as merged.
Since this is currently a limitation, you either get a closed PR that is squashed or a merged PR but with all the history on the main branch, we decided to try and add some features to help us overcome this:
This is currently getting fixed in-house and I would like to know if there is interest so we will contribute this solution.
The idea is to introduce two new flags to
bors.toml:enforce_squashed_only_pr- This will cause bors to block a merge if the PR is not squashed (contains only 1 commit)enable_squash_feature- This will enable a new commandbors squashthat will squash a PR automatically.This way we will provide the users with the ability to squash the PR by a simple request to bors and then they will be able to ask to merge the PR.
The only downside of this implementation is that you lose the history of the PR itself.