Skip to content

Commit 72a5827

Browse files
authored
🐛 Fix: discussion answer parent id type (#241)
1 parent 1ffc2d6 commit 72a5827

6 files changed

Lines changed: 12 additions & 4 deletions

File tree

githubkit/versions/ghec_v2022_11_28/models/group_0525.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class WebhooksAnswer(GitHubModel):
4242
html_url: str = Field()
4343
id: int = Field()
4444
node_id: str = Field()
45-
parent_id: None = Field()
45+
parent_id: Union[int, None] = Field()
4646
reactions: Missing[WebhooksAnswerPropReactions] = Field(
4747
default=UNSET, title="Reactions"
4848
)

githubkit/versions/ghec_v2022_11_28/types/group_0525.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class WebhooksAnswerType(TypedDict):
3434
html_url: str
3535
id: int
3636
node_id: str
37-
parent_id: None
37+
parent_id: Union[int, None]
3838
reactions: NotRequired[WebhooksAnswerPropReactionsType]
3939
repository_url: str
4040
updated_at: datetime

githubkit/versions/v2022_11_28/models/group_0458.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class WebhooksAnswer(GitHubModel):
4242
html_url: str = Field()
4343
id: int = Field()
4444
node_id: str = Field()
45-
parent_id: None = Field()
45+
parent_id: Union[int, None] = Field()
4646
reactions: Missing[WebhooksAnswerPropReactions] = Field(
4747
default=UNSET, title="Reactions"
4848
)

githubkit/versions/v2022_11_28/types/group_0458.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class WebhooksAnswerType(TypedDict):
3434
html_url: str
3535
id: int
3636
node_id: str
37-
parent_id: None
37+
parent_id: Union[int, None]
3838
reactions: NotRequired[WebhooksAnswerPropReactionsType]
3939
repository_url: str
4040
updated_at: datetime

githubkit/versions/versions.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/dee4dc2b
141141
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/id" = {type = "integer"}
142142
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/number" = {type = "integer"}
143143
"/webhooks/repository-dispatch-sample.collected/post" = {operationId = "repository-dispatch"}
144+
"/components/schemas/webhooks_answer/properties/parent_id" = {type = ["integer", "null"]}
144145
"/components/schemas/dependabot-alert-with-repository/properties/dependency/properties/relationship/enum" = {"<add>" = ["inconclusive"]}
145146
"/components/schemas/code-scanning-alert-classification/enum" = {"<add>" = ["documentation"]}
146147

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,13 @@ source = "descriptions-next/ghec/ghec.2022-11-28.json"
549549
"/webhooks/repository-dispatch-sample.collected/post" = { operationId = "repository-dispatch" }
550550
# "/components/schemas/webhook-repository-dispatch-sample/properties/action" = { enum = "<unset>" }
551551

552+
# https://github.com/yanyongyu/githubkit/issues/239
553+
# discussion answer's parent id may be not null
554+
"/components/schemas/webhooks_answer/properties/parent_id" = { type = [
555+
"integer",
556+
"null",
557+
] }
558+
552559
# https://github.com/yanyongyu/githubkit/issues/205
553560
# https://github.com/github/rest-api-description/issues/4727
554561
"/components/schemas/dependabot-alert-with-repository/properties/dependency/properties/relationship/enum" = { "<add>" = [

0 commit comments

Comments
 (0)