Shields: [GitHub] Add repository main programming language badge

Created on 7 Oct 2017  路  8Comments  路  Source: badges/shields

Hello,

Opening an issue beforehand before diving into any implementation, as suggested by the guidelines.

I believe that there is no badge to display the main programming language of a repository. This could be a useful addition!

A Github API endpoint is available to retrieve the list of all languages used in the repository, alongside the number of bytes of code written in each language.

Does this seem like a desirable new badge?

Cheers,

Pyves

good first issue service-badge

Most helpful comment

How about this?

All 8 comments

Nice idea! Though one thought I have is, is this something that is likely to change once a repository is created? We could avoid making an API call to Github by constructing the badge like this:

https://img.shields.io/badge/language-javascript-blue.svg

I would say it depends on the repository. Some might be on the tipping edge between two languages, some specific repositories might drift over time (for instance this one has progressively moved towards assembly). I guess it would be useful to have the choice between the simple one first suggested and a slightly more elaborate version that also includes the percentage for that top language?

Yes, something like that. I'll attempt an implementation and see how things turn out.

How about this?

I like this new version, best we've got so far!

Would you like to submit a PR?

@ritwickdey yes, I'm making progress on this piece of work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

calebcartwright picture calebcartwright  路  3Comments

lukeeey picture lukeeey  路  3Comments

korenyoni picture korenyoni  路  3Comments

PyvesB picture PyvesB  路  3Comments

salaros picture salaros  路  3Comments