Skip to content

Commit 8a95b8a

Browse files
authored
🐛 fix search repo item missing field
1 parent 6fdb8a1 commit 8a95b8a

10 files changed

Lines changed: 16 additions & 12 deletions

File tree

githubkit/versions/ghec_v2022_11_28/models/group_0548.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class RepoSearchResultItem(GitHubModel):
101101
has_projects: bool = Field()
102102
has_pages: bool = Field()
103103
has_wiki: bool = Field()
104-
has_downloads: bool = Field()
104+
has_downloads: Missing[bool] = Field(default=UNSET)
105105
has_discussions: Missing[bool] = Field(default=UNSET)
106106
has_pull_requests: Missing[bool] = Field(default=UNSET)
107107
pull_request_creation_policy: Missing[Literal["all", "collaborators_only"]] = Field(

githubkit/versions/ghec_v2022_11_28/types/group_0548.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RepoSearchResultItemType(TypedDict):
9999
has_projects: bool
100100
has_pages: bool
101101
has_wiki: bool
102-
has_downloads: bool
102+
has_downloads: NotRequired[bool]
103103
has_discussions: NotRequired[bool]
104104
has_pull_requests: NotRequired[bool]
105105
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]
@@ -198,7 +198,7 @@ class RepoSearchResultItemTypeForResponse(TypedDict):
198198
has_projects: bool
199199
has_pages: bool
200200
has_wiki: bool
201-
has_downloads: bool
201+
has_downloads: NotRequired[bool]
202202
has_discussions: NotRequired[bool]
203203
has_pull_requests: NotRequired[bool]
204204
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]

githubkit/versions/ghec_v2026_03_10/models/group_0546.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class RepoSearchResultItem(GitHubModel):
101101
has_projects: bool = Field()
102102
has_pages: bool = Field()
103103
has_wiki: bool = Field()
104-
has_downloads: bool = Field()
104+
has_downloads: Missing[bool] = Field(default=UNSET)
105105
has_discussions: Missing[bool] = Field(default=UNSET)
106106
has_pull_requests: Missing[bool] = Field(default=UNSET)
107107
pull_request_creation_policy: Missing[Literal["all", "collaborators_only"]] = Field(

githubkit/versions/ghec_v2026_03_10/types/group_0546.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RepoSearchResultItemType(TypedDict):
9999
has_projects: bool
100100
has_pages: bool
101101
has_wiki: bool
102-
has_downloads: bool
102+
has_downloads: NotRequired[bool]
103103
has_discussions: NotRequired[bool]
104104
has_pull_requests: NotRequired[bool]
105105
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]
@@ -198,7 +198,7 @@ class RepoSearchResultItemTypeForResponse(TypedDict):
198198
has_projects: bool
199199
has_pages: bool
200200
has_wiki: bool
201-
has_downloads: bool
201+
has_downloads: NotRequired[bool]
202202
has_discussions: NotRequired[bool]
203203
has_pull_requests: NotRequired[bool]
204204
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]

githubkit/versions/v2022_11_28/models/group_0463.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class RepoSearchResultItem(GitHubModel):
101101
has_projects: bool = Field()
102102
has_pages: bool = Field()
103103
has_wiki: bool = Field()
104-
has_downloads: bool = Field()
104+
has_downloads: Missing[bool] = Field(default=UNSET)
105105
has_discussions: Missing[bool] = Field(default=UNSET)
106106
has_pull_requests: Missing[bool] = Field(default=UNSET)
107107
pull_request_creation_policy: Missing[Literal["all", "collaborators_only"]] = Field(

githubkit/versions/v2022_11_28/types/group_0463.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RepoSearchResultItemType(TypedDict):
9999
has_projects: bool
100100
has_pages: bool
101101
has_wiki: bool
102-
has_downloads: bool
102+
has_downloads: NotRequired[bool]
103103
has_discussions: NotRequired[bool]
104104
has_pull_requests: NotRequired[bool]
105105
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]
@@ -198,7 +198,7 @@ class RepoSearchResultItemTypeForResponse(TypedDict):
198198
has_projects: bool
199199
has_pages: bool
200200
has_wiki: bool
201-
has_downloads: bool
201+
has_downloads: NotRequired[bool]
202202
has_discussions: NotRequired[bool]
203203
has_pull_requests: NotRequired[bool]
204204
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]

githubkit/versions/v2026_03_10/models/group_0461.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class RepoSearchResultItem(GitHubModel):
101101
has_projects: bool = Field()
102102
has_pages: bool = Field()
103103
has_wiki: bool = Field()
104-
has_downloads: bool = Field()
104+
has_downloads: Missing[bool] = Field(default=UNSET)
105105
has_discussions: Missing[bool] = Field(default=UNSET)
106106
has_pull_requests: Missing[bool] = Field(default=UNSET)
107107
pull_request_creation_policy: Missing[Literal["all", "collaborators_only"]] = Field(

githubkit/versions/v2026_03_10/types/group_0461.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RepoSearchResultItemType(TypedDict):
9999
has_projects: bool
100100
has_pages: bool
101101
has_wiki: bool
102-
has_downloads: bool
102+
has_downloads: NotRequired[bool]
103103
has_discussions: NotRequired[bool]
104104
has_pull_requests: NotRequired[bool]
105105
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]
@@ -198,7 +198,7 @@ class RepoSearchResultItemTypeForResponse(TypedDict):
198198
has_projects: bool
199199
has_pages: bool
200200
has_wiki: bool
201-
has_downloads: bool
201+
has_downloads: NotRequired[bool]
202202
has_discussions: NotRequired[bool]
203203
has_pull_requests: NotRequired[bool]
204204
pull_request_creation_policy: NotRequired[Literal["all", "collaborators_only"]]

githubkit/versions/versions.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/3ba1e727
7777
"/components/schemas/repository-webhooks/properties/temp_clone_token" = {type = ["string", "null"]}
7878
"/components/schemas/repository-webhooks/properties/template_repository/properties/temp_clone_token" = {type = ["string", "null"]}
7979
"/components/schemas/repository/properties/owner" = {anyOf = [{type = "null"}, {"$ref" = "#/components/schemas/simple-user"}], "$ref" = "<unset>"}
80+
"/components/schemas/repo-search-result-item/required" = {"<remove>" = ["has_downloads"]}
8081
"/components/schemas/auto-merge/properties/commit_title" = {type = ["string", "null"]}
8182
"/components/schemas/auto-merge/properties/commit_message" = {type = ["string", "null"]}
8283
"/paths/~1repos~1{owner}~1{repo}~1releases/post/requestBody/content/application~1json/schema/properties/make_latest" = {default = "true"}

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ source = "descriptions-next/ghec/ghec.2026-03-10.json"
328328
{ "$ref" = "#/components/schemas/simple-user" },
329329
], "$ref" = "<unset>" }
330330

331+
# https://github.com/yanyongyu/githubkit/issues/293
332+
"/components/schemas/repo-search-result-item/required" = { "<remove>" = ["has_downloads"] }
333+
331334
# https://github.com/github/rest-api-description/issues/2491
332335
"/components/schemas/auto-merge/properties/commit_title" = { type = [
333336
"string",

0 commit comments

Comments
 (0)