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]: The SDK returns a List of String for an issue where the values are null even when the values exist #116

Open
1 task done
Hossain2024 opened this issue Aug 27, 2024 · 2 comments
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@Hossain2024
Copy link

Hossain2024 commented Aug 27, 2024

What happened?

I am trying to get the labels from a GitHub issue . I am calling the GetAllIssuesAsync endpoint which returns all issues for a repository. Here each Issue contains the label field which is a type List<string> so I expect it to return a List of string where each string is the name of the label. something like
string[0] = "bug"
string[1] = "needs-triage"

but I am getting a List where the count = # of strings present in the list for that issue but I don't get the actual string. Each index is null in this list.

For example calling this api https://api.github.com/repos/microsoftgraph/microsoft-graph-toolkit/issues/3172 on the browser I get

Screenshot 2024-08-27 135242

Here we have two labels.

when I fetched this issue using kiota it returns

issuelabel

why is the two index null here?

After calling the endpoint GetAllIssuesAsync I create an Issue object
image
Notice that I am trying to retrieve the labels by calling issue.labels and I expect it to be list with the name of the labels as a string. But it returns a list of the size of the number of strings present in the list but each index is null.

Versions

0.0.24

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Hossain2024 Hossain2024 added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Aug 27, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@Hossain2024 Hossain2024 changed the title [BUG]: #112 [BUG]: The SDK return a List of String when it should return a List of Label Aug 27, 2024
@Hossain2024
Copy link
Author

Hossain2024 commented Aug 27, 2024

It's also a continuation of an issue I created earlier. I understand I can get the labels by the /labels endpoint. However, I am trying to retrieve it from the /issues endpoint.

Reference to the previous issue:
#112

@Hossain2024 Hossain2024 changed the title [BUG]: The SDK return a List of String when it should return a List of Label [BUG]: The SDK returns a List of String for an issue where the values are null when the values exist Aug 27, 2024
@Hossain2024 Hossain2024 changed the title [BUG]: The SDK returns a List of String for an issue where the values are null when the values exist [BUG]: The SDK returns a List of String for an issue where the values are null even when the values exist Aug 27, 2024
@kfcampbell kfcampbell removed the Status: Triage This is being looked at and prioritized label Aug 30, 2024
@kfcampbell kfcampbell moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active Aug 30, 2024
@kfcampbell kfcampbell added the Status: Up for grabs Issues that are ready to be worked on by anyone label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants