Skip to content

PRs with deleted heads fail validation #200

Closed
@trag1c

Description

@trag1c

Hi, first of all great project, thank you for this! ❤️
(far better experience than the most popular Python option 👀)

It looks like GitHub changed the way they give info about PRs, and .head can now be null. From some quick testing it seems like this specifically affects PRs where head is a deleted fork, e.g. ghostty-org/ghostty#533:

from githubkit import GitHub

gh = GitHub(...)

gh.rest.pulls.get("ghostty-org", "ghostty", 533).parsed_data
# 1 validation error for PullRequest
# head.repo
#   Input should be an object [type=model_type, input_value=None, input_type=NoneType]
#     For further information visit https://errors.pydantic.dev/2.11/v/model_type

Metadata

Metadata

Assignees

No one assigned

    Labels

    Rest APIbugSomething isn't workingschemaschema related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions