Skip to content

Commit c590234

Browse files
authored
🐛 Fix: issue state reason missing duplicate (#192)
1 parent 4ebd73b commit c590234

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

githubkit/versions/ghec_v2022_11_28/models/group_0144.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Issue(GitHubModel):
4545
)
4646
state: str = Field(description="State of the issue; either 'open' or 'closed'")
4747
state_reason: Missing[
48-
Union[None, Literal["completed", "reopened", "not_planned"]]
48+
Union[None, Literal["completed", "reopened", "not_planned", "duplicate"]]
4949
] = Field(default=UNSET, description="The reason for the current state")
5050
title: str = Field(description="Title of the issue")
5151
body: Missing[Union[str, None]] = Field(

githubkit/versions/ghec_v2022_11_28/types/group_0144.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class IssueType(TypedDict):
3838
number: int
3939
state: str
4040
state_reason: NotRequired[
41-
Union[None, Literal["completed", "reopened", "not_planned"]]
41+
Union[None, Literal["completed", "reopened", "not_planned", "duplicate"]]
4242
]
4343
title: str
4444
body: NotRequired[Union[str, None]]

githubkit/versions/v2022_11_28/models/group_0041.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Issue(GitHubModel):
4545
)
4646
state: str = Field(description="State of the issue; either 'open' or 'closed'")
4747
state_reason: Missing[
48-
Union[None, Literal["completed", "reopened", "not_planned"]]
48+
Union[None, Literal["completed", "reopened", "not_planned", "duplicate"]]
4949
] = Field(default=UNSET, description="The reason for the current state")
5050
title: str = Field(description="Title of the issue")
5151
body: Missing[Union[str, None]] = Field(

githubkit/versions/v2022_11_28/types/group_0041.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class IssueType(TypedDict):
3838
number: int
3939
state: str
4040
state_reason: NotRequired[
41-
Union[None, Literal["completed", "reopened", "not_planned"]]
41+
Union[None, Literal["completed", "reopened", "not_planned", "duplicate"]]
4242
]
4343
title: str
4444
body: NotRequired[Union[str, None]]

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
217217
"null",
218218
] }
219219

220+
# https://github.com/github/rest-api-description/issues/4492
221+
# https://github.com/yanyongyu/githubkit/issues/188
222+
"/components/schemas/issue/properties/state_reason/enum" = { "<add>" = [
223+
"duplicate",
224+
] }
220225

221226
# https://github.com/github/rest-api-description/issues/1811
222227
# https://github.com/yanyongyu/githubkit/issues/64

0 commit comments

Comments
 (0)