Support creating static badge images
Proposal
The ask is to support custom static badge images, which could be used for project badges.
There can be times were a user may add a simple badge link to a resource (e.g. point to a custom badge, link to an external landing page, etc.); however, a user cannot create a badge without an image resource. Users can workaround this using either of the following, but may not be ideal for all situations:
- Place an image inside the repository to use (require modification to a repository's data which may not be desired)
- Place an image on an external host or use an external static shield badge (requires external resources which may not be ideal for private/self-hosted solutions)
An example () of an external hosted badge is as follows:
https://img.shields.io/badge/docs-Stable-orange
GitLab (at the time of writing) supports three types of badges (pipeline, coverage and releases). Users could try to use and manipulate an existing badge type, but its status (color) and value would not be an accurate representation of the link type:
https://gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg?key_text=My text
An example of a static badge image to support may be something such as the following:
https://gitlab.com/%{project_path}/badges/-/static.svg?key_text=My text&value_text=Jump&value_color=#F00
This badge would probably require the completion of the value_text
, value_width
and value_color
implementations.