Skip to content

Commit 817f91b

Browse files
authored
👽 re-generate openapi models and apis
1 parent 3c32104 commit 817f91b

File tree

5,872 files changed

+980823
-11119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,872 files changed

+980823
-11119
lines changed

githubkit/rest/__init__.py

Lines changed: 3560 additions & 3626 deletions
Large diffs are not rendered by default.

githubkit/versions/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
VERSIONS = {
1313
"2022-11-28": "v2022_11_28",
1414
"ghec-2022-11-28": "ghec_v2022_11_28",
15+
"2026-03-10": "v2026_03_10",
16+
"ghec-2026-03-10": "ghec_v2026_03_10",
1517
}
16-
LATEST_VERSION = "2022-11-28"
17-
VERSION_TYPE = Literal["2022-11-28", "ghec-2022-11-28"]
18+
LATEST_VERSION = "2026-03-10"
19+
VERSION_TYPE = Literal["2022-11-28", "ghec-2022-11-28", "2026-03-10", "ghec-2026-03-10"]
1820

1921
from .rest import RestVersionSwitcher as RestVersionSwitcher
2022
from .webhooks import WebhooksVersionSwitcher as WebhooksVersionSwitcher
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""

githubkit/versions/ghec_v2026_03_10/models/__init__.py

Lines changed: 14871 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
from pydantic import Field
13+
14+
from githubkit.compat import GitHubModel, model_rebuild
15+
from githubkit.typing import Missing
16+
from githubkit.utils import UNSET
17+
18+
19+
class Root(GitHubModel):
20+
"""Root"""
21+
22+
current_user_url: str = Field()
23+
current_user_authorizations_html_url: str = Field()
24+
code_search_url: str = Field()
25+
commit_search_url: str = Field()
26+
emails_url: str = Field()
27+
emojis_url: str = Field()
28+
events_url: str = Field()
29+
feeds_url: str = Field()
30+
followers_url: str = Field()
31+
following_url: str = Field()
32+
gists_url: str = Field()
33+
issue_search_url: str = Field()
34+
issues_url: str = Field()
35+
keys_url: str = Field()
36+
label_search_url: str = Field()
37+
notifications_url: str = Field()
38+
organization_url: str = Field()
39+
organization_repositories_url: str = Field()
40+
organization_teams_url: str = Field()
41+
public_gists_url: str = Field()
42+
rate_limit_url: str = Field()
43+
repository_url: str = Field()
44+
repository_search_url: str = Field()
45+
current_user_repositories_url: str = Field()
46+
starred_url: str = Field()
47+
starred_gists_url: str = Field()
48+
topic_search_url: Missing[str] = Field(default=UNSET)
49+
user_url: str = Field()
50+
user_organizations_url: str = Field()
51+
user_repositories_url: str = Field()
52+
user_search_url: str = Field()
53+
54+
55+
model_rebuild(Root)
56+
57+
__all__ = ("Root",)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
from typing import Annotated, Union
13+
14+
from pydantic import Field
15+
16+
from githubkit.compat import GitHubModel, model_rebuild
17+
from githubkit.typing import Missing
18+
from githubkit.utils import UNSET
19+
20+
21+
class CvssSeverities(GitHubModel):
22+
"""CvssSeverities"""
23+
24+
cvss_v3: Missing[Union[CvssSeveritiesPropCvssV3, None]] = Field(default=UNSET)
25+
cvss_v4: Missing[Union[CvssSeveritiesPropCvssV4, None]] = Field(default=UNSET)
26+
27+
28+
class CvssSeveritiesPropCvssV3(GitHubModel):
29+
"""CvssSeveritiesPropCvssV3"""
30+
31+
vector_string: Union[str, None] = Field(description="The CVSS 3 vector string.")
32+
score: Union[Annotated[float, Field(le=10.0)], None] = Field(
33+
description="The CVSS 3 score."
34+
)
35+
36+
37+
class CvssSeveritiesPropCvssV4(GitHubModel):
38+
"""CvssSeveritiesPropCvssV4"""
39+
40+
vector_string: Union[str, None] = Field(description="The CVSS 4 vector string.")
41+
score: Union[Annotated[float, Field(le=10.0)], None] = Field(
42+
description="The CVSS 4 score."
43+
)
44+
45+
46+
model_rebuild(CvssSeverities)
47+
model_rebuild(CvssSeveritiesPropCvssV3)
48+
model_rebuild(CvssSeveritiesPropCvssV4)
49+
50+
__all__ = (
51+
"CvssSeverities",
52+
"CvssSeveritiesPropCvssV3",
53+
"CvssSeveritiesPropCvssV4",
54+
)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
from pydantic import Field
13+
14+
from githubkit.compat import GitHubModel, model_rebuild
15+
from githubkit.typing import Missing
16+
from githubkit.utils import UNSET
17+
18+
19+
class SecurityAdvisoryEpss(GitHubModel):
20+
"""SecurityAdvisoryEpss
21+
22+
The EPSS scores as calculated by the [Exploit Prediction Scoring
23+
System](https://www.first.org/epss).
24+
"""
25+
26+
percentage: Missing[float] = Field(le=100.0, default=UNSET)
27+
percentile: Missing[float] = Field(le=100.0, default=UNSET)
28+
29+
30+
model_rebuild(SecurityAdvisoryEpss)
31+
32+
__all__ = ("SecurityAdvisoryEpss",)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
from typing import Union
13+
14+
from pydantic import Field
15+
16+
from githubkit.compat import GitHubModel, model_rebuild
17+
from githubkit.typing import Missing
18+
from githubkit.utils import UNSET
19+
20+
21+
class SimpleUser(GitHubModel):
22+
"""Simple User
23+
24+
A GitHub user.
25+
"""
26+
27+
name: Missing[Union[str, None]] = Field(default=UNSET)
28+
email: Missing[Union[str, None]] = Field(default=UNSET)
29+
login: str = Field()
30+
id: int = Field()
31+
node_id: str = Field()
32+
avatar_url: str = Field()
33+
gravatar_id: Union[str, None] = Field()
34+
url: str = Field()
35+
html_url: str = Field()
36+
followers_url: str = Field()
37+
following_url: str = Field()
38+
gists_url: str = Field()
39+
starred_url: str = Field()
40+
subscriptions_url: str = Field()
41+
organizations_url: str = Field()
42+
repos_url: str = Field()
43+
events_url: str = Field()
44+
received_events_url: str = Field()
45+
type: str = Field()
46+
site_admin: bool = Field()
47+
starred_at: Missing[str] = Field(default=UNSET)
48+
user_view_type: Missing[str] = Field(default=UNSET)
49+
50+
51+
model_rebuild(SimpleUser)
52+
53+
__all__ = ("SimpleUser",)
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
"""DO NOT EDIT THIS FILE!
2+
3+
This file is automatically @generated by githubkit using the follow command:
4+
5+
bash ./scripts/run-codegen.sh
6+
7+
See https://github.com/github/rest-api-description for more information.
8+
"""
9+
10+
from __future__ import annotations
11+
12+
import datetime as _dt
13+
from typing import Annotated, Literal, Union
14+
15+
from pydantic import Field
16+
17+
from githubkit.compat import GitHubModel, model_rebuild
18+
from githubkit.typing import Missing
19+
from githubkit.utils import UNSET
20+
21+
from .group_0001 import CvssSeverities
22+
from .group_0002 import SecurityAdvisoryEpss
23+
from .group_0005 import GlobalAdvisoryPropCreditsItems
24+
25+
26+
class GlobalAdvisory(GitHubModel):
27+
"""GlobalAdvisory
28+
29+
A GitHub Security Advisory.
30+
"""
31+
32+
ghsa_id: str = Field(description="The GitHub Security Advisory ID.")
33+
cve_id: Union[str, None] = Field(
34+
description="The Common Vulnerabilities and Exposures (CVE) ID."
35+
)
36+
url: str = Field(description="The API URL for the advisory.")
37+
html_url: str = Field(description="The URL for the advisory.")
38+
repository_advisory_url: Union[str, None] = Field(
39+
description="The API URL for the repository advisory."
40+
)
41+
summary: str = Field(
42+
max_length=1024, description="A short summary of the advisory."
43+
)
44+
description: Union[Annotated[str, Field(max_length=65535)], None] = Field(
45+
description="A detailed description of what the advisory entails."
46+
)
47+
type: Literal["reviewed", "unreviewed", "malware"] = Field(
48+
description="The type of advisory."
49+
)
50+
severity: Literal["critical", "high", "medium", "low", "unknown"] = Field(
51+
description="The severity of the advisory."
52+
)
53+
source_code_location: Union[str, None] = Field(
54+
description="The URL of the advisory's source code."
55+
)
56+
identifiers: Union[list[GlobalAdvisoryPropIdentifiersItems], None] = Field()
57+
references: Union[list[str], None] = Field()
58+
published_at: _dt.datetime = Field(
59+
description="The date and time of when the advisory was published, in ISO 8601 format."
60+
)
61+
updated_at: _dt.datetime = Field(
62+
description="The date and time of when the advisory was last updated, in ISO 8601 format."
63+
)
64+
github_reviewed_at: Union[_dt.datetime, None] = Field(
65+
description="The date and time of when the advisory was reviewed by GitHub, in ISO 8601 format."
66+
)
67+
nvd_published_at: Union[_dt.datetime, None] = Field(
68+
description="The date and time when the advisory was published in the National Vulnerability Database, in ISO 8601 format.\nThis field is only populated when the advisory is imported from the National Vulnerability Database."
69+
)
70+
withdrawn_at: Union[_dt.datetime, None] = Field(
71+
description="The date and time of when the advisory was withdrawn, in ISO 8601 format."
72+
)
73+
vulnerabilities: Union[list[Vulnerability], None] = Field(
74+
description="The products and respective version ranges affected by the advisory."
75+
)
76+
cvss_severities: Missing[Union[CvssSeverities, None]] = Field(default=UNSET)
77+
epss: Missing[Union[SecurityAdvisoryEpss, None]] = Field(
78+
default=UNSET,
79+
description="The EPSS scores as calculated by the [Exploit Prediction Scoring System](https://www.first.org/epss).",
80+
)
81+
cwes: Union[list[GlobalAdvisoryPropCwesItems], None] = Field()
82+
credits_: Union[list[GlobalAdvisoryPropCreditsItems], None] = Field(
83+
alias="credits", description="The users who contributed to the advisory."
84+
)
85+
86+
87+
class GlobalAdvisoryPropIdentifiersItems(GitHubModel):
88+
"""GlobalAdvisoryPropIdentifiersItems"""
89+
90+
type: Literal["CVE", "GHSA"] = Field(description="The type of identifier.")
91+
value: str = Field(description="The identifier value.")
92+
93+
94+
class GlobalAdvisoryPropCwesItems(GitHubModel):
95+
"""GlobalAdvisoryPropCwesItems"""
96+
97+
cwe_id: str = Field(description="The Common Weakness Enumeration (CWE) identifier.")
98+
name: str = Field(description="The name of the CWE.")
99+
100+
101+
class Vulnerability(GitHubModel):
102+
"""Vulnerability
103+
104+
A vulnerability describing the product and its affected versions within a GitHub
105+
Security Advisory.
106+
"""
107+
108+
package: Union[VulnerabilityPropPackage, None] = Field(
109+
description="The name of the package affected by the vulnerability."
110+
)
111+
vulnerable_version_range: Union[str, None] = Field(
112+
description="The range of the package versions affected by the vulnerability."
113+
)
114+
first_patched_version: Union[str, None] = Field(
115+
description="The package version that resolves the vulnerability."
116+
)
117+
vulnerable_functions: Union[list[str], None] = Field(
118+
description="The functions in the package that are affected by the vulnerability."
119+
)
120+
121+
122+
class VulnerabilityPropPackage(GitHubModel):
123+
"""VulnerabilityPropPackage
124+
125+
The name of the package affected by the vulnerability.
126+
"""
127+
128+
ecosystem: Literal[
129+
"rubygems",
130+
"npm",
131+
"pip",
132+
"maven",
133+
"nuget",
134+
"composer",
135+
"go",
136+
"rust",
137+
"erlang",
138+
"actions",
139+
"pub",
140+
"other",
141+
"swift",
142+
] = Field(description="The package's language or package management ecosystem.")
143+
name: Union[str, None] = Field(
144+
description="The unique package name within its ecosystem."
145+
)
146+
147+
148+
model_rebuild(GlobalAdvisory)
149+
model_rebuild(GlobalAdvisoryPropIdentifiersItems)
150+
model_rebuild(GlobalAdvisoryPropCwesItems)
151+
model_rebuild(Vulnerability)
152+
model_rebuild(VulnerabilityPropPackage)
153+
154+
__all__ = (
155+
"GlobalAdvisory",
156+
"GlobalAdvisoryPropCwesItems",
157+
"GlobalAdvisoryPropIdentifiersItems",
158+
"Vulnerability",
159+
"VulnerabilityPropPackage",
160+
)

0 commit comments

Comments
 (0)