Badges for Flags


How do you create a badge for an individual badge?



Simple question. Docs just say: “Badges and graphs may express specific flags only. More details on this will come soon.” ( Does that mean the docs will come soon, or the ability to create badges for flags (feature) will come soon?

1 Like

Hi @cjancsar, thanks for your question! Unfortunately, it means that the feature will be coming soon. I don’t yet have a timeline for you, but I’ll be sure to bring this up with the product team.

Hello @cjancsar,

using the querystrign ?flag=<flag-name> works. This returns a badge with the numbers from only the mentioned flag.

I’m currently using like this:<org>/<project>/branch/<branch>/graph/badge.svg?flag=<flag-name>

As an example:

1 Like

Add this solution to the document?

People need to search for this solution.

I don’t think it solves the problem. It shows unknown and also in the repo you mentioned as an example.

@VijayanB, I’m not sure what you mean

Demo flag

Index flag

No flag

@tom I stand corrected. I was referring to different branch which never uploaded coverage report and got unknown as coverage. After merging the branch and once upload happened from that branch, i see the values. Thanks,

1 Like