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*** octocrab::users can not parse name=null users #648

Closed
Kapple14 opened this issue Jun 5, 2024 · 2 comments
Closed

***BUG*** octocrab::users can not parse name=null users #648

Kapple14 opened this issue Jun 5, 2024 · 2 comments

Comments

@Kapple14
Copy link
Contributor

Kapple14 commented Jun 5, 2024

Hi! 👋

First, thanks a lot for creating this beautiful library. I am currently using it to create a small GitHub repository analyzer and receive this error for most of the fetched users:

image

Description

The error is raised due to a mismatch between the internal User struct and the API user reference. The name field is optional for GitHub users, but it is currently mandatory in the Octocrab library. This discrepancy leads to errors when processing users who do not have a name set in their GitHub profile.

Suggested Fix

Please make the name field optional in the User struct. This change would align the struct with the GitHub API documentation, which specifies that the name field is optional.

Reference:

For verification, please refer to the official GitHub API documentation: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28

@maflcko
Copy link
Contributor

maflcko commented Jun 10, 2024

Please make the name field optional in the User struct. This change would align the struct with the GitHub API documentation, which specifies that the name field is optional.

If you have a fix ready, you can submit it as a pull request. After it passes review and CI, it can be merged.

@Kapple14
Copy link
Contributor Author

Created at: #650

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

No branches or pull requests

3 participants