badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.43k stars 5.49k forks source link

PR additions/deletions badge #3363

Open ice1000 opened 5 years ago

ice1000 commented 5 years ago

:clipboard: Description

GitHub PR additions/deletions badge. Since there are two data to be displayed, I suggest a badge like this:

:link: Data

Can be accessed via GitHub PR API (last few lines):

  "commits": 1,
  "additions": 85,
  "deletions": 54,
  "changed_files": 5
}

:microphone: Motivation

To show that our PRs are big/small

JosepBernad commented 5 years ago

Like it, I can work on that @ice1000! Thanks for the idea.

In which category would you include this service?

calebcartwright commented 5 years ago

I can see the value here, but I do wonder if/how it fits in with the Badge Specification.

Admittedly, the social badges we already have diverge from that spec a bit (at least IMO), so perhaps this isn't an issue.

Curious what some of the other maintainers think on this one

ice1000 commented 5 years ago

Like it, I can work on that @ice1000! Thanks for the idea.

In which category would you include this service?

Maybe status?

paulmelnikow commented 5 years ago

Thanks for the suggestion @ice1000 and for the legwork on the implementation @JosepBernad!

I'm in two minds about the unique format. I think is clever and cute though supporting two formats like and would be more consistent with everything else we do.

In terms of a category, our PR-related badges are in https://shields.io/category/issue-tracking.

JosepBernad commented 5 years ago

Thanks, @paulmelnikow, when I started working on that, I assumed that it was issue tracking. I have been working on the first format, but it's pretty straightforward to change if you consider it. Is there any way to create a new style with one label and two messages (kinda like merging both proposals)? If that's not possible, I would use the first format (although it doesn't follow entirely the specification).

paulmelnikow commented 5 years ago

Is there any way to create a new style with one label and two messages (kinda like merging both proposals)?

That could be possible, but would require a new template, be a fair amount of work. I'd also want to think about more use cases before adding something like that (maybe test result badges and rating badges, which often display 1–3 pieces of information) and carefully consider whether we want to add more design options.

calebcartwright commented 5 years ago

I would recommend that for the first pass, this be implemented via the existing standard formats that @paulmelnikow showed above. If there's a desire to add a new format then that can be tackled in a follow on and reviewed independently.