Simplify issue policy, allow bots metadata access
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
- Create an alert endpoint https://docs.gitlab.com/ee/operations/incident_management/integrations.html#single-http-endpoint
- In the settings, enable creating Incidents automatically
- Create an issue template that includes quick actions (i.e adding a label)
- POST a request to the alert endpoint
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #353637 (closed)
Edited by Sean Arnold