Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left and right label values as params? #815

Closed
kevinSuttle opened this issue Oct 22, 2016 · 5 comments
Closed

Left and right label values as params? #815

kevinSuttle opened this issue Oct 22, 2016 · 5 comments
Labels
service-badge New or updated service badge

Comments

@kevinSuttle
Copy link

kevinSuttle commented Oct 22, 2016

?leftLabel=foo&rightLabel=bar <= Is this a thing? I swear I looked through the issues and couldn't find it.

If you try to double it up like the link param, it just concats a comma and the 2nd value to the left label.

@kevinSuttle
Copy link
Author

To be clear, yes, I'm asking about the params. I realize you can just specify the right side with a dash.

@kevinSuttle kevinSuttle changed the title Static right label text? Left and right label values as params? Oct 22, 2016
@RedSparr0w
Copy link
Member

pretty sure the only param is ?label=foo to change the left label and the only way to specify left & right label is https://img.shields.io/badge/<leftlabel>-<rightlabel>-<color>.svg

@paulmelnikow paulmelnikow added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Apr 17, 2017
@jasonkarns
Copy link

This is rather frustrating when attempting to create a custom badge URL because it means the right-side can't be provided without some escaping.

I'm trying to generate custom badges where the right side is a semver version string, which can contain dashes. In order to account for the "normal" use of the dash as the -- separator, that requires the dashes be escaped (with another dash). This is rather difficult when the badge URL is being generated via simple shell scripts. :(

It would be preferable if all portions could be specified via query params, such that the status portion could be provided without needing to escape it (well, other than the URI escaping which is necessary regardless where in the URL that segment lives).

@paulmelnikow
Copy link
Member

It's a good idea. I like the dashes as shorthand for simple badges, though they are not useful for complex things nor programmatic generation. We should keep the current URL scheme working, for backward compatibility, though how about we add a second one https://img.shields.io/badge.svg?… which pulls everything from the query string?

@paulmelnikow paulmelnikow added core Server, BaseService, GitHub auth, Shared helpers and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Oct 4, 2017
@paulmelnikow paulmelnikow added good first issue New contributors, join in! service-badge New or updated service badge and removed core Server, BaseService, GitHub auth, Shared helpers labels Oct 31, 2017
@platan platan added the hacktoberfest Same as "good first issue" label Sep 30, 2018
@platan platan removed hacktoberfest Same as "good first issue" labels Nov 1, 2018
@paulmelnikow paulmelnikow removed the good first issue New contributors, join in! label Jan 8, 2019
@paulmelnikow
Copy link
Member

Let's track this in #2673.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

5 participants