[Backend] Filter compliance violations by all protected branches
Problem to solve
For &7879 (closed) we need the ability to show all compliance violations that occurred only on protected branches
.
Proposed solution
Add the ability to filter compliance violations by all protected branches. It should:
- Filter the violating merge requests by matching the
target_branch
(and/orsource_branch
) with all the projects' protected branches. - By default this filter should not be active.
Implementation plan
WIP
backend with a weight estimate of
Question:
Would it be possible combine 2.
and 3.
in the implementation below in a single query?
Implementation:
- Add branches as a query option.
- Get all the protected branches of all the applicable projects.
- Add a new branch scope to
compliance_violation.rb
and filter by the protected branches. - Update specs to cover filtering by all protected branches.
- Update documentation.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.