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

feat: remove 'include_private' #2736

Merged
merged 5 commits into from
Jun 7, 2023
Merged

feat: remove 'include_private' #2736

merged 5 commits into from
Jun 7, 2023

Conversation

rickstaa
Copy link
Collaborator

@rickstaa rickstaa commented May 19, 2023

As explained in #2517 the 'include_private' flag is confusing and doesn't work as expected. This commit therefore removes this flag.

TODOs

  • remove conflicts.
  • Update FAQ.

As explained in #2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.
@vercel
Copy link

vercel bot commented May 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
github-readme-stats ✅ Ready (Inspect) Visit Preview Jun 7, 2023 8:17am

@rickstaa
Copy link
Collaborator Author

@qwerty541 @anuraghazra told me he will add you as a collaborator when he finds the time. I was curious to know what you think about this change?

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.05 🎉

Comparison is base (0fe51cd) 97.53% compared to head (a35b8e5) 97.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2736      +/-   ##
==========================================
+ Coverage   97.53%   97.59%   +0.05%     
==========================================
  Files          24       24              
  Lines        4824     4814      -10     
  Branches      449      447       -2     
==========================================
- Hits         4705     4698       -7     
+ Misses        118      115       -3     
  Partials        1        1              
Impacted Files Coverage Δ
api/index.js 96.03% <ø> (-0.08%) ⬇️
src/fetchers/stats-fetcher.js 92.66% <ø> (+0.90%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@qwerty541 qwerty541 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anuraghazra told me he will add you as a collaborator when he finds the time.

Nice

I was curious to know what you think about this change?

I fully agree that the count_private parameter has behavior that confuse users and support the course to change how it works. But it is important to consider that a large number of users still want to be able to add their private contributions to the statistics card, and I am one of them. As far as I understand, this pull request is a preparation step for adding the optional ability to display the value of the total contributions, including private ones, on the statistics card. If I understood everything correctly, then I support this change.

I can also add that I think it's good practice for a pull request to contain changes related to only one small task. If I were you, I would format the readme file in a separate pull request so that changes are not confusing.

@rickstaa
Copy link
Collaborator Author

rickstaa commented May 25, 2023

@anuraghazra told me he will add you as a collaborator when he finds the time.

Nice

I was curious to know what you think about this change?

I fully agree that the count_private parameter has behavior that confuse users and support the course to change how it works. But it is important to consider that a large number of users still want to be able to add their private contributions to the statistics card, and I am one of them. As far as I understand, this pull request is a preparation step for adding the optional ability to display the value of the total contributions, including private ones, on the statistics card. If I understood everything correctly, then I support this change.

I can also add that I think it's good practice for a pull request to contain changes related to only one small task. If I were you, I would format the readme file in a separate pull request so that changes are not confusing.

@qwerty541 This pull request was meant to remove the count_private flag all together, as we don't have permissions to view a user's private commits. Users that want to include private commits therefore have to deploy their own Vercel instance. However, You are welcome to create a pull request that shows contributions instead of commits (see #2517 (comment)) 👍🏻.

@francois-rozet
Copy link
Collaborator

francois-rozet commented May 30, 2023

I also think displaying contributions instead of commits would be better as some users mainly have private contribs. However this will generate a lot of questions from users. Note that "contributed to" can also be replaced by "repositories" to avoid confusions (while still counting the repositories that were contributed to).

@rickstaa
Copy link
Collaborator Author

I also think displaying contributions instead of commits would be better as some users mainly have private contribs. However this will generate a lot of questions from users. Note that "contributed to" can also be replaced by "repositories" to avoid confusions (while still counting the repositories that were contributed to).

@francois-rozet Thanks for your feedback 💪🏻!

Users can already show private commits by deploying their own Vercel instance. However, as stated above, I agree that giving users the ability to also show contributions using the show_contribs and include_private_contribs flags while removing the include_private flag will be great 🚀! If anybody wants to take this one, feel free to create a pull request.

@francois-rozet
Copy link
Collaborator

francois-rozet commented May 30, 2023

Would show_contribs replace the commit field or add a new field? Also, we should directly count the private contributions instead of adding a flag include_private_contribs. I don't think anyone would choose to not count them if they are set as public in their GitHub profile.

@rickstaa
Copy link
Collaborator Author

rickstaa commented May 30, 2023

Would show_contribs replace the commit field or add a new field? Also, we should directly count the private contributions instead of adding a flag include_private_contribs. I don't think anyone would choose to not count them if they are set as public in their GitHub profile.

Ideally, I think it would be an extra statistics people can enable. People can then disable the commits if they like, using the hide flag. I agree that the include_private_contribs flag is not needed 😅!

@francois-rozet
Copy link
Collaborator

francois-rozet commented May 30, 2023

I am not familiar with that part of the API (adding a new field to the card), but I can do the "backend" part if needed. Or you can point me to where I can modify the card.

@rickstaa
Copy link
Collaborator Author

I am not familiar with that part of the API (adding a new field to the card), but I can do the "backend" part if needed. Or you can point me to where I can modify the card.

It would, of course, be great if you could create a pull request, but don't feel pressured 👍🏻. The stats card items are added in:

const statItems = Object.keys(STATS)
.filter((key) => !hide.includes(key))
.map((key, index) =>
// create the text nodes, and pass index so that we can calculate the line spacing
createTextNode({
...STATS[key],
index,
showIcons: show_icons,
shiftValuePos: 79.01 + (isLongLocale ? 50 : 0),
bold: text_bold,
number_format,
}),
);

Please don't hesitate to request any help you need.

@rickstaa
Copy link
Collaborator Author

I updated the CONTRIBUTING.md some weeks ago also to explain how people can use a debugger with the project might that be helpful.

@qwerty541
Copy link
Collaborator

@anuraghazra told me he will add you as a collaborator when he finds the time.

Nice

I was curious to know what you think about this change?

I fully agree that the count_private parameter has behavior that confuse users and support the course to change how it works. But it is important to consider that a large number of users still want to be able to add their private contributions to the statistics card, and I am one of them. As far as I understand, this pull request is a preparation step for adding the optional ability to display the value of the total contributions, including private ones, on the statistics card. If I understood everything correctly, then I support this change.
I can also add that I think it's good practice for a pull request to contain changes related to only one small task. If I were you, I would format the readme file in a separate pull request so that changes are not confusing.

@qwerty541 This pull request was meant to remove the count_private flag all together, as we don't have permissions to view a user's private commits. Users that want to include private commits therefore have to deploy their own Vercel instance. However, You are welcome to create a pull request that shows contributions instead of commits (see #2517 (comment)) 👍🏻.

I looked a little deeper and realized that the main problem with the count_private parameter is not that its behavior is not obvious to users, but that because of it, when using your own vercel instance, the statistics card shows false information. When using your own vercel instance, the statistics card already shows all private contributions, and the count_private parameter adds redundant commits that are already taken into account there. Now I fully agree that this parameter should be removed.

@rickstaa
Copy link
Collaborator Author

rickstaa commented Jun 5, 2023

@anuraghazra told me he will add you as a collaborator when he finds the time.

Nice

I was curious to know what you think about this change?

I fully agree that the count_private parameter has behavior that confuse users and support the course to change how it works. But it is important to consider that a large number of users still want to be able to add their private contributions to the statistics card, and I am one of them. As far as I understand, this pull request is a preparation step for adding the optional ability to display the value of the total contributions, including private ones, on the statistics card. If I understood everything correctly, then I support this change.
I can also add that I think it's good practice for a pull request to contain changes related to only one small task. If I were you, I would format the readme file in a separate pull request so that changes are not confusing.

@qwerty541 This pull request was meant to remove the count_private flag all together, as we don't have permissions to view a user's private commits. Users that want to include private commits therefore have to deploy their own Vercel instance. However, You are welcome to create a pull request that shows contributions instead of commits (see #2517 (comment)) 👍🏻.

I looked a little deeper and realized that the main problem with the count_private parameter is not that its behavior is not obvious to users, but that because of it, when using your own vercel instance, the statistics card shows false information. When using your own vercel instance, the statistics card already shows all private contributions, and the count_private parameter adds redundant commits that are already taken into account there. Now I fully agree that this parameter should be removed.

Great! I will merge this pull request when I get a review from @anuraghazra or @Zo-Bro-23 👍🏻.

@rickstaa rickstaa requested a review from qwerty541 June 7, 2023 06:49
@qwerty541
Copy link
Collaborator

Hey, @rickstaa! You need to resolve conflicts before merging.

@rickstaa rickstaa force-pushed the remove_include_private branch from 7c4c70a to 0c3aa0f Compare June 7, 2023 07:45
@rickstaa rickstaa marked this pull request as ready for review June 7, 2023 07:45
@rickstaa
Copy link
Collaborator Author

rickstaa commented Jun 7, 2023

Hey, @rickstaa! You need to resolve conflicts before merging.

Of course! Sorry, here you go 😄.

readme.md Outdated Show resolved Hide resolved
@qwerty541 qwerty541 merged commit b9200c6 into master Jun 7, 2023
@rickstaa rickstaa deleted the remove_include_private branch June 7, 2023 08:25
j4ckofalltrades pushed a commit to j4ckofalltrades/gh-stats that referenced this pull request Jun 8, 2023
* feat: remove 'include_private'

As explained in anuraghazra#2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
demirmusa added a commit to demirmusa/github-readme-stats that referenced this pull request Jun 15, 2023
anyesu added a commit to anyesu/anyesu that referenced this pull request Sep 4, 2023
- add card_width
- remove count_private
  ref: anuraghazra/github-readme-stats#2736
devantler pushed a commit to devantler/github-readme-stats that referenced this pull request Sep 24, 2023
* feat: remove 'include_private'

As explained in anuraghazra#2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
paddyroddy added a commit to paddyroddy/paddyroddy that referenced this pull request Nov 7, 2023
This is now being handled directly by self-hosting anuraghazra/github-readme-stats#2736
Ganbin added a commit to Ganbin/github-readme-stats that referenced this pull request Dec 22, 2023
…k Staa <rick.staa@outlook.com>	7 Jun 2023 at 10:21
setdebarr pushed a commit to setdebarr/github-readme-stats that referenced this pull request Jan 12, 2024
* feat: remove 'include_private'

As explained in anuraghazra#2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
jacobbexten pushed a commit to jacobbexten/github-readme-stats that referenced this pull request Nov 6, 2024
* feat: remove 'include_private'

As explained in anuraghazra#2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants