anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
69.57k stars 23.05k forks source link

Top contributions card #2027

Open HwangTaehyun opened 2 years ago

HwangTaehyun commented 2 years ago

Is your feature request related to a problem? Please describe.

Taehyun's GitHub Contributor stats

Describe the solution you'd like

rickstaa commented 2 years ago

@HwangTaehyun Thanks for bringing your project to our attention, and great to see that you did your project in TS. 🚀 Would be great to migrate github-readme-stats over to typescript in the future.

I like your idea and think it is within the scope of the github-readme-stats repository. I would love to add it to the github-readme-stats repository if you are interested. Nevertheless, I have to check with @anuraghazra if he thinks this is a good idea since we are already rate-limited by GitHub. I proposed #1867 to fix this, but we still have to decide on this issue.

HwangTaehyun commented 2 years ago

@rickstaa Oh, I'm delighted to hear that! Thanks for your attention to this work and I'm looking forward to hearing from you and @anuraghazra!

anuraghazra commented 2 years ago

The name kind of is misleading tho.

is it actually "top" or "latest"? It looks the most latest organizations I've contributed to.

rickstaa commented 2 years ago

The name kind of is misleading tho.

is it "top" or "latest"? It looks like the most latest organizations I've contributed to.

I agree with @anuraghazra. Based on your code you are currently showing the latest contributions. A card I could see within the GRS family would one that would show your top contributions to other repositories. Meaning the repositories to which you made the most PR and commits. I am not sure if we can directly get this information using the current GraphQL API (see repositoryconnection). I saw that some people could retrieve this information using two Graphql calls (see https://stackoverflow.com/questions/54757319/githubs-graphql-api-how-can-i-get-all-of-the-commits-ive-contributed-to-a-par).

HwangTaehyun commented 2 years ago

I intended to show all contributor stats with ranking order and some customized hide settings. I refer to your link and test it. However, maybe there are some problems when showing all contributions because GitHub told me that they offer only within 3-5 years contributions for graphql API when I asked.

rickstaa commented 2 years ago

@HwangTaehyun Ah, in that case, I think showing the top contributions might not yet possible given the current graphQL API. As a user, I would be most interested in showing my top contributions, not my latest ones, since these are already found in the GitHub contribution widget.

image

I think your card is very well coded, and you did a great job creating a unique card that will certainly appeal to some GRS users. For now, though, I think it is better to keep it on https://gihub.com/HwangTaehyun/github-contributor-stats until GraphQL makes it possible to show the top 5 contributions a user has made.

HwangTaehyun commented 2 years ago

I want to know what the meaning of top contribution. Repo that I contributed by many PRs or Top stars repo though I contributed only once. Currently, I intended to show latter repos!

rickstaa commented 2 years ago

@HwangTaehyun Ah, good point! I now understand your intentions with the card and why there is a score behind the repo. 😄 The card I had in mind would check all the repositories a user has contributed to, filter them according to the number of PR and list them from the most PR to the least. This way, a user can show in which repositories he is a frequent contributor.