Allow to triage project labels
Depending on your workflow, you might want to delete a project label given certain conditions.
Policy Conditions
We could add conditions such as:
- no open issues associated with the label
- no open MRs associated with the label
- Then we could add a conditions on the number of issues (https://docs.gitlab.com/ee/api/labels.html):
issues:
total_count:
condition: less_than | greater_than
count: 0
state: opened
- And add a conditions on the number of merge requests (https://docs.gitlab.com/ee/api/labels.html):
merge_requests:
total_count:
condition: less_than | greater_than
count: 0
state: opened
Example
- state: open
- no associated open issues
- no associated open MRs
Policy Actions
The current actions should be enough for now.
Example
- Close
Challenge
- Ideally it should be possible to manage group labels too.
- It should also be possible to filter on the name of the labels given a pattern.
- If we take the GitLab workflow example, we will want to delete
Pick into X.Y
labels once the X.Y milestone is closed but this kind of logic shouldn't be in the core of thegitlab-triage
project, but we could achieve it if we had a plugin system that would allow us to write custom and advanced triage logic.