README.md in gitlab-triage-1.14.3 vs README.md in gitlab-triage-1.15.0

- old
+ new

@@ -583,10 +583,11 @@ - [`mention` action](#mention-action) - [`move` action](#move-action) - [`comment` action](#comment-action) - [`comment_type` action option](#comment-type-action-option) - [`summarize` action](#summarize-action) +- [`comment_on_summary` action](#comment-on-summary-action) ##### Labels action Adds a number of labels to the resource. @@ -864,9 +865,59 @@ Please take care of them before the end of 2000-01-01 /label ~"needs attention" ``` + +##### Comment on summary action + +Generates one comment for each resource, attaching these comments to the summary +created by the [`summarize` action](#summarize-action). + +The use case for this is wanting to create a summary with an overview, and then +a threaded discussion for each resource, with a header comment starting each +discussion. + +Accepts a single string value: the template used to generate the comments. For +details of the syntax of this template, see the [comment action](#comment-action). + +Since this action depends on the summary, it is invalid to supply a +`comment_on_summary` action without an accompanying `summarize` sibling action. +The `summarize` action will always be completed first. + +Just like for [comment action](#comment-action), setting `comment_type` in the +`actions` set controls whether the comment must be resolved for merge requests. +See: [`comment_type` action option](#comment-type-action-option). + +Example: + +```yml +resource_rules: + issues: + rules: + - name: List of issues to discuss + limits: + most_recent: 15 + actions: + comment_type: thread + comment_on_summary: | + # {{title}} + + author: {{author}} + summarize: + title: | + #{resource[:type].capitalize} require labels + item: | + - [ ] [{{title}}]({{web_url}}) {{labels}} + summary: | + The following {{type}} require labels: + + {{items}} + + Please take care of them before the end of #{7.days.from_now.strftime('%Y-%m-%d')} + + /label ~"needs attention" +``` ### Summary policies Summary policies are special policies that join multiple rule policies together to create a summary issue with all the sub-policies' summaries.