Allow alert annotation to select issue template
We allow for templates to be used when creating alerts, with https://gitlab.com/gitlab-org/gitlab-ce/issues/55814. However this approach uses a single common template for all incoming alerts.
We should enhance this to support additional templates, in an easy to specify way. This way you could have different templates for different services, different severities, etc.
Proposal
Rather than requiring users to map templates to specifiy alerts in the GitLab UI, we could consider a more flexible and scalable approach.
We should support an annotation as part of the alert, perhaps issue_template
, which would override the default template for a specific one.
For example, an alert could send the annotation issue_template: Gitaly Incident
which would then use the issue template of Gitaly Template
instead of the one configured in settings.
Once supported, we should add some additional text to the existing template selection to indicate that it is now the "default" template and a link to instructions on how to use annotations to override it.