diff --git a/index.html b/index.html
index 35651b5cce0e3..7f6711947628e 100644
--- a/index.html
+++ b/index.html
@@ -118,16 +118,16 @@
Build
https://img.shields.io/magnumci/ci/96ffb83fa700f069024921b0702e76ff/new-meta.svg |
CircleCI: |
- |
- https://img.shields.io/circleci/project/BrightFlair/PHP.Gt.svg |
+ |
+ https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser.svg |
CircleCI branch: |
- |
- https://img.shields.io/circleci/project/BrightFlair/PHP.Gt/master.svg |
+ |
+ https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser/master.svg |
CircleCI token: |
- |
- https://img.shields.io/circleci/token/YOURTOKEN/project/BrightFlair/PHP.Gt/master.svg |
+ |
+ https://img.shields.io/circleci/token/YOURTOKEN/project/github/RedSparr0w/node-csgo-parser/master.svg |
Visual Studio Team services: |
|
diff --git a/server.js b/server.js
index 843e6ba6550ea..eb5dda4ac932e 100644
--- a/server.js
+++ b/server.js
@@ -4479,15 +4479,16 @@ cache(function(data, match, sendBadge, request) {
// CircleCI build integration.
// https://circleci.com/api/v1/project/BrightFlair/PHP.Gt?circle-token=0a5143728784b263d9f0238b8d595522689b3af2&limit=1&filter=completed
-camp.route(/^\/circleci\/(?:token\/(\w+))?[+\/]?project\/([^\/]+\/[^\/]+)(?:\/(.*))?\.(svg|png|gif|jpg|json)$/,
+camp.route(/^\/circleci\/(?:token\/(\w+))?[+\/]?project\/(github|bitbucket)?[+\/]?([^\/]+\/[^\/]+)(?:\/(.*))?\.(svg|png|gif|jpg|json)$/,
cache(function(data, match, sendBadge, request) {
- var token = match[1]
- var userRepo = match[2]; // eg, `BrightFlair/PHP.Gt`.
- var branch = match[3];
- var format = match[4];
+ var token = match[1];
+ var type = match[2] || 'github'; // github OR bitbucket
+ var userRepo = match[3]; // eg, `RedSparr0w/node-csgo-parser`.
+ var branch = match[4]
+ var format = match[5];
// Base API URL
- var apiUrl = 'https://circleci.com/api/v1/project/' + userRepo;
+ var apiUrl = 'https://circleci.com/api/v1.1/project/' + type + '/' + userRepo;
// Query Params
queryParams = {};
diff --git a/try.html b/try.html
index c3f502c8fcb27..a4262b2d57d2a 100644
--- a/try.html
+++ b/try.html
@@ -117,16 +117,16 @@ Build
https://img.shields.io/magnumci/ci/96ffb83fa700f069024921b0702e76ff/new-meta.svg |
CircleCI: |
- |
- https://img.shields.io/circleci/project/BrightFlair/PHP.Gt.svg |
+ |
+ https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser.svg |
CircleCI branch: |
- |
- https://img.shields.io/circleci/project/BrightFlair/PHP.Gt/master.svg |
+ |
+ https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser/master.svg |
CircleCI token: |
- |
- https://img.shields.io/circleci/token/YOURTOKEN/project/BrightFlair/PHP.Gt/master.svg |
+ |
+ https://img.shields.io/circleci/token/YOURTOKEN/project/github/RedSparr0w/node-csgo-parser/master.svg |
Visual Studio Team services: |
|
---|