Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto merge pull request on github?

Is it possible to merge pull request automaticaly to master branch on github after success of travis test webhook?

like image 269
Stephan Ahlf Avatar asked Mar 12 '15 16:03

Stephan Ahlf


People also ask

How do I merge two branches automatically?

All repositories in a project can inherit or override the branching model, including automatic branch merging. To enable automatic branch merging for all repositories in a project (requires project admin permission): Go to Project settings > Branches. Under Automatic merging, select the On status and then select Save.

What is git auto-merge?

Git merging combines sequences of commits into one unified history of commits. There are two main ways Git will merge: Fast Forward and Three way. Git can automatically merge commits unless there are changes that conflict in both commit sequences.

What is an auto-merge when using Git and GitHub?

Pull request auto-merge is now generally available on GitHub and through GitHub Mobile. With auto-merge, pull requests can be set to merge automatically when all merge requirements are met. No more waiting on slow CI jobs or tests to finish just so you can click the merge button!


1 Answers

GitHub recently shipped this auto-merge feature in beta. To use this, you can enable it in the repo settings. Just keep in mind you will need to add branch protection rules as well.

See the documentation for more info.

https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request

like image 52
bdougie Avatar answered Sep 22 '22 21:09

bdougie