Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get CircleCI status badge for particular branch

I have a CircleCI badge in my readme file, which is just retrieved via:

<img src="https://circleci.com/gh/ORESoftware/live-mutex.png?circle-token=8ee836581">

is there a way to retrieve the badge for just a certain branch? Is there a way to keep it updated? Sometimes it lags - probably because of http caching.

like image 451
Alexander Mills Avatar asked May 30 '19 16:05

Alexander Mills


2 Answers

It was only a matter of putting ?branch=dev in the query params like so:

<img src="https://circleci.com/gh/ORESoftware/live-mutex.png?branch=dev&circle-token=8ee836581">
like image 132
Alexander Mills Avatar answered Nov 01 '22 11:11

Alexander Mills


Have you tried using the Status Badges page in your CircleCI project's notifications setting section?

You should be able to build a badge for your specific branch via the Branch dropdown:

By default, the badge displays the status of your project’s default branch. If you want to show the status of a different branch, use the Branch dropdown menu to select it.

like image 41
Adil B Avatar answered Nov 01 '22 11:11

Adil B