File tree Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Expand file tree Collapse file tree 5 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ class PullRequestPropHead(GitHubModel):
24
24
25
25
label : Union [str , None ] = Field ()
26
26
ref : str = Field ()
27
- repo : Repository = Field (title = "Repository" , description = "A repository on GitHub." )
27
+ repo : Union [ None , Repository ] = Field ()
28
28
sha : str = Field ()
29
- user : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
29
+ user : Union [ None , SimpleUser ] = Field ()
30
30
31
31
32
32
class PullRequestPropBase (GitHubModel ):
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ class PullRequestPropHeadType(TypedDict):
21
21
22
22
label : Union [str , None ]
23
23
ref : str
24
- repo : RepositoryType
24
+ repo : Union [ None , RepositoryType ]
25
25
sha : str
26
- user : SimpleUserType
26
+ user : Union [ None , SimpleUserType ]
27
27
28
28
29
29
class PullRequestPropBaseType (TypedDict ):
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ class PullRequestPropHead(GitHubModel):
24
24
25
25
label : Union [str , None ] = Field ()
26
26
ref : str = Field ()
27
- repo : Repository = Field (title = "Repository" , description = "A repository on GitHub." )
27
+ repo : Union [ None , Repository ] = Field ()
28
28
sha : str = Field ()
29
- user : SimpleUser = Field (title = "Simple User" , description = "A GitHub user." )
29
+ user : Union [ None , SimpleUser ] = Field ()
30
30
31
31
32
32
class PullRequestPropBase (GitHubModel ):
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ class PullRequestPropHeadType(TypedDict):
21
21
22
22
label : Union [str , None ]
23
23
ref : str
24
- repo : RepositoryType
24
+ repo : Union [ None , RepositoryType ]
25
25
sha : str
26
- user : SimpleUserType
26
+ user : Union [ None , SimpleUserType ]
27
27
28
28
29
29
class 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
238
238
" string" ,
239
239
" null" ,
240
240
] }
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>" }
245
250
246
251
# https://github.com/github/rest-api-description/issues/1812
247
252
"/components/schemas/pull-request-simple/properties/labels/items/properties/description" = { type = [
You can’t perform that action at this time.
0 commit comments