Move base label behavior to a concern

Context

This MR implements a part of https://gitlab.com/gitlab-org/gitlab/-/issues/430957+ and is MR no. 1 of 3:

  1. Move base label behavior to a concern - 👈🏼 YOU ARE HERE
  2. Create AbuseReportLabelType GraphQL type
  3. Store abuse report labels separate from project/group labels

Gist of https://gitlab.com/gitlab-org/gitlab/-/issues/430957+

Abuse report labels are currently implemented as Labels and stored in labels DB table. Since these labels are for abuse reports they do not have a project_id or a group_id and should be under gitlab_main_clusterwide schema (labels is under gitlab_main_cell).

The goal is to introduce a separate model and database table for abuse report labels so that both labels and abuse report labels features are compatible with Cells 1.0.

What does this MR do and why?

In this MR we move behaviors that is common across Label and AntiAbuse::Reports::Label (introduced in MR#3) models to a concern.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Eugie Limpin

Merge request reports

Loading