Closed ming-tsai closed 3 years ago
Hi @ming-tsai, I checked the issue it's because in the GitHub API, language is set to null for this repo as well as for some other repositories too. Have a look at this - https://api.github.com/repos/ming-tsai/emplea_do
Okay if you want to work on this change, I am assigning this issue to you. Do give me the updates or changes you are going to do to solve the issue.
Hi @ChoukseyKhushbu, I'm working on this issue, but to let you know for getting whole languages just use this endpoint https://api.github.com/repos/ming-tsai/emplea_do/languages
@ChoukseyKhushbu I highly recommend using Github token on the header, due to we have to make a request for each repository to get all languages and it is getting error by the rate limit.
Please let me know what you decide.
Yes @ming-tsai! I recognize the issue. We should shift to using GitHub token (Personal Access Token) as the application demands more API calls now. And I really apologize for replying very late as I had faced some issues with my laptop.
I will soon add a .env.sample
for the same.
Ok @ChoukseyKhushbu I will wait for your commit
I just realized that if the user has let's say 100 repositories then in this way we will have to make 100 requests which don't seem to me like an ideal solution. I have explored the GitHub GraphQL API and using that it is possible to get the languages of all the repositories in just one request. So I am already working on the implementation of this but it would be really helpful if you could write a query for fetching the repositories with languages.
I make this query, hope this helps you
query searchUser($username: String!) {
user(login: $username) {
avatarUrl(size: 60)
name
url
login
bio
websiteUrl
location
company
following {
totalCount
}
followers {
totalCount
}
repositories(last: 100, orderBy: {field: UPDATED_AT, direction: DESC}) {
nodes {
name
description
projectsUrl
languages(last: 5) {
nodes {
name
}
}
}
}
}
}
Query variables
{
"username" : "ming-tsai"
}
I am a novice on GraphQL
Hi @ChoukseyKhushbu, should I make change RestAPI to GraphQL?
Hi @ChoukseyKhushbu, should I make change RestAPI to GraphQL?
Okay. You can take it up!
Ok, working on it
@ChoukseyKhushbu, please check this pull request #33
@ChoukseyKhushbu please link pull requests to this issue.
Fixed in #33
May be should use this Github's feature
May be should use this Github's feature
Thanks for telling me this @ming-tsai. I never used this feature before. Would be of great help from now. :smiley:
For linked the pull request just click the cog
icon and find out the pull request that you want to link, see the example.
The repo card is only showing one or not showing the language but Github says it has more than one GitZilla![image](https://user-images.githubusercontent.com/37890026/88869377-9c193a80-d1e0-11ea-87aa-61256524f80d.png)
GitHub
I can work on this change if it's ok with you.