Skip to content

Support custom text for coverage badges

Description

It is possible to define multiple build jobs with test coverage and display coverage badges for each of them. Yet their badges all look the same and are therefore indistinguishable:

coverage.svg

Proposal

Support passing a custom text for the badge as parameter like this:

https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=rake+karma&key_text=frontend+coverage

Since the width of the badge text is currently hardcoded, the easiest solution would probably be passing it as parameter as well:

https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=rake+karma&key_text=frontend+coverage&key_width=123