Skip to content

Simplify issue policy, allow bots metadata access

Sean Arnold requested to merge 353637-fix-alert-bot-quick-actions into master

What does this MR do and why?

This fixes a bug where quick actions would not be processed for Incidents created automatically when an Alert is created. This behaviour is described here https://docs.gitlab.com/ee/operations/incident_management/incidents.html#create-incidents-automatically

I simplified the logic by using can?(:admin_user) instead of checking if the user was an admin, which I believe keeps the same results.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Create an alert endpoint https://docs.gitlab.com/ee/operations/incident_management/integrations.html#single-http-endpoint
  2. In the settings, enable creating Incidents automatically
  3. Create an issue template that includes quick actions (i.e adding a label)
  4. POST a request to the alert endpoint
  5. The Incident issue that was created should have applied the labels.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #353637 (closed)

Edited by Sean Arnold

Merge request reports