[go: up one dir, main page]

Skip to content

Support modification of badge text value

Although we have the %{latest_tag} placeholder (introduced in !153525 (merged)), its current functionality is limited. We can use it in the URL of the badge link but we can't display its value in the badge image. This is because we only have 3 badge types:

type URL badge note
pipeline /badges/master/pipeline.svg pipeline
coverage /badges/master/coverage.svg pipeline
release /-/badges/release.svg release This only displays the latest tag if it's released

With the current limited badge customization, the best we can do is manipulate the key_text value of the Latest release badge, which looks like this:

https://%{gitlab_server}/%{project_path}/-/badges/release.svg?key_text=%{latest_tag}

release

^ But of course this doesn't make sense to do because we don't want to display the tag as the key_text; we want to output it as the badge's value_text. The latter field, however, is not available to customize.