Skip to content

Simplify coverage regex migration

Max Orefice requested to merge morefice/follow-up-coverage-regex into master

Ref: #17633 (closed)

What does this MR do and why?

This MR does 2 things brought up in #17633 (comment 938188933):

  • Marks our project#build_coverage_regex as READ only and exposes it to the project REST API.
  • Remove lefthover from UI in project setting referencing coverage

Why are we doing this?

As mentioned by @dnsmichi, users need to retrieve their coverage regex and update their CI job with the coverage keyword.

This simplify the migration process.

Screenshots

Before After
Screenshot_2022-05-09_at_12.30.28 Screenshot_2022-05-09_at_12.30.14

Testing locally

  1. Assign a value to project#build_coverage_regex for a given project
  2. Create an access token
  3. Verify you can retrieve the data for a given project
Project.find(<PROJECT_ID>).update(build_coverage_regex: '/coverage: \d+.\d+%/')
curl --header "Authorization: Bearer <ACCESS_TOKEN>" "http://192.168.100.160:3000/api/v4/projects/<PROJECT_ID>"

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Max Orefice

Merge request reports