Shields: Delete me

Created on 18 Feb 2018  路  11Comments  路  Source: badges/shields

service-badge

Most helpful comment

Engaging with you on this feels weird. I agree this badge is a good idea, and one I鈥檇 like to help make happen. However this project doesn鈥檛 sell licenses or subscriptions. It鈥檚 public domain and free to use, so that鈥檚 just not how it works. You鈥檙e sort of dangling a carrot, and then taking it away.

All 11 comments

@ashtonhogan do you know if GitHub provides such information through some of their existing API endpoints?

http://isitmaintained.com/ have badges for this.

Their code is probably a good starting point to see how it is done, but based on https://github.com/mnapoli/IsItMaintained#run

The first time a badge is generated takes a few seconds,

it may be difficult to calculate in a performant way.

I believe it would be straightforward to filter issues per label as the GitHub API supports an optional labels parameter.

Nevertheless, as several of you have alluded to, I'm also concerned about performance. The API calls are paginated and return at most 30 issues, which is already quite a big blob of data (over 1600 lines of JSON returned when trying to retrieve one page from one of my personal repositories). On a bigger project such as Shields, we would need to make 26 such API calls if we want to perform a "brute force" averaging of the response time for all issues. This would really put a huge load on the server just to retrieve the data.

If we want to implement such a badge in a way that is acceptable performance-wise, we should either rely on a third-party to do the computations (does IsItMaintained itself have an API?) provided they offer good response times, or adopt a statistical model in shields by only averaging on a subset of the issues (but we may still need rather big samples to have meaningful data).

IsItMaintained does not have an API. What I do however is that I cache the data and recompute each badge once in a while. But yes, on big projects it takes time, avoiding reaching GitHub's API limit is also a problem.

the shields business model

:smile: donations welcome

Who are you going to pay and how much? This is very confusing, this is an open source project, it's not a matter of saying "I'll pay for it" and voil脿 the job is done.

@mnapoli
per @chris48s : https://opencollective.com/shields

There are some other badges people have asked for which require caching some data that goes beyond what we have in the API. The main one that comes to mind are the total aggregate NPM download stats #1278, which is something I could totally see doing in Shields, either if we find a way to do it cheaply, or get some more resources.

"Is it maintained" isn't just a matter of caching. It's more complicated and involves more nuanced design challenges. I think it deserves the focus of its own project. I could see running something like that under the Shields organization if people were interested, hosting it separately, and providing an API that the Shields badge could hit. Though, why don't we just join forces with isitmaintained, and try to build the caching in on their end?

I don't know that they wouldn't be willing to add this feature, they just stated they do not have time to work on implementing the feature themselves.

From their readme:

If you want a feature to be added, pull requests are welcome.

Engaging with you on this feels weird. I agree this badge is a good idea, and one I鈥檇 like to help make happen. However this project doesn鈥檛 sell licenses or subscriptions. It鈥檚 public domain and free to use, so that鈥檚 just not how it works. You鈥檙e sort of dangling a carrot, and then taking it away.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

calebcartwright picture calebcartwright  路  3Comments

rominf picture rominf  路  3Comments

AlexWayfer picture AlexWayfer  路  3Comments

Turnerj picture Turnerj  路  3Comments

Fazendaaa picture Fazendaaa  路  3Comments