Search code examples
gitlabbadge

How to show gitlab badges per branch in readme.md


I am trying to show the build status of my branch on that branch's readme.md. https://mygitlab.com/<namespace>/<project>/badges/<branch>/coverage.svg I tried this but branch place holder isn't getting evaluated.


Solution

  • You could create a README.md with the following for each branch

    [![Coverage](https://gitlab.com/<namespace>/<project>/badges/<branch>/coverage.svg)](https://gitlab.com/<namespace>/<project>/)
    

    for example:

    Master Branch README.md

    Coverage

    Other Branch README.md

    Coverage