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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from __future__ import annotations

from typing import Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
Expand Down Expand Up @@ -46,7 +48,7 @@ class PullRequestStackPropBase(GitHubModel):
ref: str = Field(
description="The base ref of the stack this pull request belongs to."
)
sha: str = Field(
sha: Union[str, None] = Field(
description="The base SHA of the stack this pull request belongs to."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import NotRequired, TypedDict


Expand Down Expand Up @@ -42,14 +43,14 @@ class PullRequestStackPropBaseType(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


class PullRequestStackPropBaseTypeForResponse(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


__all__ = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from __future__ import annotations

from typing import Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
Expand Down Expand Up @@ -46,7 +48,7 @@ class PullRequestStackPropBase(GitHubModel):
ref: str = Field(
description="The base ref of the stack this pull request belongs to."
)
sha: str = Field(
sha: Union[str, None] = Field(
description="The base SHA of the stack this pull request belongs to."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import NotRequired, TypedDict


Expand Down Expand Up @@ -42,14 +43,14 @@ class PullRequestStackPropBaseType(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


class PullRequestStackPropBaseTypeForResponse(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


__all__ = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from __future__ import annotations

from typing import Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
Expand Down Expand Up @@ -46,7 +48,7 @@ class PullRequestStackPropBase(GitHubModel):
ref: str = Field(
description="The base ref of the stack this pull request belongs to."
)
sha: str = Field(
sha: Union[str, None] = Field(
description="The base SHA of the stack this pull request belongs to."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import NotRequired, TypedDict


Expand Down Expand Up @@ -42,14 +43,14 @@ class PullRequestStackPropBaseType(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


class PullRequestStackPropBaseTypeForResponse(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


__all__ = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from __future__ import annotations

from typing import Union

from pydantic import Field

from githubkit.compat import GitHubModel, model_rebuild
Expand Down Expand Up @@ -46,7 +48,7 @@ class PullRequestStackPropBase(GitHubModel):
ref: str = Field(
description="The base ref of the stack this pull request belongs to."
)
sha: str = Field(
sha: Union[str, None] = Field(
description="The base SHA of the stack this pull request belongs to."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from __future__ import annotations

from typing import Union
from typing_extensions import NotRequired, TypedDict


Expand Down Expand Up @@ -42,14 +43,14 @@ class PullRequestStackPropBaseType(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


class PullRequestStackPropBaseTypeForResponse(TypedDict):
"""PullRequestStackPropBase"""

ref: str
sha: str
sha: Union[str, None]


__all__ = (
Expand Down
1 change: 1 addition & 0 deletions packages/githubkit-schemas/githubkit_schemas/versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ target_descriptions = ["ghec-2022-11-28", "ghec-2026-03-10"]
"/components/schemas/pull-request/properties/head/properties/user" = {anyOf = [{type = "null"}, {"$ref" = "#/components/schemas/simple-user"}], "$ref" = "<unset>"}
"/components/schemas/pull-request/properties/head/properties/repo" = {anyOf = [{type = "null"}, {"$ref" = "#/components/schemas/repository"}], "$ref" = "<unset>"}
"/components/schemas/pull-request-simple/properties/labels/items/properties/description" = {type = ["string", "null"]}
"/components/schemas/pull-request-stack/properties/base/properties/sha" = {type = ["string", "null"]}
"/components/schemas/repository/properties/temp_clone_token" = {type = ["string", "null"]}
"/components/schemas/minimal-repository/properties/temp_clone_token" = {type = ["string", "null"]}
"/components/schemas/team-repository/properties/temp_clone_token" = {type = ["string", "null"]}
Expand Down
26 changes: 22 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ target_descriptions = ["ghec-2022-11-28", "ghec-2026-03-10"]
"null",
] }

# https://github.com/yanyongyu/githubkit/issues/326
"/components/schemas/pull-request-stack/properties/base/properties/sha" = { type = [
"string",
"null",
] }

# https://github.com/github/rest-api-description/issues/621
"/components/schemas/repository/properties/temp_clone_token" = { type = [
"string",
Expand Down Expand Up @@ -580,10 +586,22 @@ target_descriptions = ["ghec-2022-11-28", "ghec-2026-03-10"]
] }

# webhook label archived_by user should be null or object
"/components/schemas/webhooks_label/properties/archived_by" = { type = ["null", "object"] }
"/components/schemas/webhooks_label_unarchived/allOf/1/properties/archived_by" = { type = ["null", "object"] }
"/components/schemas/webhook-issues-labeled/properties/issue/properties/labels/items/properties/archived_by" = { type = ["null", "object"] }
"/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/labels/items/properties/archived_by" = { type = ["null", "object"] }
"/components/schemas/webhooks_label/properties/archived_by" = { type = [
"null",
"object",
] }
"/components/schemas/webhooks_label_unarchived/allOf/1/properties/archived_by" = { type = [
"null",
"object",
] }
"/components/schemas/webhook-issues-labeled/properties/issue/properties/labels/items/properties/archived_by" = { type = [
"null",
"object",
] }
"/components/schemas/webhook-pull-request-labeled/properties/pull_request/properties/labels/items/properties/archived_by" = { type = [
"null",
"object",
] }

# webhook deployment protection rule action is required
"/components/schemas/webhook-deployment-protection-rule-requested" = { required = [
Expand Down
Loading