Repairnator is an open source tool for automatically repairing failing builds. It consists of 3 steps :
- Detect a failure, static warning in a build
- Look for a specific patch to fix the failure
- Apply the patch (if found) with a pull request
More detailed on the following paper : Repairnator patches programs automatically
- First create a java maven project repository on Github
- Go on the following link : https://github.com/apps/repairnator-bot
- Configure the app for the specific repository you want to use it on
- Repairnator requires Travis CI builds.
- Install Travis CI on the repository from this link : https://github.com/marketplace/travis-ci
- Create a .travis.yml file in the repo, see documentation on how to configure Travis : Travis Tutorial
- For this tutorial, you can write in your .travis.yml file :
language: java
notifications:
email:
on_failure: never
on_success: never
- Commit and push the .travis.yml file
- Create a pull request with a failing build for your repository.
- On the Travis panel you should see something like this :
- If a patch is found by Repairnator, a pull request will be created with the proposed patch (from docs : approx 1/1000 builds).
Repairnator can be used differently than using a Github App :
Command Line :
You can use Repairnator as a command line tool, see the documentation
You can use it by running a maven command that specify the build you want to check. It is also possible to use a docker image directly instead of running a maven command.
Travis Scanner :
You can use Repairnator as a Travis Scanner, see the documentation
It will continuously scan your Travis builds and create pull requests if a patch is found.
Flacoco Scanner :
You can use Repairnator as a Flacoco Scanner, see the documentation
Similar to Travis Scanner, it will instead continuously scan for pull requests and check for failing build and create pull requests if a patch is found.
Jenkins plugin :
You can use Repairnator as a Jenkins plugin, see the documentation
It will continuously scan your Jenkins builds and create pull requests if a patch is found for a failing build.