Skip to content

Fix incident labels in template

Craig Furman requested to merge craigf/fix-labels into master

Incidents are created from 3 sources: /incident declare in Slack (handled by woodhouse), alertmanager-GitLab integration opening an incident type issue (using the issue template this MR changes), and finally, manual creation by humans using the UI.

We had thought that /label directives in issues didn't work when the issue is submitted via the API, so we used a woodhouse markdown comment directive to strip those lines, adding the labels via an API call. This worked fine, but broke the labelling functionality when the template is used manually to create issues.

It was pointed out to me that /label directives should work via the issue creation API, and it turned out we were running into a new bug gitlab-org/gitlab#296135 (closed). Moving the label directive to the top of the issue works around this bug.

This will be accompanied by a woodhouse change to not add the labels that are already added by the slash directive.


Related: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12131

Edited by Craig Furman

Merge request reports