Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions githubkit/versions/ghec_v2022_11_28/models/group_0637.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
] = Field(description="The reason for dismissing or closing the alert.")
fixed_at: Missing[None] = Field(
fixed_at: Missing[Union[_dt.datetime, None]] = Field(
default=UNSET,
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
Expand All @@ -57,7 +57,7 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
] = Field(default=UNSET, title="Alert Instance")
number: int = Field(description="The code scanning alert number.")
rule: WebhookCodeScanningAlertFixedPropAlertPropRule = Field()
state: Union[None, Literal["fixed"]] = Field(
state: Union[None, Literal["fixed", "dismissed"]] = Field(
description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
)
tool: WebhookCodeScanningAlertFixedPropAlertPropTool = Field()
Expand Down
8 changes: 4 additions & 4 deletions githubkit/versions/ghec_v2022_11_28/types/group_0637.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class WebhookCodeScanningAlertFixedPropAlertType(TypedDict):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
]
fixed_at: NotRequired[None]
fixed_at: NotRequired[Union[_dt.datetime, None]]
html_url: str
instances_url: NotRequired[str]
most_recent_instance: NotRequired[
Union[WebhookCodeScanningAlertFixedPropAlertPropMostRecentInstanceType, None]
]
number: int
rule: WebhookCodeScanningAlertFixedPropAlertPropRuleType
state: Union[None, Literal["fixed"]]
state: Union[None, Literal["fixed", "dismissed"]]
tool: WebhookCodeScanningAlertFixedPropAlertPropToolType
url: str

Expand All @@ -59,7 +59,7 @@ class WebhookCodeScanningAlertFixedPropAlertTypeForResponse(TypedDict):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
]
fixed_at: NotRequired[None]
fixed_at: NotRequired[Union[str, None]]
html_url: str
instances_url: NotRequired[str]
most_recent_instance: NotRequired[
Expand All @@ -70,7 +70,7 @@ class WebhookCodeScanningAlertFixedPropAlertTypeForResponse(TypedDict):
]
number: int
rule: WebhookCodeScanningAlertFixedPropAlertPropRuleTypeForResponse
state: Union[None, Literal["fixed"]]
state: Union[None, Literal["fixed", "dismissed"]]
tool: WebhookCodeScanningAlertFixedPropAlertPropToolTypeForResponse
url: str

Expand Down
4 changes: 2 additions & 2 deletions githubkit/versions/v2022_11_28/models/group_0546.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
] = Field(description="The reason for dismissing or closing the alert.")
fixed_at: Missing[None] = Field(
fixed_at: Missing[Union[_dt.datetime, None]] = Field(
default=UNSET,
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
)
Expand All @@ -57,7 +57,7 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
] = Field(default=UNSET, title="Alert Instance")
number: int = Field(description="The code scanning alert number.")
rule: WebhookCodeScanningAlertFixedPropAlertPropRule = Field()
state: Union[None, Literal["fixed"]] = Field(
state: Union[None, Literal["fixed", "dismissed"]] = Field(
description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
)
tool: WebhookCodeScanningAlertFixedPropAlertPropTool = Field()
Expand Down
8 changes: 4 additions & 4 deletions githubkit/versions/v2022_11_28/types/group_0546.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ class WebhookCodeScanningAlertFixedPropAlertType(TypedDict):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
]
fixed_at: NotRequired[None]
fixed_at: NotRequired[Union[_dt.datetime, None]]
html_url: str
instances_url: NotRequired[str]
most_recent_instance: NotRequired[
Union[WebhookCodeScanningAlertFixedPropAlertPropMostRecentInstanceType, None]
]
number: int
rule: WebhookCodeScanningAlertFixedPropAlertPropRuleType
state: Union[None, Literal["fixed"]]
state: Union[None, Literal["fixed", "dismissed"]]
tool: WebhookCodeScanningAlertFixedPropAlertPropToolType
url: str

Expand All @@ -59,7 +59,7 @@ class WebhookCodeScanningAlertFixedPropAlertTypeForResponse(TypedDict):
dismissed_reason: Union[
None, Literal["false positive", "won't fix", "used in tests"]
]
fixed_at: NotRequired[None]
fixed_at: NotRequired[Union[str, None]]
html_url: str
instances_url: NotRequired[str]
most_recent_instance: NotRequired[
Expand All @@ -70,7 +70,7 @@ class WebhookCodeScanningAlertFixedPropAlertTypeForResponse(TypedDict):
]
number: int
rule: WebhookCodeScanningAlertFixedPropAlertPropRuleTypeForResponse
state: Union[None, Literal["fixed"]]
state: Union[None, Literal["fixed", "dismissed"]]
tool: WebhookCodeScanningAlertFixedPropAlertPropToolTypeForResponse
url: str

Expand Down
2 changes: 2 additions & 0 deletions githubkit/versions/versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/513a9d0d
"/components/schemas/webhook-workflow-run-in-progress/properties/workflow_run/properties/pull_requests/items/properties/number" = {type = "integer"}
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/id" = {type = "integer"}
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/number" = {type = "integer"}
"/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/fixed_at" = {type = ["string", "null"], format = "date-time"}
"/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/state/enum" = {"<add>" = ["dismissed"]}
"/webhooks/repository-dispatch-sample.collected/post" = {operationId = "repository-dispatch"}
"/components/schemas/webhooks_answer/properties/parent_id" = {type = ["integer", "null"]}
"/components/schemas/dependabot-alert-with-repository/properties/dependency/properties/relationship/enum" = {"<add>" = ["inconclusive"]}
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,18 @@ source = "descriptions-next/ghec/ghec.2022-11-28.json"
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/id" = { type = "integer" }
"/components/schemas/webhook-workflow-run-requested/properties/workflow_run/properties/pull_requests/items/properties/number" = { type = "integer" }

# https://github.com/yanyongyu/githubkit/issues/275
# https://github.com/github/rest-api-description/issues/6058
"/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/fixed_at" = { type = [
"string",
"null",
], format = "date-time" }
# https://github.com/yanyongyu/githubkit/issues/276
# https://github.com/github/rest-api-description/issues/6059
"/components/schemas/webhook-code-scanning-alert-fixed/properties/alert/properties/state/enum" = { "<add>" = [
"dismissed",
] }

# webhook repository dispatch action can be any string
"/webhooks/repository-dispatch-sample.collected/post" = { operationId = "repository-dispatch" }
# "/components/schemas/webhook-repository-dispatch-sample/properties/action" = { enum = "<unset>" }
Expand Down
Loading