jenkinsci / badge-plugin

Jenkins Badge plugin
https://plugins.jenkins.io/badge/
MIT License
32 stars 43 forks source link

Is it possible to add link in the addShortText dsl? #2

Closed scheibinger closed 6 years ago

scheibinger commented 6 years ago

Is there a way to add the text link rather than icon link?

Any chance to get addShortText api enhanced in the following way?:

addShortText(text, escapeHtml)

bakito commented 6 years ago

I could add the link like addShortText(text, link)

What do you mean with addShortText(text, escapeHtml) Would you want to provide some custom thml for the short text?

scheibinger commented 6 years ago

It would be more flexible to just allow anyone to pass the html snippet and turn off escaping using the escapeHtml flag. Similar to createSummary function.

This way anyone could create a link or even customize its style. It would also allow to display any html content.

bakito commented 6 years ago

I've added a new dsl function to add a html badge, which supports only html. @scheibinger Does this suite your needs?

scheibinger commented 6 years ago

Thanks so much @bakito This is exactly what I need.