如何获得特定分支的 CircleCI 状态徽章

How to get CircleCI status badge for particular branch

我的自述文件中有一个 CircleCI 徽章,刚刚通过以下方式检索:

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

有没有办法只检索某个分支的徽章?有没有办法让它保持更新?有时它会滞后 - 可能是因为 http 缓存。

您是否尝试过在 CircleCI 项目的通知设置部分使用 Status Badges page

您应该能够通过 Branch 下拉菜单为您的特定分支构建徽章:

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.

只需将 ?branch=dev 放入查询参数中,如下所示:

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