Automate your review process with Rivi the review bot
2.0K
README.md from https://github.com/bivas/rivi
Automate your review process with Rivi the review bot
Usage of rivi:
-config string
Bot configuration file
-port int
Bot listening port (default 8080)
-uri string
Bot URI path (default "/")
$ rivi -port 9000 -config repo-x.yaml
Create a token with repo persmissions
Create a webhook and make sure the following are configured:
application/jsonConfigure the Git client for repository access and webhook validation
config:
provider: github
token: my-very-secret-token
secret: my-hook-secret-shhhhh
token (required) - the client OAuth token the bot will connect with (and assign issues, add comments and lables)provider (optional) - which client to use for git connection - the bot tries to figure out which client to use automatically (currently only github is supported but others are on the way)secret (optional) - webhook secret to be used for content validation (recommended)List of roles for selecting (login) users for assignment.
roles:
admins:
- user1
- user2
reviewers:
- user3
- user4
testers:
- user2
- user4
Configure rules to be processed by the bot on each issue event. Each rule may have several actions.
rules:
rule-name1:
<condition>
<action-name>
<action-name>
<action-name>
...
rule-name2:
<condition>
<action-name>
...
rules:
rule-name:
condition:
if-labeled:
- label1
- label2
skip-if-labeled:
- label3
filter:
patterns:
- "docs/.*"
extension:
- ".go"
commenter:
comment: "We have a match!"
labeler:
label: ready-for-review
The entire condition section is optional - you can run all rules all the time and see if it helps :smile:
if-labeled - apply the rule if the issue has any of the provided labelsskip-if-labeled - skip rule processing if issue has any of the provided labelsfilter
patterns - pattern matching the pull request file list (any of the patterns)extensions - which file extension to match on pull request file list (must start with a dot [.])autoassign - Automatic assignment of issue reviewersautomerge - Automatic merge for approved pull requestscommenter - Add comment to an issuelabeler - Add label to an issuesizing - Size a pull requesttrigger - Send HTTP triggersconfig:
provider: github
token: my-very-secret-token
secret: my-hook-secret-shhhhh
roles:
admins:
- user1
- user2
reviewers:
- user3
- user4
testers:
- user2
- user4
rules:
pr-size:
sizing:
xs:
label: size/xs
changed-files-threshold: 5
s:
label: size/s
changed-files-threshold: 15
default:
label: pending-approval
comment: "Your pull-request is too large for review"
docs:
condition:
filter:
patterns:
- "docs/.*"
labeler:
label: documentation
assignment:
condition:
skip-if-labeled:
- pending-approval
autoassign:
from-roles:
- admins
- reviewers
Content type
Image
Digest
Size
32.3 MB
Last updated
over 7 years ago
docker pull bivas/rivi