vn7n24fzkq / github-profile-summary-cards

A tool to generate your github summary card for profile README
https://github-profile-summary-cards.vercel.app/demo
MIT License
2.64k stars 315 forks source link

[Feature request] Statistics Include organizational repositories and open source contributions in the GitHub Profile Summary API #200

Open ChunhThanhDe opened 6 days ago

ChunhThanhDe commented 6 days ago

Context

I am using the following two APIs to display language statistics in my GitHub README:

  <td width="50%" align="center">
    <img align="center" src="https://github-profile-summary-cards.vercel.app/api/cards/repos-per-language?username=ChunhThanhDe&theme=dark" alt="1999AZZAR :: Top Langs by repo" />
    <br></br>
    <img align="center" src="https://github-profile-summary-cards.vercel.app/api/cards/most-commit-language?username=ChunhThanhDe&theme=dark" alt="1999AZZAR :: Top Langs by commit" />
  </td>
1999AZZAR :: Top Langs by repo

1999AZZAR :: Top Langs by commit However, I noticed that these APIs only count repositories and commits from my personal repos, and do not include repos in organizations that I have created or my contributions to open source projects. I would like the API to be expanded to include these repos and commits in my personal README. **Alternatives** Currently, I haven’t found an alternative way to achieve this. However, adding support for counting contributions to repos outside of personal ownership would be an ideal solution. **Has the feature been requested before?** I haven’t seen any similar feature requests on the support channels. **If the feature request is approved, would you be willing to submit a PR?** Yes, I am willing to submit a PR if assistance is provided.
vn7n24fzkq commented 6 days ago

This might be related to issue #89. 🤔

Currently, we calculate the total code in a repository but are not able to specify and separate multiple user contributions within a single repository. I'm not sure whether the current GitHub API provides this functionality.

As per your request, we would need the following features:

  1. Find repositories where the user has contributed, whether in organizations or in repositories owned by other users.
  2. Calculate the programming languages used based on the user's commits or lines of code in those repositories. (Not sure if this is a good idea, especially if the user's commits have been overwritten by another author.)

I think we can consider implementing this feature if it is practical (might need some investigation).

Would you like to do this? 😃

ChunhThanhDe commented 4 days ago

Thank you for your response! After some thought, I agree that calculating every individual commit in open-source projects may not be a practical solution, especially when the user's commits could be overwritten or modified by another author.

Additionally, including repositories I've created within organizations in the stats may not be entirely necessary for the purposes of displaying information on my personal README.

I'll consider alternative ways to showcase my contributions beyond personal repositories.

Thanks again for explaining the situation and helping me understand it better. 😁😁

Cheezik commented 4 days ago

if i could suggest, i might something along the lines of "Organisation Stats" were it would show all commits form the organisation's repos/projects.. Like:

Organisation: Sýrek industries Total repos: 7 Total commits: 7,456 Commits by 3,941 <% form total comits exp:(48%)>do Total stars: 1,030 Used languages <a pie graph of most used languages and list of top 5 languages within as a list under>

Questions is if this would generate for all of organisations, or provide user an option to select specific one. perhaps make an extention with seperate workflow that requires to define specific organisation (it could be replicated as much as user wants to display )