Robots that review requests on reviewboard servers
A watcher object regularly polls the targeted review board server for review requests. The watcher filters out requests that aren't for any of the configured review bots and any requests that haven't changed since the last time the request was polled.
The watcher creates a botfood directory object for each request that gets throught the filtering proccess. botfood directory objects are a directory that contains the request information.
Then the watcher passes those requests and their changelists to the botmanager. The botmanager works with the changelists and the bots themselves determines which bots care about the requests. For every bot that cares about the request and it's changelist a job will be queued.
Workers then consume the jobs by running the bot's configured script on the botfood directory object of the request. After that it's all up to the bot script
Most bot scripts will eventually post a review.
-
Clone the repo
-
Run
setup.py install
-
Use the example_config.yaml to create config.yaml
-
Run python main.py
There are known issues with the file structure. You'll probbally need to change some paths.
Look at meangirl for inspiration. That bot is basically the bare minimum. Beyond that look into the Bot parent class to get an idea of what methods are available.