Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.52 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.52 KB

reviewboardbots

Robots that review requests on reviewboard servers

How it works

Request Polling

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.

Queueing Jobs

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.

Completing Jobs

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

Posting a review

Most bot scripts will eventually post a review.

Setup

  1. Clone the repo

  2. Run setup.py install

  3. Use the example_config.yaml to create config.yaml

  4. Run python main.py

    There are known issues with the file structure. You'll probbally need to change some paths.

Making your own bots.

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.