Add severity level to compliance violations table

Proposal

With #347324 (closed), we have added the ability to save compliance violations on merging of an MR. We should now make it so that we also save the severity level of the violation to make the violations fully immutable and make it easier to find/sort violations.

Design

image

Implementation plan

  1. Add new column to the merge_requests_compliance_violations
  2. Add severity levels to the violation types
  3. Add the column to the model and add to the violation types saving process
  4. Update specs
Edited by Robert Hunt