问题描述
在我的github repo的readme.md文件中,我有一个Travis-CI徽章。我使用以下链接:
In my github repo's readme.md file I have a Travis-CI badge. I use the following link:
https://travis-ci.org/joegattnet/joegattnet_v3.png?branch=staging
显而易见的问题是分支是硬编码的。是否有可能使用某种变量,以便分支是当前正在查看的分支?
The obvious problem is that the branch is hardcoded. Is it possible to use some sort of variable so that the branch is the one currently being viewed?
推荐答案
不是我知道的。
确认(通过的在:http://stackoverflow.com/a/32762503/6309 Andrie 。
只需显示所有分行及其各自的TravisCI徽章。
Update 2016 (3 years later): while nothing has changed on the GitHub side, fedorqui reports in the workaround mentioned in "Get Travis Shield on Github to Reflect Selected Branch Status" by Andrie.
Simply display all the branches and their respective TravisCI badges.
如果您只有两个或三个分行,就够了。
If you have only two or three branches, that could be enough.
这篇关于引用github中的当前分支readme.md的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!