diff --git a/PHPCI/Controller/BuildStatusController.php b/PHPCI/Controller/BuildStatusController.php index 06f9400b..c1e2c9ae 100644 --- a/PHPCI/Controller/BuildStatusController.php +++ b/PHPCI/Controller/BuildStatusController.php @@ -75,6 +75,9 @@ class BuildStatusController extends \PHPCI\Controller */ public function image($projectId) { + $style = $this->getParam('style', 'plastic'); + $label = $this->getParam('label', 'build'); + $status = $this->getStatus($projectId); if (is_null($status)) { @@ -84,7 +87,7 @@ class BuildStatusController extends \PHPCI\Controller } $color = ($status == 'passing') ? 'green' : 'red'; - $image = file_get_contents('http://img.shields.io/badge/build-' . $status . '-' . $color . '.svg'); + $image = file_get_contents('http://img.shields.io/badge/' . $label . '-' . $status . '-' . $color . '.svg?style=' . $style); $this->response->disableLayout(); $this->response->setHeader('Content-Type', 'image/svg+xml');