-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Circle CI Integration | Circle CI API v1.1 #798
Conversation
@espadrine any chance we can get this merged? Much appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution!
@@ -117,16 +117,16 @@ <h3 id="build"> Build </h3> | |||
<td><code>https://img.shields.io/magnumci/ci/96ffb83fa700f069024921b0702e76ff/new-meta.svg</code></td> | |||
</tr> | |||
<tr><th> CircleCI: </th> | |||
<td><img src='/circleci/project/BrightFlair/PHP.Gt.svg' alt=''/></td> | |||
<td><code>https://img.shields.io/circleci/project/BrightFlair/PHP.Gt.svg</code></td> | |||
<td><img src='/circleci/project/github/RedSparr0w/node-csgo-parser.svg?maxAge=2592000' alt=''/></td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove maxAge from try.html please?
index.html is meant to be generated from try.html through make website
, which I can do for you.
|
||
// Base API URL | ||
var apiUrl = 'https://circleci.com/api/v1/project/' + userRepo; | ||
var apiUrl = 'https://circleci.com/api/v1.1/project/'+ type +"/"+ userRepo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put spaces around the +
operators please?
var branch = match[3]; | ||
var format = match[4]; | ||
var token = match[1]; | ||
var type = match[2]; // github OR bitbucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of this piece of the URL will break existing links. Could you make that part optional, defaulting to GitHub, please?
Updated with requested changes. |
This prevents from misparsing /circleci/project/githubuser/repo.svg as user "user". Related to #798.
Thanks a lot! |
I haven't been able to reproduce a working example using a build status token with the img.shields.io server that's currently online. The home page seems to indicate this has been deployed. @espadrine is this correct? A full API token does work, but using those is dangerous for this use case. Here is an example that ought to say "passing", but instead says "invalid". Here is the equivalent directly from Circle, which works. |
FWIW, I had to add a token with |
{
"message" : "Permission denied"
} but seems to work using view-builds scope - gives permission denied error for
|
Confirmed creating a token with |
Oh man, that would be immensely helpful |
Perhaps even a query param to view the raw JSON response. That way, it would be standardized for all badge providers. Something like |
I've implemented what i was saying above in #816 But to dump the json for all badges would probably require quite a massive amount of changes. |
A few vendor data is obtained through non-JSON formats, some over several requests. |
Fixes #791 @sholladay
url structure:
/circleci/token/YOURTOKEN/project/github/RedSparr0w/node-csgo-parser/master.svg