Skip to content

Add license check for full code quality report

What does this MR do?

Found via this slack thread (internal link)

This MR adds a license check for an existing feature: the full code quality report is a "GitLab Starter"/"GitLab Premium"-and-up feature

Context:

When we introduced the full code quality report, the code quality artifact was only downloadable with the required license (GitLab Starter and above), so we used the availability of the artifact as a quasi-license-check to determine whether to show the full code quality report for a pipeline.

Then when I moved the code quality MR widget to core, I made the artifact downloadable on GitLab Core so we could use it for the widget, but I didn't consider that it would also affect the quasi-license-check for the full code quality report.

Technical details:

This MR...

  • adds full_codequality_report to the list of EES_FEATURES in license.rb
  • checks that the project has the full_codequality_report before rendering the "Code Quality" pipeline tab
  • checks that the project has the full_codequality_report before rendering the contents of the "Code Quality" pipeline tab
  • adds a test case to make sure the tab won't show when unlicensed

Screenshots

There should be no visual changes, but here's the tab we're license-gating:
Screen_Shot_2021-02-04_at_13.35.22

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Miranda Fluharty

Merge request reports