-
GitHub now allows to set a PR to "auto-merge", meaning that once it passes CI and gets an approval it is automatically merged, without a human having to press the button: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request The feature needs to be enabled for the repository: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository and then for each PR specifically (IIUC). The main use case I'm thinking of is that a PR is already approved but still waiting on CI (which can take ~15-20 minutes) and then we need to remember to go back and actually merge it which is somewhat annoying. Also during release there is a series of PRs which could benefit for it. Potential downside is that the auto-merge is enabled for a PR and it is merged in a state we wouldn't merge otherwise, for example a lot of commits that we would normally squash, or a PR which wants more than one approval, etc. So what does everyone think - should we enable it? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
until we have a way to control approval/commits we want to squash i am -1 on it that being said im hugely in favor of solving the 2 issues and enabling auto-merge |
Beta Was this translation helpful? Give feedback.
-
We could make a convention to only actually leave an Approval once the PR history is ready (squashed or otherwise clean). About needing more than one approval, that rarely happens, but I understand the sentiment, sometimes one approves but leaves a "would like for someone else to take a look as well before merging". Ideally the feature could be enabled, but when approving you are given the option to also auto-merge once CI passes. This would solve this issue, I believe. |
Beta Was this translation helpful? Give feedback.
-
Looking at the docs we can still squash-merge and also this needs to be triggered manually - so the only thing that would change is that you can click "enable automerge" instead of having to wait for the CI and merging then. I don't think this means anything will be merged automatically just because it has an approve. |
Beta Was this translation helpful? Give feedback.
-
Ahh thanks for looking it up @The-Compiler! That's great then, shall we enable it? |
Beta Was this translation helpful? Give feedback.
-
OK, so assuming we have a policy of only clicking the "enable automerge" for PRs which are ready for it, that should be safe. I enabled it now! |
Beta Was this translation helpful? Give feedback.
OK, so assuming we have a policy of only clicking the "enable automerge" for PRs which are ready for it, that should be safe.
I enabled it now!