Skip to content

Refactor badge template

Max Orefice requested to merge mo-refactor-badge-template into master

Ref: #241345 (closed)

What does this MR do?

This MR refactors our badge template abstract class.

It now uses the same implementation of our coverage and pipeline badge for the following methods:

  • key_text
  • key_width

Why are we doing this?

Following up !40199 (merged) where introduced the ability to adjust badge key text and width limits.

This MR tackle some ~"technical debt" identified and move some duplicated business logic in our higher abstract class.

It also uses rspec shared examples to refactor our specs.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Max Orefice

Merge request reports