Allow to warn and then close an issue
Hi,
while writing a triage policy file I could not find a way to first warn if an issue is too old and only at a later time close the issue if a second timeout expires.
My attempt was:
resource_rules:
issues:
rules:
- name: Warn issues with no activity after 2 month
conditions:
date:
attribute: updated_at
condition: older_than
interval_type: months
interval: 2
state: opened
actions:
labels:
- inactive
- name: Clear inactive label for updated issues
conditions:
state: opened
date:
attribute: updated_at
condition: newer_than
interval_type: weeks
interval: 2
labels:
- inactive
actions:
remove_labels:
- inactive
- name: Close inactive issues with no further activity after 2 weeks
conditions:
date:
attribute: updated_at
condition: older_than
interval_type: weeks
interval: 2
state: opened
labels:
- inactive
actions:
status: close
I guess I'd need the gitlab-triage to be stateful in a way that it can remember that it was him that applied the 'inactive' label so that a timer can be started from that event.
Right now 'gitlab-triage' when run correctly applies the 'inactive' label but then removes it right away again.
Thanks,
Antonio
Edited by Antonio Cardace