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

[Bug] GitHub does not return languages for some large repos #305

Closed
tjwp opened this issue Sep 15, 2023 · 4 comments
Closed

[Bug] GitHub does not return languages for some large repos #305

tjwp opened this issue Sep 15, 2023 · 4 comments
Labels

Comments

@tjwp
Copy link
Contributor

tjwp commented Sep 15, 2023

The GitHub languages endpoint for a repo used here can return an empty response for very large repos:

https://github.com/Codium-ai/pr-agent/blob/279d45996fbc9ea70c1269ad1fca270782832b08/pr_agent/git_providers/github_provider.py#L230

An empty result for languages currently prevents some further processing of the pull request, e.g. no walkthrough for PR description.

This could be addressed by skipping file sorting if there are no languages, or allowing the languages weighting to be provided via configuration if it cannot be fetched via API.

@mrT23
Copy link
Collaborator

mrT23 commented Sep 15, 2023

can you share an example for a public repo where we get an empty response ?

@tjwp
Copy link
Contributor Author

tjwp commented Sep 15, 2023

can you share an example for a public repo where we get an empty response ?

I don't know of an example public repo. If I come across one, I'll post it. I think they should be easy to spot because Languages will not appear for the repository in the web UI. The symptom is that the get_languages() call above returns an empty Dictionary {}.

@mrT23
Copy link
Collaborator

mrT23 commented Sep 17, 2023

i am not sure if this is a property of "big" repos, or repos that for some reason disabled usage of the language feature.

in any case, handled this In #306

@mrT23 mrT23 added the fixed label Sep 17, 2023
@tjwp
Copy link
Contributor Author

tjwp commented Sep 18, 2023

Thanks for fix!

@mrT23 mrT23 closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants