Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/models/group_0020.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Repository(GitHubModel):
license_: Union[None, LicenseSimple] = Field(alias="license")
forks: int = Field()
permissions: Missing[RepositoryPropPermissions] = Field(default=UNSET)
owner: SimpleUser = Field(title="Simple User", description="A GitHub user.")
owner: Union[None, SimpleUser] = Field()
private: bool = Field(
default=False, description="Whether the repository is private or public."
)
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/ghec_v2022_11_28/types/group_0020.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RepositoryType(TypedDict):
license_: Union[None, LicenseSimpleType]
forks: int
permissions: NotRequired[RepositoryPropPermissionsType]
owner: SimpleUserType
owner: Union[None, SimpleUserType]
private: bool
html_url: str
description: Union[str, None]
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/v2022_11_28/models/group_0020.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Repository(GitHubModel):
license_: Union[None, LicenseSimple] = Field(alias="license")
forks: int = Field()
permissions: Missing[RepositoryPropPermissions] = Field(default=UNSET)
owner: SimpleUser = Field(title="Simple User", description="A GitHub user.")
owner: Union[None, SimpleUser] = Field()
private: bool = Field(
default=False, description="Whether the repository is private or public."
)
Expand Down
2 changes: 1 addition & 1 deletion githubkit/versions/v2022_11_28/types/group_0020.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RepositoryType(TypedDict):
license_: Union[None, LicenseSimpleType]
forks: int
permissions: NotRequired[RepositoryPropPermissionsType]
owner: SimpleUserType
owner: Union[None, SimpleUserType]
private: bool
html_url: str
description: Union[str, None]
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
"null",
] }

# https://github.com/yanyongyu/githubkit/issues/214
# repo owner account may be deleted, can be null in pull request
"/components/schemas/repository/properties/owner" = { anyOf = [
{ type = "null" },
{ "$ref" = "#/components/schemas/simple-user" },
], "$ref" = "<unset>" }

# https://github.com/github/rest-api-description/issues/2491
"/components/schemas/auto-merge/properties/commit_title" = { type = [
"string",
Expand Down