github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

Update documentation of count_private option

Open harry-graham opened this issue 3 years ago β€’ 6 comments

For https://github.com/anuraghazra/github-readme-stats/issues/2500.

harry-graham avatar Feb 07 '23 21:02 harry-graham

@harry-graham is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Feb 07 '23 21:02 vercel[bot]

Hey @Zo-Bro-23, just wanted to double-check with you: I think contributedTo represents the total number of repositories contributed to, so I'm not sure it makes sense to add the total number of private contributions to that.

Example

Suppose a person has contributed to 3 public repositories and 3 private repositories. Suppose that person has done 100 contributions in each of those 6 repositories.

After this PR, we would have:

  • When count_private: false => contributedTo == 3
  • When count_private: true => contributedTo == 303

What are your thoughts?

harry-graham avatar Feb 09 '23 08:02 harry-graham

Hey @Zo-Bro-23, just wanted to double-check with you: I think contributedTo represents the total number of repositories contributed to, so I'm not sure it makes sense to add the total number of private contributions to that.

Example

Suppose a person has contributed to 3 public repositories and 3 private repositories. Suppose that person has done 100 contributions in each of those 6 repositories.

After this PR, we would have:

  • When count_private: false => contributedTo == 3
  • When count_private: true => contributedTo == 303

What are your thoughts?

You're completely right 🀦 I'm sorry to have caused all this confusion. Another readme stats card I use has a field called totalContributions, which is why I initially mistook contributedTo for totalContributions. In this case, I think it would be best if we removed the count_private option. @rickstaa @anuraghazra what do you think? The restrictedContributions field gives private contributions, which is not something that we currently have. Else, we can add totalContributions as a field and add the restrictedContributions value to that, but for the time being, I think we should just remove the option altogether.

PS: I've reverted my commits.

Zo-Bro-23 avatar Feb 09 '23 09:02 Zo-Bro-23

Codecov Report

Base: 97.25% // Head: 97.25% // No change to project coverage :thumbsup:

Coverage data is based on head (4729f02) compared to base (1120006). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2504   +/-   ##
=======================================
  Coverage   97.25%   97.25%           
=======================================
  Files          24       24           
  Lines        4152     4152           
  Branches      380      380           
=======================================
  Hits         4038     4038           
  Misses        112      112           
  Partials        2        2           
Impacted Files Coverage Ξ”
src/fetchers/stats-fetcher.js 93.14% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Feb 09 '23 09:02 codecov[bot]

I'm sorry to have caused all this confusion.

No worries, thanks for being so active on this PR, and for helping to manage the back-and-forth, I really appreciate it! πŸ™ŒπŸΌ

harry-graham avatar Feb 09 '23 09:02 harry-graham

I'm sorry to have caused all this confusion.

No worries, thanks for being so active on this PR, and for helping to manage the back-and-forth, I really appreciate it! πŸ™ŒπŸΌ

We'll wait for @anuraghazra and @rickstaa before making any more moves!

Zo-Bro-23 avatar Feb 09 '23 09:02 Zo-Bro-23

@harry-graham, thanks for bringing this issue to our attention.

I agree that the count_private parameter is misleading. There is currently no way to get a user's private commits without deploying a private Vercel instance (see https://docs.github.com/en/graphql/reference/objects). I, therefore, like @Zo-Bro-23 think it is best to remove this parameter and the accompanying code entirely. The documentation can then be improved so that it is clear that people need to deploy their instance if they want to include private commits. @anuraghazra, what do you think?

rickstaa avatar Feb 14 '23 13:02 rickstaa

Closing this off for now.

harry-graham avatar Feb 18 '23 14:02 harry-graham