GitHub recently announced the possibility to automatically merge a Pull Request into the main branch. Let's see how.
Today I will show you how to use the brand new Pull Request auto-merge feature recently announced from GitHub and why I think it is pretty useful.
Right now when you submit a pull request on on GitHub you often have to spend a lot of time waiting for approval, status checks to complete, etc.
And then you gotta remember to check back in so that you can actually have the code merged. And if you forget to do that, or if you wait a day or two, sometimes even other changes come in and you have to redo your pull request.
This new feature basically lets the developer submit a Pull Request to a code base and mark it to be automatically merged in when approved and all the checks have passed.
Alright, let's see how to enable and use it.
This is much easier to see and explain with a demo:
Of course this is totally optional, but it is a significant time savings and improving experience. And there is a way for repo admins or org admins to disable it if they don't want their PRs to be automatically merged.
What do you think of this new feature? Are you going to use it? I think it is pretty cool, and if you are like me, working with teams distributed through different timezone, it is gonna save time because if I have to wait for other people to approve my PRs I often then forget to merge them manually.
Let me know in the comments below!