Allow to triage project or group milestones
Depending on your workflow, you might want to close a project milestone once its due date is passed, or a few weeks/months after that.
I think gitlab-triage
could handle that too! :)
Policy Conditions
We could add conditions such as:
- no open issues in the milestone
- no open MRs in the milestone
- We could already reuse the
date
condition:
date:
attribute: due_date
condition: older_than
interval_type: days
interval: 30
- Then we could add a conditions on the number of issues (https://docs.gitlab.com/ee/api/milestones.html#get-all-issues-assigned-to-a-single-milestone):
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/milestones.html#get-all-merge-requests-assigned-to-a-single-milestone):
merge_requests:
total_count:
condition: less_than | greater_than
count: 0
state: opened
Example
- due date is 30 days in the past
- state: open
- no associated open issues
- no associated open MRs
Policy Actions
The current actions should be enough for now.
Example
- Close
Edited by Lin Jen-Shin