Quick actions not working for Alert Bot created incidents from templates
Summary
Quick actions are not working with incidents created from by GitLab Alert Bot from templates. When creating them manually, labels and assignments are working as expected using quick actions.
Our documentation mentions:
To further customize the issue, you can add labels, mentions, or any other supported quick action in the selected issue template
We would expect quick actions to work in this case. We also don't have a list of supported quick actions available.
Steps to reproduce
- Create a description issue template as described in our docs. In my example, I created
.gitlab/issue_templates/mytemplate.md
- Fill out the template with simple quick actions such as
/label <your_label>
. In my example, did/label ~"Status::Done"
- Commit the file to the default main branch
- Go to
Monitor > Incident > Create incident
and confirm that the template is available. Create an incident manually by filling out a title and clicking on "Create Issue". The incident should be created and labels should be created at creation. - Go to
Settings > Monitor > Alerts
and configure a new alert. Ensure that the integration is enabled, no other options are needed aside from a name. - Go to
Alert Settings
and check the box toCreate an incident
and choose the template that you've created. - Click "View Credentials" to get your Webhook URL and Authorization Key and send a test payload:
❯ curl --request POST \
--data '{"title": "Test incident"}' \
--header "Authorization: Bearer <AUTH KEY>" \
--header "Content-Type: application/json" \
https://gitlab.com/path/to/project/alerts/notify/test/xxxxxxxx.json
Note that an incident will be created but any quick actions inside of your template will not work when the GitLab Alert Bot creates the issue.
Severity is current defined at severity3 because a user can go to the incident and label it, assign it, and etc manually. However, the feature itself is seemingly broken.
Example Project
What is the current bug behavior?
Using quick actions inside of an incident template do not work if created by the Gitlab Alert Bot.
What is the expected correct behavior?
When the GitLab Alert Bot creates an incident, it should be able to perform quick actions.
Relevant logs and/or screenshots
Output of checks
GitLab.com 14.9.0-pre b43d9482
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)