Group Review Bot
This workaround is mainly needed because Gitea does not track which team member performed a review on behalf of a team.
Main Tasks
Awaits a comment in the format “@groupreviewbot-name: approve”, then approves the PR with the comment “ approved a review on behalf of .”
Target Usage
Projects where policy reviews are required.
Configuration
The bot is configured via the ReviewGroups field in the workflow.config file, located in the ProjectGit repository.
See ReviewGroups in the workflow-pr configuration.
{
...
"ReviewGroups": [
{
"Name": "name of the group user",
"Reviewers": ["members", "of", "group"],
"Silent": "(true, false) -- if true, do not explicitly require review requests of group members"
}
],
...
}
Server configuration
Configuration file:
| Field | Type | Notes |
|---|---|---|
| root | Array of string | Format org/repo#branch |
Requirements
Gitea token with following permissions:
- R/W PullRequest
- R/W Notification
- R User
Env Variables
The following variables can be used (and override) command line parameters.
AUTOGITS_CONFIG- config file locationAUTOGITS_URL- Gitea URLAUTOGITS_RABBITURL- RabbitMQ urlAUTOGITS_DEBUG- when set, debug level logging enabled
Authentication env variables
GITEA_TOKEN- Gitea user tokenAMQP_USERNAME,AMQP_PASSWORD- username and password for rabbitmq