Automatically assign review on gitlab/heptapod
This project aims to automatically assign unassigned pending merge-requests on a gitlab/heptapod instance.
Each member of a project can be randomly assigned to a pending merge-requests.
Assignbot assigns reviews to users, based on their preferences. Their preferences are store in a simple yaml file. The history of the assignment is stored in a CSV file, in a S3 storage.
The preferences file
The users define their “review preferences” in a preferences file, formatted in yaml.
The “preferences file” is a yaml file constructed as follow :
username_1: max_auto_review_per_week: XXX max_auto_review_per_day: YYY username_2: max_auto_review_per_week: ZZZ max_auto_review_per_day: WWW
where username_1 is the username of a gitlab user, and max_auto_review_per_week (max_auto_review_per_day) is the maximum of automatically assigned review per week (per day).
The S3 storage
Assignbot uses a CSV file to keep track of users assignments. This CSV file is stored in an S3 storage. When you execute the bot, you must provide the following environment variables:
AWS_ACCESS_KEY_ID: your S3 key ID
AWS_SECRET_ACCESS_KEY: your S3 secret access key
S3_ENDPOINT_URL: your S3 endpoint url
S3_BUCKET_NAME: the S3 bucket to be used
Executing the bot
Once assignbot installed, you can run it as follow :
$ GITLAB_URL="https://your.forge.org" \
python3 -m assignbot ./users_preferences.yml
and the bot should start assigning merge requests to the users.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.