Summary issue not being generated
This policy is from a repo running the latest (0.16.0) version of gitlab-triage
:
.common_conditions_for_move_milestone_forward: &common_conditions_for_move_milestone_forward
state: opened
ruby: |
if milestone && milestone.start_date.is_a?(Date) && milestone.due_date.is_a?(Date)
milestone_expired = (milestone.due_date && Date.today > milestone.due_date)
return milestone_expired
end
false
.common_actions_for_move_milestone_forward: &common_actions_for_move_milestone_forward
comment: |
This resource has missed its milestone and has been automatically rescheduled.
/label ~"Missed Milestone"
/milestone %"#{milestone.succ.title}"
summarize:
destination: ENV['SUMMARY_PROJECT_ID'].to_i
title: |
#{resource[:type].capitalize} have been rescheduled
item: |
- [ ] [{{title}}]({{web_url}})
summary: |
The following #{resource[:type]}s have been rescheduled
{{items}}
Please take care of them before the end of #{3.days.from_now.strftime('%Y-%m-%d')}
/assign @#{ENV['TECH_LEAD']}
/labels ~"To Do"
----
redact_confidential_resources: false
resource_rules:
issues:
rules:
- name: Issue has missed its milestone
conditions:
<<: *common_conditions_for_move_milestone_forward
actions:
<<: *common_actions_for_move_milestone_forward
merge_requests:
rules:
- name: Merge request has missed its milestone
conditions:
<<: *common_conditions_for_move_milestone_forward
actions:
<<: *common_actions_for_move_milestone_forward
The environment variables TECH_LEAD
and SUMMARY_PROJECT_ID
are set in GitLab CI variables, and they seem to be fine. The policy correctly relabels resources and changes their milestone, but the summary issue is never generated.
I can well believe that this is user error, but the policy seems very similar to the example code in the docs, so I' a bit baffled?