Skip to content

Update gitlab code coverage badges with custom text

Problem to solve

The coverage badges in the GitLab project don't take advantage of the new custom text on coverage badge feature.

Intended users

GitLab team members and community members who look at the coverage badges for the main GitLab project

User experience goal

When looking at the home page for the GitLab project it is clear which coverage badge belongs to which programming language.

Proposal

Replace the coverage badge links in the project settings with the following in the "Badge Image URL" text field:

JS Coverage: https://gitlab.com/gitlab-org/gitlab/badges/master/coverage.svg?job=coverage-frontend&key_text=JS%20Coverage&key_width=85

Ruby Coverage: https://gitlab.com/gitlab-org/gitlab/badges/master/coverage.svg?job=coverage&key_text=Ruby%20Coverage&key_width=90

This update requires a maintainer to modify the gitlab project settings. No MR is required.

The settings page is at the root of the settings here: https://gitlab.com/gitlab-org/gitlab/edit

Each existing badge should have a pencil beside it that can edit the existing URL. We are changing the text on both badges, and changing the JS coverage to point to the Jest coverage instead of the Karma coverage with the changes above.

There is a "Badges" section in the main settings page:

image

Further details

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Ricky Wiens