Link 分支构建历史的徽章

Link badge to branch build history

当我在寻找具有给定分支状态的徽章时,我在 URL 中使用 branch 参数。我想对给定分支的最新构建或构建历史记录 link 做同样的事情。

如果目前无法做到这一点,我会非常高兴提供这样的功能。

Travis 目前似乎没有实现这一点。

虽然有一个请求此类功能的未决问题:
https://github.com/travis-ci/travis-ci/issues/1996

如果您需要 URL,唯一的解决方法是指向:

https://travis-ci.org/{owner_name}/{repo_name}/branches

这将列出所有分支构建历史。

否则可以通过 Travis CI API 以 JSON 格式访问分支构建历史(如 GH #1996 中所述),因此它是:

https://api.travis-ci.org//v3/repo/{repository.id}/branch/{branch.name}

要查找您的 repository.id,请参阅:What is the “repository ID” discussed in the Travis-CI API?