Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: diff-entry's blob_url and raw_url may be null #134

Merged
merged 2 commits into from
Sep 21, 2024
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
6 changes: 3 additions & 3 deletions githubkit/versions/ghec_v2022_11_28/models/group_0213.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from __future__ import annotations

from typing import Literal
from typing import Union, Literal

Check warning on line 12 in githubkit/versions/ghec_v2022_11_28/models/group_0213.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/ghec_v2022_11_28/models/group_0213.py#L12

Added line #L12 was not covered by tests

from pydantic import Field

Expand All @@ -32,8 +32,8 @@
additions: int = Field()
deletions: int = Field()
changes: int = Field()
blob_url: str = Field()
raw_url: str = Field()
blob_url: Union[str, None] = Field()
raw_url: Union[str, None] = Field()

Check warning on line 36 in githubkit/versions/ghec_v2022_11_28/models/group_0213.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/ghec_v2022_11_28/models/group_0213.py#L35-L36

Added lines #L35 - L36 were not covered by tests
contents_url: str = Field()
patch: Missing[str] = Field(default=UNSET)
previous_filename: Missing[str] = Field(default=UNSET)
Expand Down
6 changes: 3 additions & 3 deletions githubkit/versions/ghec_v2022_11_28/types/group_0213.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from __future__ import annotations

from typing import Literal
from typing import Union, Literal

Check warning on line 12 in githubkit/versions/ghec_v2022_11_28/types/group_0213.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/ghec_v2022_11_28/types/group_0213.py#L12

Added line #L12 was not covered by tests
from typing_extensions import TypedDict, NotRequired


Expand All @@ -27,8 +27,8 @@
additions: int
deletions: int
changes: int
blob_url: str
raw_url: str
blob_url: Union[str, None]
raw_url: Union[str, None]

Check warning on line 31 in githubkit/versions/ghec_v2022_11_28/types/group_0213.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/ghec_v2022_11_28/types/group_0213.py#L30-L31

Added lines #L30 - L31 were not covered by tests
contents_url: str
patch: NotRequired[str]
previous_filename: NotRequired[str]
Expand Down
6 changes: 3 additions & 3 deletions githubkit/versions/v2022_11_28/models/group_0190.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from __future__ import annotations

from typing import Literal
from typing import Union, Literal

Check warning on line 12 in githubkit/versions/v2022_11_28/models/group_0190.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0190.py#L12

Added line #L12 was not covered by tests

from pydantic import Field

Expand All @@ -32,8 +32,8 @@
additions: int = Field()
deletions: int = Field()
changes: int = Field()
blob_url: str = Field()
raw_url: str = Field()
blob_url: Union[str, None] = Field()
raw_url: Union[str, None] = Field()

Check warning on line 36 in githubkit/versions/v2022_11_28/models/group_0190.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/models/group_0190.py#L35-L36

Added lines #L35 - L36 were not covered by tests
contents_url: str = Field()
patch: Missing[str] = Field(default=UNSET)
previous_filename: Missing[str] = Field(default=UNSET)
Expand Down
6 changes: 3 additions & 3 deletions githubkit/versions/v2022_11_28/types/group_0190.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from __future__ import annotations

from typing import Literal
from typing import Union, Literal

Check warning on line 12 in githubkit/versions/v2022_11_28/types/group_0190.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/types/group_0190.py#L12

Added line #L12 was not covered by tests
from typing_extensions import TypedDict, NotRequired


Expand All @@ -27,8 +27,8 @@
additions: int
deletions: int
changes: int
blob_url: str
raw_url: str
blob_url: Union[str, None]
raw_url: Union[str, None]

Check warning on line 31 in githubkit/versions/v2022_11_28/types/group_0190.py

View check run for this annotation

Codecov / codecov/patch

githubkit/versions/v2022_11_28/types/group_0190.py#L30-L31

Added lines #L30 - L31 were not covered by tests
contents_url: str
patch: NotRequired[str]
previous_filename: NotRequired[str]
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,17 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des
"null",
] }

# https://github.com/yanyongyu/githubkit/pull/134
# blob_url and raw_url may be null when the diff file is submodule's file
"/components/schemas/diff-entry/properties/blob_url" = { type = [
"string",
"null",
] }
"/components/schemas/diff-entry/properties/raw_url" = { type = [
"string",
"null",
] }

yanyongyu marked this conversation as resolved.
Show resolved Hide resolved
# [FIXED] copilot-seat-details/assignee is not valid
# "/components/schemas/copilot-seat-details/properties/assignee" = { enum = "<unset>", oneOf = [
# { "$ref" = "#/components/schemas/simple-user" },
Expand Down
Loading