Auto Merge PR as tests pass


I am trying to integrate with Github to be able to automatically merge the pull requests once the tests pass. I haven’t been able to find something that would work. I can build a BASH script and interact with Github via the API but not sure if that is the best way or if there is a better way to do this?

If anyone has any ideas on how to do this it would be helpful.

Automatically rebase and merge PR as tests pass

Looking for something similar as well. We currently use, but it’s self-hosted. The main feature is pre-merge builds. Meaning that once we decide to merge it will build the locally merged repo and push if successful.

The reasons I’m looking for something else are: self-hosted, not easy to parallelize.


This isn’t a built-in feature of CircleCI. As mentioned by the original poster (OP), this could be done via Bash during the build process.

For CircleCI 1.0, one example could be , in the deployment phase, is if this is a PR branch (environment variable would tell you), to checkout master, merge in the PR branch, and then push. CircleCI does shallow clones by default so you would either need to “unshallow” the repository or simply use a different directory to clone fresh.