This training material will cover the following topics:
Triage bot is the term we use for automation that utilizes the gitlab-triage gem to perform various tasks automatically.
Triage bot utilizes policies to determine what actions to perform on what items. Currently, the policies contain rules that can be used on epics, issues, and merge requests.
Each policy contains rules for the resource set. These rules are contained within an array that detail what to run on and what to actually do. Each of these rules usually contains:
name
- the name for the ruleconditions
- the conditions the rule applies onlimits
- the limit to how many items can be grabbed at any timeactions
- the tasks to be done on items the rule applies toThis is a simple string that gives the rule a name.
This is used to dictate what items the rule will apply to. This can be a simple set of conditions or a complex one, depending on your needs. There are many types of conditions you can use. For more information, see the GitLab Triage repo.
This details any limits on the items found. Generally speaking, you will specify what limit to use and the number of items to applies this to. The limits you can use are:
most_recent
- Limits by the most recent items, using the created_at
value
sorted in descending order.oldest
- Limits by the oldest items, using the created_at
value sorted in
ascending order.As an example, to only apply on the 20 most recently created items:
limits:
most_recent: 20
As another example, to only apply on the 40 oldest items:
limits:
oldest: 40
This is where you specify what to do on the items found. There are many types of actions you can use. For more information, see the GitLab Triage repo.
At 1200 UTC everyday, we run triage-bot via the Support Ops Project repo. This utilize the Support Ops triage policies to perform various triage actions on issues and merge requests we work out of.
Generally speaking, we have rules for: