Hello and thank you for your great work. :)
The shields.io website claims to support private projects on Circle CI via Circle's support for status tokens, which only have access to the build status and nothing else.
This is super awesome. It just doesn't seem to work. All I can see is "build | invalid".
To demonstrate, first the pattern from the Shields website, then a non-working and working example.
Shields pattern:
https://img.shields.io/circleci/token/YOURTOKEN/project/BrightFlair/PHP.Gt/master.svg
Non-working sample using Shields:
https://img.shields.io/circleci/token/acc2259949dc35d324ffff96186e5874a4b1ef4f/project/sitecues/sitecues-core/master.svg
Working sample using Circle:
https://circleci.com/gh/sitecues/sitecues-core.svg?style=svg&circle-token=acc2259949dc35d324ffff96186e5874a4b1ef4f
@espadrine could you confirm for me whether this is something that _should_ work or is officially supported? If so, I will post a bounty for fixing it.
It should be supported, but it's broken I think.
see original PR: https://github.com/badges/shields/pull/453
Okay, $40 bounty. 馃槃
Thanks for the PR link. It looks like Circle has a newer version of their API (v1.1) than what is being used there. That might be a good place to start.
Thanks for your work on this @RedSparr0w. I still can't use build status tokens, which was my original intention. But I guess that's a limitation on Circle's end with their API design.
@sholladay have you tried using the "build-artifact/view-builds" or "all" type api token? those are the only 2 which worked for me. the "status" token just gave a "permission denied" message which is what is now showing on your example badge:
https://img.shields.io/circleci/token/acc2259949dc35d324ffff96186e5874a4b1ef4f/project/sitecues/sitecues-core/master.svg
try changing the api token type and see if that works
more info on the tokens in this comment
edit: heres most of the info:
| Token Scope | Image | Api Link | Api Message |
| --- | --- | --- | --- |
| Status | | link |
"Permission denied" |
| View-Builds / Build Artifacts | | link | |
| All | | link | |
| Missing Token | | link |
"Project not found" |

@sholladay did using the different token type solve your problem?
if not i should be able to be modify it to read the badge from Circle CI
Well yes in that it does work using those types of tokens. It's awesome that you got that working!
The view-builds tokens still provide too much access for me to be comfortable with it; I'd still like to use the purpose-made status tokens. But it seems like the problem here is on Circle's side.
I filed an issue in the hopes that Circle notices. Though I don't expect that to get much attention.
was looking around the documentation and found that you can use shield style badges!
https://circleci.com/gh/sitecues/sitecues-core.svg?style=shield&circle-token=acc2259949dc35d324ffff96186e5874a4b1ef4f
just change from ?style=svg to ?style=shields (Although you wont be able to use flat-square or plastic style)
Right, I did see that. This might be silly but I hate the circleci branding there. I really like the shields.io philosophy of making it generic.
Yes, I'm using shields.io just to replace "circleci | passing" with "build | passing". What can I say? 馃槢
Most helpful comment
was looking around the documentation and found that you can use shield style badges!
https://circleci.com/gh/sitecues/sitecues-core.svg?style=shield&circle-token=acc2259949dc35d324ffff96186e5874a4b1ef4fjust change from
?style=svgto?style=shields(Although you wont be able to use flat-square or plastic style)