markup icon indicating copy to clipboard operation
markup copied to clipboard

Support Asciidoc-Variables for branch names

Open bmarwell opened this issue 3 years ago • 4 comments

Hi,

you can create status badges like so:

[![Maven CI](https://github.com/bmarwell/cowsay-liberty-feature/actions/workflows/maven.yaml/badge.svg?branch=main)](https://github.com/bmarwell/cowsay-liberty-feature/actions/workflows/maven.yaml)

For asciidoc, a branch name variable seems feasible, but is undocumented. Example: {github.branchname} or similar.

image:https://github.com/bmarwell/cowsay-liberty-feature/actions/workflows/maven.yaml/badge.svg?branch={github.branchname}[link="https://github.com/bmarwell/cowsay-liberty-feature/actions/workflows/maven.yaml",title="Maven CI"]

bmarwell avatar Jun 12 '22 19:06 bmarwell

I need the github branchname in asciidoc too. I woukd like to use it for dynamic badges from shields.io to set the right version of an openapi interface in develop, main and feature branches. Right now the badge is only working for one branch.

Example for branch develop: image:https://img.shields.io/badge/dynamic/yaml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgematik%2Fapi-kim%2Fdevelop%2Fsrc%2Fopenapi%2FServiceInformation.yaml&query=%24.info.version&style=plastic&logo=openapiinitiative&logoColor=green&label=ServiceInformation&color=green[link="src/openapi/ServiceInformation.yaml"]

gem-cp avatar Sep 12 '23 07:09 gem-cp