teoxoy / profile-readme-stats

Showcase your github stats on your profile README.md
https://github.com/marketplace/actions/profile-readme-stats
MIT License
245 stars 85 forks source link

Forks Are Excluded #2

Closed umutphp closed 3 years ago

umutphp commented 3 years ago

Hi @teoxoy,

Many thanks for this great action :)

The action excludes the forked repositories while calculating the stats. I personally think that there are may be forked repositories which may worth to mention in the profile (in terms of count and stars). So, what do you think about stopping to exclude forks?

Or an input can bu added to the action to include this kind of repositories.

teoxoy commented 3 years ago

One idea I had is to calculate the stars relative to the users contribution to that repo. This is not yet possible because of a bug in Github's GraphQL API (I reported it, they are working on it).

When it comes to count of repos, I didn't want to include forks because usually you would fork a repo, commit and then put up a PR on the original. This would in turn double the nr of repos which to me seems like artificially inflating the number.

umutphp commented 3 years ago

Many thanks for the quick reply :).

You are mostly right about the PR flow but also there are some exceptional cases. One case is the translation repositories of articles, lists or e-books. For example, I am managing the Turkish translation of Hacker Laws repository. The fork will never be put up as a PR to the main repository.

teoxoy commented 3 years ago

Oh, makes sense. Would you like to put up a PR for this? It would consist of adding an option (includeForks) to the action.

umutphp commented 3 years ago

I would really like to do but I am not good at JS and TS.

teoxoy commented 3 years ago

@umutphp fixed some stuff in the PR and merged it Let me know if it works as expected!

umutphp commented 3 years ago

Hi @teoxoy ,

Many thanks for the quick action :). The code is working as expected.