Skip to content

User conversion fails when gravatar_id is null #235

Description

@SeanTAllen

GitHub's REST API description marks gravatar_id on simple-user as nullable ("type": "string", "nullable": true). UserJSONConverter reads it with as_string()? and User.gravatar_id is a String, so a user object with "gravatar_id": null fails to convert. Every model that holds a user then fails too: a repository's owner, an issue's user, and, after #220, a gist's owner, a repository's organization, and the user of a gist comment or commit.

I haven't seen GitHub send null here. Every user object I fetched has "". The schema allows it, though, so making User.gravatar_id (String | None) would match it. That changes the type of a public field.

Activity

  1. added theissue type on Dec 4, 2026
  2. added
    discuss during sync
    on Dec 4, 2026
  3. updated Review Level Medium and Priority Medium on Dec 4, 2026
  4. added
    needs discussion
    on Dec 4, 2026
  5. self-assigned this
    on Dec 5, 2026
  6. changed
    Review Level
    toon Dec 5, 2026
  7. removed
    discuss during sync
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs discussion

Type

Fields

Priority

Medium

Review Level

High

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions