File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class Repository(GitHubModel):
3535 license_ : Union [None , LicenseSimple ] = Field (alias = "license" )
3636 forks : int = Field ()
3737 permissions : Missing [RepositoryPropPermissions ] = Field (default = UNSET )
38- owner : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
38+ owner : Union [ None , SimpleUser ] = Field ()
3939 private : bool = Field (
4040 default = False , description = "Whether the repository is private or public."
4141 )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class RepositoryType(TypedDict):
3030 license_ : Union [None , LicenseSimpleType ]
3131 forks : int
3232 permissions : NotRequired [RepositoryPropPermissionsType ]
33- owner : SimpleUserType
33+ owner : Union [ None , SimpleUserType ]
3434 private : bool
3535 html_url : str
3636 description : Union [str , None ]
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class Repository(GitHubModel):
3535 license_ : Union [None , LicenseSimple ] = Field (alias = "license" )
3636 forks : int = Field ()
3737 permissions : Missing [RepositoryPropPermissions ] = Field (default = UNSET )
38- owner : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
38+ owner : Union [ None , SimpleUser ] = Field ()
3939 private : bool = Field (
4040 default = False , description = "Whether the repository is private or public."
4141 )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class RepositoryType(TypedDict):
3030 license_ : Union [None , LicenseSimpleType ]
3131 forks : int
3232 permissions : NotRequired [RepositoryPropPermissionsType ]
33- owner : SimpleUserType
33+ owner : Union [ None , SimpleUserType ]
3434 private : bool
3535 html_url : str
3636 description : Union [str , None ]
Original file line number Diff line number Diff line change @@ -293,6 +293,13 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
293293 " null" ,
294294] }
295295
296+ # https://github.com/yanyongyu/githubkit/issues/214
297+ # repo owner account may be deleted, can be null in pull request
298+ "/components/schemas/repository/properties/owner" = { anyOf = [
299+ { type = " null" },
300+ { "$ref" = " #/components/schemas/simple-user" },
301+ ], "$ref" = " <unset>" }
302+
296303# https://github.com/github/rest-api-description/issues/2491
297304"/components/schemas/auto-merge/properties/commit_title" = { type = [
298305 " string" ,
You can’t perform that action at this time.
0 commit comments