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

[github] Count all contributors in organization #834

Closed
DzmitryHumianiuk opened this issue Nov 28, 2016 · 9 comments
Closed

[github] Count all contributors in organization #834

DzmitryHumianiuk opened this issue Nov 28, 2016 · 9 comments
Labels
service-badge New or updated service badge

Comments

@DzmitryHumianiuk
Copy link

Now there is a badge, which represents count of contributors of specified Repo
e.g. https://img.shields.io/github/contributors/cdnjs/cdnjs.svg

Please create the badge which will count all unique contributors for specified organization.
kind of https://img.shields.io/github/contributors/cdnjs.svg

  • Since micro-services architecture becoming popular and more and more teams organize their tools in multi-repo structure
  • It should count unique contributors (by mail, or by login) to avoid duplication when 1 member make input in several repos.
@DzmitryHumianiuk DzmitryHumianiuk changed the title [Feature Request] New Badge: count of all contributors of arganization [Feature Request] New Badge: count all contributors in organization Nov 28, 2016
@paulmelnikow
Copy link
Member

Thanks for the suggestion.

Does the Github API have a way to get this information without making a lot of calls?

@paulmelnikow paulmelnikow changed the title [Feature Request] New Badge: count all contributors in organization [github] Count all contributors in organization Apr 7, 2017
@paulmelnikow paulmelnikow added the service-badge New or updated service badge label Apr 7, 2017
@DzmitryHumianiuk
Copy link
Author

@paulmelnikow no, there is no single API method to get this info.
This should be aggregated by 2 calls.

justification:
more and more project use micro-services architecture and keep services in multiply repos.

@paulmelnikow
Copy link
Member

What are the two calls?

@avarabyeu
Copy link

@paulmelnikow Need to obtain names of organization's repos and then retrieve contributors of each repo. Actually, it's n+1 calls. Are there any way to make some custom badge and just point it to endpoint which returns already aggregated info?

@paulmelnikow
Copy link
Member

Yes, that is possible. There is a PR open #820 to provide a custom badge from a JSON URL.

Another possibility, perhaps simpler, is for the endpoint doing the aggregation to issue a redirect to img.shields.io with the data in the URL, e.g.:

https://img.shields.io/badge/organization-10%20contributors-blue.svg

@avarabyeu
Copy link

@paulmelnikow #820 is good option for us. Since we want this badge to be used in MDs, there is no possibility to use JS to obtain aggregated data for building URL from option 2. When PR could me merged? Thanks for the help!

@paulmelnikow
Copy link
Member

@avarabyeu #820 needs some work. Would you like to take a look at it?

@paulmelnikow
Copy link
Member

#820 is finally merged!

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

3 participants