File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ class PullRequestPropHead(GitHubModel):
2424
2525 label : Union [str , None ] = Field ()
2626 ref : str = Field ()
27- repo : Repository = Field (title = "Repository" , description = "A repository on GitHub." )
27+ repo : Union [ None , Repository ] = Field ()
2828 sha : str = Field ()
29- user : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
29+ user : Union [ None , SimpleUser ] = Field ()
3030
3131
3232class PullRequestPropBase (GitHubModel ):
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ class PullRequestPropHeadType(TypedDict):
2121
2222 label : Union [str , None ]
2323 ref : str
24- repo : RepositoryType
24+ repo : Union [ None , RepositoryType ]
2525 sha : str
26- user : SimpleUserType
26+ user : Union [ None , SimpleUserType ]
2727
2828
2929class PullRequestPropBaseType (TypedDict ):
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ class PullRequestPropHead(GitHubModel):
2424
2525 label : Union [str , None ] = Field ()
2626 ref : str = Field ()
27- repo : Repository = Field (title = "Repository" , description = "A repository on GitHub." )
27+ repo : Union [ None , Repository ] = Field ()
2828 sha : str = Field ()
29- user : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
29+ user : Union [ None , SimpleUser ] = Field ()
3030
3131
3232class PullRequestPropBase (GitHubModel ):
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ class PullRequestPropHeadType(TypedDict):
2121
2222 label : Union [str , None ]
2323 ref : str
24- repo : RepositoryType
24+ repo : Union [ None , RepositoryType ]
2525 sha : str
26- user : SimpleUserType
26+ user : Union [ None , SimpleUserType ]
2727
2828
2929class PullRequestPropBaseType (TypedDict ):
Original file line number Diff line number Diff line change @@ -238,10 +238,15 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
238238 " string" ,
239239 " null" ,
240240] }
241- "/components/schemas/pull-request/properties/head/properties/user" = { type = [
242- " object" ,
243- " null" ,
244- ] }
241+ "/components/schemas/pull-request/properties/head/properties/user" = { anyOf = [
242+ { type = " null" },
243+ { "$ref" = " #/components/schemas/simple-user" },
244+ ], "$ref" = " <unset>" }
245+ # https://github.com/yanyongyu/githubkit/issues/200
246+ "/components/schemas/pull-request/properties/head/properties/repo" = { anyOf = [
247+ { type = " null" },
248+ { "$ref" = " #/components/schemas/repository" },
249+ ], "$ref" = " <unset>" }
245250
246251# https://github.com/github/rest-api-description/issues/1812
247252"/components/schemas/pull-request-simple/properties/labels/items/properties/description" = { type = [
You can’t perform that action at this time.
0 commit comments