Describe the bug
A clear and concise description of what the bug is.
is not working
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots / Live demo link (paste the github-readme-stats link as markdown image)
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Hi @rmdhfz thanks for opening the issue.
Well Google is not an user, it's an organization
I also wanted to note this, I'll try to look into that. Should display a custom error. @anuraghazra
Looks like it's not natively possible (AFAIK), but there could be a simple solution to this, if the lookup of the user fails, we could just query
{
organization(login: "google") {
name
}
}
and look for errors there.
Yes, @filiptronicek github orgs are not normal users you cannot fetch those stats in organization.
We would just show a error and fallback by querying the organization. As we did in repo card.
Looks like it's not natively possible (AFAIK), but there could be a simple solution to this, if the lookup of the user fails, we could just query
{ organization(login: "google") { name } }and look for errors there.
@filiptronicek so turns out we need to give our PAT tokens read:org permissions to be able to fetch the organization query
Your token has not been granted the required scopes to execute this query. The 'login' field requires one of the following scopes: ['read:org'], but your token has only been granted the: ['gist', 'repo', 'user'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
That's a bummer, what about having a PAT just for this? Then we won't have to create new ones again @anuraghazra
That's a bummer, what about having a PAT just for this?
It would make the fetcher unnecessarily complex just to fetch that once piece of information with a different PAT & we also have to then make two requests to the API.
Then we won't have to create new ones again @anuraghazra
We don't have to create new PATs we just need to regenerate them with new scopes.
So i think we have to solution
Could not resolve to a User with the login of 'google'. so we can just simply add another warning text to say "Make sure the provided username is not an organization"
Most helpful comment
Yes, @filiptronicek github orgs are not normal users you cannot fetch those stats in organization.
We would just show a error and fallback by querying the organization. As we did in repo card.