Skip to content

Commit

Permalink
Clearer format for #661
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Rottenberg authored and Julien Rottenberg committed Mar 30, 2016
1 parent d132117 commit e728f23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4483,7 +4483,7 @@ cache(function(data, match, sendBadge, request) {
}
var path = user + '/' + repo;
var url = 'https://registry.hub.docker.com/v2/repositories/' + path;
var badgeData = getBadgeData('automated build', data);
var badgeData = getBadgeData('docker build', data);
request(url, function(err, res, buffer) {
if (err != null) {
badgeData.text[1] = 'inaccessible';
Expand All @@ -4492,11 +4492,12 @@ cache(function(data, match, sendBadge, request) {
}
try {
var data = JSON.parse(buffer);
var automated = data.is_automated;
badgeData.text[1] = automated;
if (automated) {
var is_automated = data.is_automated;
if (is_automated) {
badgeData.text[1] = 'automated';
badgeData.colorscheme = 'blue';
} else {
badgeData.text[1] = 'manual';
badgeData.colorscheme = 'yellow';
}
badgeData.colorB = '#008bb8';
Expand Down

0 comments on commit e728f23

Please sign in to comment.