You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document how to reference a label in GitHub-flavored Markdown #18537
I propose adding a new section here, "Referencing Labels". This feature is not directly supported by Github, but it is possible in a standard manner with a feature provided by shields.io. For example: is created with image link: 
Because this is dynamically generated, the color of the image is always accurate at the time of rendering/viewing, not just at the time of text entry. The alt text covers for missing images or communications issues.
As this is a useful and requested feature, I think it would be helpful to add the suggestion to the doc, even if the feature is not built-in to Github itself. If the shields.io service goes away, Github will have much greater issues than this one feature, and the doc can be modified as required.
TY
Additional information
On approval, I'll submit a PR for the new content.
Someone may suggest adding notes about shields for milestones and other features supported by shields.io. I suggest we process this one request first and consider other such requests on their own merits.
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
I don't think this is allowed because shields.io is a third-party service.
Thanks for the challenge...
There's no reason not to reference another site. Other sites are mentioned in these docs for similar purposes.
In particular, shields.io site is not competitive with Github or Microsoft.
There is no endorsement or implication of affiliation with a reference to that site.
That site is non-commercial, publicly supported, and entirely based on the badges/shields FOSS hosted here at Github.
It's not a volatile link. There are 5.7 million instances in Github public repo code where shields.io is already used for dynamic and static badges. The suggestion here is simply to document the established standard for what people already do, and change it later in the almost certain never to happen scenario where the site changes.
Microsoft could choose to fork and implement the shields project, and suggest to all that they can get shields from there. A decision had been made not to do that. Given that decision it seems reasonable to support documenting how to use the feature at it exists.
This doc page documents how to add a dynamic badge for workflow, using data from this site as the source. Because this site doesn't document how to use other dynamic data that is readily available, people in the FOSS community filled the gap. That saved Github/Microsoft some effort and should be rewarded with a reciprocal gesture of recognition. Let's document how to get the data from github.com directly, if it's possible, or, let's document where we know people can use this existing functionality. It's just data.
Ref functionality supported by the Github API, implemented in the badge/shields project FOSS (source for shields.io).
@TonyGravagno let me be clear, the issue is describing it enough that it seems to be official. I was thinking something that would be acceptable could be a sentence that just reads "Third-party services like shields.io allow dynamically creating images of repository labels."
👋 Thanks so much for opening an issue and clearly explaining your reasoning @TonyGravagno! Since this isn't a GitHub feature and is a totally optional thing that users can choose to add if they're interested, we're not going to add it to the docs 💛
Thank you for your interest and passion in improving the GitHub docs! ✨
It seems like GitHub must have a native way to do this because I'm seeing it in this PR: nodejs/node#43310
I'm not seeing this feature documented however so perhaps its beta? 🤔
Oh it's simple, just put in a normal link to the label. For example:
https://github.com/github/docs/labels/content
->
contentThis issue or pull request belongs to the Docs Content team
Reacted by Steven, Patrick Faion, Mochamad Iqbal Dwi Cahyo, Victor Lin, Dustin Engstrom, Miguel Ambrona, Philip Taron, Martin Price, Georgios Adzhygai, Angel Tepavicharov and 1 more
Reacted by Patrick Faion, Angel Tepavicharov and xamidi
Reacted by Patrick Faion, Mochamad Iqbal Dwi Cahyo, Ricardo G. Sousa, Miguel Ambrona, Angel Tepavicharov, xamidi, Dvd-Znf and Angela Tran
Oh it's simple, just put in a normal link to the label. For example:
contentThis issue or pull request belongs to the Docs Content team
-> content This issue or pull request belongs to the Docs Content team
That's really cool!
I'd like to mention that in case someone wishes to show labels outside of the repo that defines them, and (like me) dislikes that https://img.shields.io/ distorts color and shape of labels, it still can be done.
For example, https://img.shields.io/github/labels/xamidi/pmGenerator/challenge is ,
but (as in xamidi/pmGenerator#2) it should be .
Activity
welcome commentedon Jun 10, 2022
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
PythonCoderAS commentedon Jun 11, 2022
I don't think this is allowed because shields.io is a third-party service.
TonyGravagno commentedon Jun 12, 2022
Thanks for the challenge...
Ref functionality supported by the Github API, implemented in the badge/shields project FOSS (source for shields.io).
See also the badges/shields PR for this.
Ping @pfaion @calebcartwright
PythonCoderAS commentedon Jun 12, 2022
@TonyGravagno let me be clear, the issue is describing it enough that it seems to be official. I was thinking something that would be acceptable could be a sentence that just reads "Third-party services like
shields.ioallow dynamically creating images of repository labels."TonyGravagno commentedon Jun 12, 2022
I agree that would be ideal and I will ensure it's presented like this if the enhancement is approved. Thanks.
janiceilene commentedon Jun 15, 2022
👋 Thanks so much for opening an issue and clearly explaining your reasoning @TonyGravagno! Since this isn't a GitHub feature and is a totally optional thing that users can choose to add if they're interested, we're not going to add it to the docs 💛
Thank you for your interest and passion in improving the GitHub docs! ✨
styfle commentedon Jun 17, 2022
It seems like GitHub must have a native way to do this because I'm seeing it in this PR: nodejs/node#43310
I'm not seeing this feature documented however so perhaps its beta? 🤔
PythonCoderAS commentedon Jun 17, 2022
Oh it's simple, just put in a normal link to the label. For example:
https://github.com/github/docs/labels/content-> contentThis issue or pull request belongs to the Docs Content team
styfle commentedon Jun 17, 2022
Cool! I don't see that documented though.
Perhaps it should be added to Autolinked References and URLs
PythonCoderAS commentedon Jun 17, 2022
Maybe open a different issue for that?
Sakhilemasina commentedon Jun 17, 2022
styfle commentedon Jun 18, 2022
I created #18704
xamidi commentedon Feb 8, 2025
That's really cool!
I'd like to mention that in case someone wishes to show labels outside of the repo that defines them, and (like me) dislikes that
https://img.shields.io/distorts color and shape of labels, it still can be done.For example,
,
.
https://img.shields.io/github/labels/xamidi/pmGenerator/challengeisbut (as in xamidi/pmGenerator#2) it should be
I simply uploaded and linked an SVG
to and from this comment.
I took color and dimensions from
img.shields.io's code (where color distortion is only due to somelinearGradientoverlay).