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

Top languages sorted by repositories or commits #2545

Closed
MR-Addict opened this issue Feb 25, 2023 · 9 comments
Closed

Top languages sorted by repositories or commits #2545

MR-Addict opened this issue Feb 25, 2023 · 9 comments
Labels
enhancement New feature or request.

Comments

@MR-Addict
Copy link

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

It seems that default top languages is sorted by repositories that contains corresponding language.

But that's not always the case. Top languages sorted by commits could be more precise.

Describe the solution you'd like

Add an options to API like this:

https://github-readme-stats.vercel.app/api/top-langs?method=repos;
#or
https://github-readme-stats.vercel.app/api/top-langs?method=commits;

Describe alternatives you've considered

No response

Additional context

A similar profile summary project given these two options:

image

@MR-Addict MR-Addict added the enhancement New feature or request. label Feb 25, 2023
@Zo-Bro-23
Copy link
Collaborator

Sorting by lines of code would be even better :) Not sure how many API calls this will require though, so maybe we can try to implement it in the GitHub Action that's going to be released. This is a low priority though, so feel free to take it up yourselves!

@MR-Addict
Copy link
Author

I understand that implementing this feature may require additional API calls or resources, and I appreciate your consideration of implementing it in a GitHub Action.

I'll keep an eye on the project and would be happy to contribute to this feature if and when resources become available.

Thank you for maintaining this great project!

@Zo-Bro-23
Copy link
Collaborator

Let's keep the issue open!

@Zo-Bro-23 Zo-Bro-23 reopened this Feb 25, 2023
@rickstaa
Copy link
Collaborator

Sorting by lines of code would be even better :) Not sure how many API calls this will require though, so maybe we can try to implement it in the GitHub Action that's going to be released. This is a low priority though, so feel free to take it up yourselves!

A lot of things can be implemented in the GitHub action 🚀.

Btw, @MR-Addict the pie chart you show in the examples has already been implemented #2099. It just needs a last review from @Zo-Bro-23 or @anuraghazra.

@Zo-Bro-23
Copy link
Collaborator

Yeah I'll take a look at that when I get some time.

@rickstaa
Copy link
Collaborator

Yeah I'll take a look at that when I get some time.

Take your time!

@anuraghazra
Copy link
Owner

I think we've evaluated this long ago, its not feasible to fetch each and every commit of users to calculate the top languages. Way to many api requests will need to be invoked.

@rickstaa
Copy link
Collaborator

rickstaa commented Feb 25, 2023

I think we've evaluated this long ago, its not feasible to fetch each and every commit of users to calculate the top languages. Way to many api requests will need to be invoked.

I agree that this feature request is infeasible with the Vercel model. With the Action, this could be done, but it will change the codebase too much, and I, therefore, don't think implementing is worth it. In that case, people can create a new repository and use the npm package when it is released (see #2473).

I, however, think we can merge #2111 and make it available under an ENV variable so that we can use it in the GitHub action. With this solution; most people will be happy.

I will close this one for now. @MR-Addict, you can keep an eye on #2473 if you want to implement this yourself.

@MR-Addict
Copy link
Author

Ok, I'll keep an eye on it. And I'll take a look at github action.

Again, thinks for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

4 participants