githubkit 0.12.4__py3-none-any.whl → 0.12.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- githubkit/auth/app.py +7 -7
- githubkit/auth/oauth.py +6 -3
- githubkit/config.py +3 -2
- githubkit/core.py +14 -14
- githubkit/github.py +4 -4
- githubkit/graphql/paginator.py +3 -2
- githubkit/rest/__init__.py +2 -2
- githubkit/typing.py +10 -8
- githubkit/versions/ghec_v2022_11_28/models/__init__.py +2 -2
- githubkit/versions/ghec_v2022_11_28/models/group_0061.py +1 -0
- githubkit/versions/ghec_v2022_11_28/models/group_0232.py +4 -4
- githubkit/versions/ghec_v2022_11_28/models/group_0518.py +13 -3
- githubkit/versions/ghec_v2022_11_28/models/group_0519.py +11 -1
- githubkit/versions/ghec_v2022_11_28/models/group_0520.py +5 -2
- githubkit/versions/ghec_v2022_11_28/models/group_0521.py +14 -2
- githubkit/versions/ghec_v2022_11_28/models/group_0522.py +13 -3
- githubkit/versions/ghec_v2022_11_28/models/group_0523.py +13 -3
- githubkit/versions/ghec_v2022_11_28/models/group_0540.py +6 -6
- githubkit/versions/ghec_v2022_11_28/models/group_0545.py +2 -2
- githubkit/versions/ghec_v2022_11_28/models/group_1188.py +1 -1
- githubkit/versions/ghec_v2022_11_28/rest/actions.py +443 -442
- githubkit/versions/ghec_v2022_11_28/rest/activity.py +81 -80
- githubkit/versions/ghec_v2022_11_28/rest/apps.py +103 -102
- githubkit/versions/ghec_v2022_11_28/rest/billing.py +41 -40
- githubkit/versions/ghec_v2022_11_28/rest/checks.py +45 -44
- githubkit/versions/ghec_v2022_11_28/rest/classroom.py +13 -12
- githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +69 -68
- githubkit/versions/ghec_v2022_11_28/rest/code_security.py +77 -76
- githubkit/versions/ghec_v2022_11_28/rest/codes_of_conduct.py +5 -4
- githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +151 -150
- githubkit/versions/ghec_v2022_11_28/rest/copilot.py +49 -48
- githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +61 -60
- githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +11 -10
- githubkit/versions/ghec_v2022_11_28/rest/emojis.py +3 -2
- githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +213 -212
- githubkit/versions/ghec_v2022_11_28/rest/gists.py +57 -56
- githubkit/versions/ghec_v2022_11_28/rest/git.py +51 -50
- githubkit/versions/ghec_v2022_11_28/rest/gitignore.py +5 -4
- githubkit/versions/ghec_v2022_11_28/rest/interactions.py +31 -30
- githubkit/versions/ghec_v2022_11_28/rest/issues.py +157 -156
- githubkit/versions/ghec_v2022_11_28/rest/licenses.py +7 -6
- githubkit/versions/ghec_v2022_11_28/rest/markdown.py +9 -8
- githubkit/versions/ghec_v2022_11_28/rest/meta.py +11 -10
- githubkit/versions/ghec_v2022_11_28/rest/migrations.py +69 -68
- githubkit/versions/ghec_v2022_11_28/rest/oidc.py +9 -8
- githubkit/versions/ghec_v2022_11_28/rest/orgs.py +303 -302
- githubkit/versions/ghec_v2022_11_28/rest/packages.py +55 -54
- githubkit/versions/ghec_v2022_11_28/rest/private_registries.py +21 -20
- githubkit/versions/ghec_v2022_11_28/rest/projects.py +97 -96
- githubkit/versions/ghec_v2022_11_28/rest/pulls.py +109 -108
- githubkit/versions/ghec_v2022_11_28/rest/rate_limit.py +3 -2
- githubkit/versions/ghec_v2022_11_28/rest/reactions.py +87 -86
- githubkit/versions/ghec_v2022_11_28/rest/repos.py +677 -670
- githubkit/versions/ghec_v2022_11_28/rest/scim.py +25 -24
- githubkit/versions/ghec_v2022_11_28/rest/search.py +15 -14
- githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +25 -24
- githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +33 -32
- githubkit/versions/ghec_v2022_11_28/rest/server_statistics.py +3 -2
- githubkit/versions/ghec_v2022_11_28/rest/teams.py +221 -220
- githubkit/versions/ghec_v2022_11_28/rest/users.py +129 -122
- githubkit/versions/ghec_v2022_11_28/types/__init__.py +2 -2
- githubkit/versions/ghec_v2022_11_28/types/group_0013.py +14 -14
- githubkit/versions/ghec_v2022_11_28/types/group_0041.py +5 -3
- githubkit/versions/ghec_v2022_11_28/types/group_0061.py +1 -0
- githubkit/versions/ghec_v2022_11_28/types/group_0135.py +4 -3
- githubkit/versions/ghec_v2022_11_28/types/group_0136.py +4 -3
- githubkit/versions/ghec_v2022_11_28/types/group_0137.py +5 -4
- githubkit/versions/ghec_v2022_11_28/types/group_0186.py +17 -12
- githubkit/versions/ghec_v2022_11_28/types/group_0187.py +17 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0193.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0227.py +5 -4
- githubkit/versions/ghec_v2022_11_28/types/group_0232.py +2 -2
- githubkit/versions/ghec_v2022_11_28/types/group_0299.py +7 -7
- githubkit/versions/ghec_v2022_11_28/types/group_0301.py +6 -5
- githubkit/versions/ghec_v2022_11_28/types/group_0302.py +7 -6
- githubkit/versions/ghec_v2022_11_28/types/group_0349.py +6 -6
- githubkit/versions/ghec_v2022_11_28/types/group_0447.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0476.py +43 -20
- githubkit/versions/ghec_v2022_11_28/types/group_0518.py +3 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0519.py +2 -0
- githubkit/versions/ghec_v2022_11_28/types/group_0521.py +3 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0522.py +3 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0523.py +3 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0540.py +7 -6
- githubkit/versions/ghec_v2022_11_28/types/group_0545.py +7 -4
- githubkit/versions/ghec_v2022_11_28/types/group_0635.py +10 -10
- githubkit/versions/ghec_v2022_11_28/types/group_0638.py +10 -10
- githubkit/versions/ghec_v2022_11_28/types/group_0671.py +8 -5
- githubkit/versions/ghec_v2022_11_28/types/group_0674.py +7 -6
- githubkit/versions/ghec_v2022_11_28/types/group_0677.py +7 -6
- githubkit/versions/ghec_v2022_11_28/types/group_0749.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0752.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0755.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0768.py +7 -7
- githubkit/versions/ghec_v2022_11_28/types/group_0821.py +10 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0822.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0823.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0824.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0825.py +10 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0827.py +5 -4
- githubkit/versions/ghec_v2022_11_28/types/group_0849.py +5 -4
- githubkit/versions/ghec_v2022_11_28/types/group_0885.py +8 -8
- githubkit/versions/ghec_v2022_11_28/types/group_0887.py +14 -13
- githubkit/versions/ghec_v2022_11_28/types/group_0922.py +14 -13
- githubkit/versions/ghec_v2022_11_28/types/group_0974.py +7 -7
- githubkit/versions/ghec_v2022_11_28/types/group_1034.py +10 -9
- githubkit/versions/ghec_v2022_11_28/types/group_1036.py +12 -7
- githubkit/versions/ghec_v2022_11_28/types/group_1038.py +14 -13
- githubkit/versions/ghec_v2022_11_28/types/group_1088.py +5 -4
- githubkit/versions/ghec_v2022_11_28/types/group_1091.py +8 -7
- githubkit/versions/ghec_v2022_11_28/webhooks/_namespace.py +89 -82
- githubkit/versions/latest/models.py +2 -2
- githubkit/versions/latest/types.py +2 -2
- githubkit/versions/v2022_11_28/models/__init__.py +2 -2
- githubkit/versions/v2022_11_28/models/group_0083.py +1 -0
- githubkit/versions/v2022_11_28/models/group_0195.py +4 -4
- githubkit/versions/v2022_11_28/models/group_0460.py +13 -3
- githubkit/versions/v2022_11_28/models/group_0461.py +11 -1
- githubkit/versions/v2022_11_28/models/group_0462.py +5 -2
- githubkit/versions/v2022_11_28/models/group_0463.py +14 -2
- githubkit/versions/v2022_11_28/models/group_0464.py +13 -3
- githubkit/versions/v2022_11_28/models/group_0465.py +13 -3
- githubkit/versions/v2022_11_28/models/group_0482.py +6 -6
- githubkit/versions/v2022_11_28/models/group_0487.py +2 -2
- githubkit/versions/v2022_11_28/models/group_1099.py +1 -1
- githubkit/versions/v2022_11_28/rest/actions.py +421 -420
- githubkit/versions/v2022_11_28/rest/activity.py +81 -80
- githubkit/versions/v2022_11_28/rest/apps.py +103 -102
- githubkit/versions/v2022_11_28/rest/billing.py +15 -14
- githubkit/versions/v2022_11_28/rest/checks.py +45 -44
- githubkit/versions/v2022_11_28/rest/classroom.py +13 -12
- githubkit/versions/v2022_11_28/rest/code_scanning.py +67 -66
- githubkit/versions/v2022_11_28/rest/code_security.py +77 -76
- githubkit/versions/v2022_11_28/rest/codes_of_conduct.py +5 -4
- githubkit/versions/v2022_11_28/rest/codespaces.py +151 -150
- githubkit/versions/v2022_11_28/rest/copilot.py +39 -38
- githubkit/versions/v2022_11_28/rest/dependabot.py +61 -60
- githubkit/versions/v2022_11_28/rest/dependency_graph.py +11 -10
- githubkit/versions/v2022_11_28/rest/emojis.py +3 -2
- githubkit/versions/v2022_11_28/rest/gists.py +57 -56
- githubkit/versions/v2022_11_28/rest/git.py +51 -50
- githubkit/versions/v2022_11_28/rest/gitignore.py +5 -4
- githubkit/versions/v2022_11_28/rest/interactions.py +31 -30
- githubkit/versions/v2022_11_28/rest/issues.py +157 -156
- githubkit/versions/v2022_11_28/rest/licenses.py +7 -6
- githubkit/versions/v2022_11_28/rest/markdown.py +9 -8
- githubkit/versions/v2022_11_28/rest/meta.py +11 -10
- githubkit/versions/v2022_11_28/rest/migrations.py +69 -68
- githubkit/versions/v2022_11_28/rest/oidc.py +9 -8
- githubkit/versions/v2022_11_28/rest/orgs.py +229 -228
- githubkit/versions/v2022_11_28/rest/packages.py +55 -54
- githubkit/versions/v2022_11_28/rest/private_registries.py +21 -20
- githubkit/versions/v2022_11_28/rest/projects.py +97 -96
- githubkit/versions/v2022_11_28/rest/pulls.py +109 -108
- githubkit/versions/v2022_11_28/rest/rate_limit.py +3 -2
- githubkit/versions/v2022_11_28/rest/reactions.py +87 -86
- githubkit/versions/v2022_11_28/rest/repos.py +653 -646
- githubkit/versions/v2022_11_28/rest/search.py +15 -14
- githubkit/versions/v2022_11_28/rest/secret_scanning.py +25 -24
- githubkit/versions/v2022_11_28/rest/security_advisories.py +33 -32
- githubkit/versions/v2022_11_28/rest/teams.py +189 -188
- githubkit/versions/v2022_11_28/rest/users.py +129 -122
- githubkit/versions/v2022_11_28/types/__init__.py +2 -2
- githubkit/versions/v2022_11_28/types/group_0013.py +14 -14
- githubkit/versions/v2022_11_28/types/group_0044.py +4 -3
- githubkit/versions/v2022_11_28/types/group_0045.py +4 -3
- githubkit/versions/v2022_11_28/types/group_0046.py +5 -4
- githubkit/versions/v2022_11_28/types/group_0083.py +1 -0
- githubkit/versions/v2022_11_28/types/group_0103.py +17 -12
- githubkit/versions/v2022_11_28/types/group_0104.py +17 -8
- githubkit/versions/v2022_11_28/types/group_0112.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0190.py +5 -4
- githubkit/versions/v2022_11_28/types/group_0195.py +2 -2
- githubkit/versions/v2022_11_28/types/group_0262.py +7 -7
- githubkit/versions/v2022_11_28/types/group_0264.py +6 -5
- githubkit/versions/v2022_11_28/types/group_0265.py +7 -6
- githubkit/versions/v2022_11_28/types/group_0312.py +6 -6
- githubkit/versions/v2022_11_28/types/group_0396.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0423.py +43 -20
- githubkit/versions/v2022_11_28/types/group_0460.py +3 -1
- githubkit/versions/v2022_11_28/types/group_0461.py +2 -0
- githubkit/versions/v2022_11_28/types/group_0463.py +3 -1
- githubkit/versions/v2022_11_28/types/group_0464.py +3 -1
- githubkit/versions/v2022_11_28/types/group_0465.py +3 -1
- githubkit/versions/v2022_11_28/types/group_0482.py +7 -6
- githubkit/versions/v2022_11_28/types/group_0487.py +7 -4
- githubkit/versions/v2022_11_28/types/group_0577.py +10 -10
- githubkit/versions/v2022_11_28/types/group_0580.py +10 -10
- githubkit/versions/v2022_11_28/types/group_0613.py +8 -5
- githubkit/versions/v2022_11_28/types/group_0616.py +7 -6
- githubkit/versions/v2022_11_28/types/group_0619.py +7 -6
- githubkit/versions/v2022_11_28/types/group_0691.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0694.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0697.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0710.py +7 -7
- githubkit/versions/v2022_11_28/types/group_0763.py +10 -8
- githubkit/versions/v2022_11_28/types/group_0764.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0765.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0766.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0767.py +10 -8
- githubkit/versions/v2022_11_28/types/group_0769.py +5 -4
- githubkit/versions/v2022_11_28/types/group_0791.py +5 -4
- githubkit/versions/v2022_11_28/types/group_0798.py +8 -8
- githubkit/versions/v2022_11_28/types/group_0800.py +14 -13
- githubkit/versions/v2022_11_28/types/group_0837.py +14 -13
- githubkit/versions/v2022_11_28/types/group_0887.py +7 -7
- githubkit/versions/v2022_11_28/types/group_0945.py +10 -9
- githubkit/versions/v2022_11_28/types/group_0947.py +12 -7
- githubkit/versions/v2022_11_28/types/group_0949.py +14 -13
- githubkit/versions/v2022_11_28/types/group_0999.py +5 -4
- githubkit/versions/v2022_11_28/types/group_1002.py +8 -7
- githubkit/versions/v2022_11_28/webhooks/_namespace.py +87 -80
- {githubkit-0.12.4.dist-info → githubkit-0.12.5.dist-info}/METADATA +2 -2
- {githubkit-0.12.4.dist-info → githubkit-0.12.5.dist-info}/RECORD +216 -216
- {githubkit-0.12.4.dist-info → githubkit-0.12.5.dist-info}/WHEEL +1 -1
- {githubkit-0.12.4.dist-info → githubkit-0.12.5.dist-info}/LICENSE +0 -0
githubkit/auth/app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import AsyncGenerator, Generator
|
|
1
|
+
from collections.abc import AsyncGenerator, Generator, Sequence
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from datetime import datetime, timedelta, timezone
|
|
4
4
|
from typing import TYPE_CHECKING, ClassVar, Optional, Union
|
|
@@ -35,8 +35,8 @@ class AppAuth(httpx.Auth):
|
|
|
35
35
|
client_id: Optional[str] = None
|
|
36
36
|
client_secret: Optional[str] = None
|
|
37
37
|
installation_id: Union[Unset, int] = UNSET
|
|
38
|
-
repositories: Union[Unset,
|
|
39
|
-
repository_ids: Union[Unset,
|
|
38
|
+
repositories: Union[Unset, Sequence[str]] = UNSET
|
|
39
|
+
repository_ids: Union[Unset, Sequence[int]] = UNSET
|
|
40
40
|
permissions: Union[Unset, "AppPermissionsType"] = UNSET
|
|
41
41
|
|
|
42
42
|
JWT_CACHE_KEY: ClassVar[LiteralString] = "githubkit:auth:app:{issuer}:jwt"
|
|
@@ -277,8 +277,8 @@ class AppAuthStrategy(BaseAuthStrategy):
|
|
|
277
277
|
def as_installation(
|
|
278
278
|
self,
|
|
279
279
|
installation_id: int,
|
|
280
|
-
repositories: Union[Unset,
|
|
281
|
-
repository_ids: Union[Unset,
|
|
280
|
+
repositories: Union[Unset, Sequence[str]] = UNSET,
|
|
281
|
+
repository_ids: Union[Unset, Sequence[int]] = UNSET,
|
|
282
282
|
permissions: Union[Unset, "AppPermissionsType"] = UNSET,
|
|
283
283
|
) -> "AppInstallationAuthStrategy":
|
|
284
284
|
return AppInstallationAuthStrategy(
|
|
@@ -318,8 +318,8 @@ class AppInstallationAuthStrategy(BaseAuthStrategy):
|
|
|
318
318
|
installation_id: int
|
|
319
319
|
client_id: Optional[str] = None
|
|
320
320
|
client_secret: Optional[str] = None
|
|
321
|
-
repositories: Union[Unset,
|
|
322
|
-
repository_ids: Union[Unset,
|
|
321
|
+
repositories: Union[Unset, Sequence[str]] = UNSET
|
|
322
|
+
repository_ids: Union[Unset, Sequence[int]] = UNSET
|
|
323
323
|
permissions: Union[Unset, "AppPermissionsType"] = UNSET
|
|
324
324
|
|
|
325
325
|
def __post_init__(self):
|
githubkit/auth/oauth.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import AsyncGenerator, Coroutine, Generator
|
|
1
|
+
from collections.abc import AsyncGenerator, Coroutine, Generator, Sequence
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
3
|
from datetime import datetime, timedelta, timezone
|
|
4
4
|
from time import sleep
|
|
@@ -29,7 +29,7 @@ if TYPE_CHECKING:
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def create_device_code(
|
|
32
|
-
github: "GitHubCore", client_id: str, scopes: Optional[
|
|
32
|
+
github: "GitHubCore", client_id: str, scopes: Optional[Sequence[str]] = None
|
|
33
33
|
) -> Generator[httpx.Request, httpx.Response, dict[str, Any]]:
|
|
34
34
|
"""Create a device code for OAuth."""
|
|
35
35
|
base_url = get_oauth_base_url(github.config.base_url)
|
|
@@ -567,7 +567,10 @@ class OAuthAppAuthStrategy(BaseAuthStrategy):
|
|
|
567
567
|
self, code: str, redirect_uri: Optional[str] = None
|
|
568
568
|
) -> "OAuthWebAuthStrategy":
|
|
569
569
|
return OAuthWebAuthStrategy(
|
|
570
|
-
self.client_id,
|
|
570
|
+
client_id=self.client_id,
|
|
571
|
+
client_secret=self.client_secret,
|
|
572
|
+
code=code,
|
|
573
|
+
redirect_uri=redirect_uri,
|
|
571
574
|
)
|
|
572
575
|
|
|
573
576
|
def get_auth_flow(self, github: "GitHubCore") -> httpx.Auth:
|
githubkit/config.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from collections.abc import Sequence
|
|
1
2
|
from dataclasses import dataclass, fields
|
|
2
3
|
from typing import Any, Optional, Union
|
|
3
4
|
from typing_extensions import Self
|
|
@@ -42,7 +43,7 @@ def build_base_url(base_url: Optional[Union[str, httpx.URL]]) -> httpx.URL:
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
def build_accept(
|
|
45
|
-
accept_format: Optional[str] = None, previews: Optional[
|
|
46
|
+
accept_format: Optional[str] = None, previews: Optional[Sequence[str]] = None
|
|
46
47
|
) -> str:
|
|
47
48
|
if accept_format:
|
|
48
49
|
accept_format = (
|
|
@@ -99,7 +100,7 @@ def get_config(
|
|
|
99
100
|
*,
|
|
100
101
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
101
102
|
accept_format: Optional[str] = None,
|
|
102
|
-
previews: Optional[
|
|
103
|
+
previews: Optional[Sequence[str]] = None,
|
|
103
104
|
user_agent: Optional[str] = None,
|
|
104
105
|
follow_redirects: bool = True,
|
|
105
106
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
githubkit/core.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import AsyncGenerator, Generator
|
|
1
|
+
from collections.abc import AsyncGenerator, Generator, Mapping, Sequence
|
|
2
2
|
from contextlib import asynccontextmanager, contextmanager
|
|
3
3
|
from contextvars import ContextVar
|
|
4
4
|
from datetime import datetime, timedelta, timezone
|
|
@@ -77,7 +77,7 @@ class GitHubCore(Generic[A]):
|
|
|
77
77
|
*,
|
|
78
78
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
79
79
|
accept_format: Optional[str] = None,
|
|
80
|
-
previews: Optional[
|
|
80
|
+
previews: Optional[Sequence[str]] = None,
|
|
81
81
|
user_agent: Optional[str] = None,
|
|
82
82
|
follow_redirects: bool = True,
|
|
83
83
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -96,7 +96,7 @@ class GitHubCore(Generic[A]):
|
|
|
96
96
|
*,
|
|
97
97
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
98
98
|
accept_format: Optional[str] = None,
|
|
99
|
-
previews: Optional[
|
|
99
|
+
previews: Optional[Sequence[str]] = None,
|
|
100
100
|
user_agent: Optional[str] = None,
|
|
101
101
|
follow_redirects: bool = True,
|
|
102
102
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -115,7 +115,7 @@ class GitHubCore(Generic[A]):
|
|
|
115
115
|
*,
|
|
116
116
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
117
117
|
accept_format: Optional[str] = None,
|
|
118
|
-
previews: Optional[
|
|
118
|
+
previews: Optional[Sequence[str]] = None,
|
|
119
119
|
user_agent: Optional[str] = None,
|
|
120
120
|
follow_redirects: bool = True,
|
|
121
121
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -133,7 +133,7 @@ class GitHubCore(Generic[A]):
|
|
|
133
133
|
config: Optional[Config] = None,
|
|
134
134
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
135
135
|
accept_format: Optional[str] = None,
|
|
136
|
-
previews: Optional[
|
|
136
|
+
previews: Optional[Sequence[str]] = None,
|
|
137
137
|
user_agent: Optional[str] = None,
|
|
138
138
|
follow_redirects: bool = True,
|
|
139
139
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -338,7 +338,7 @@ class GitHubCore(Generic[A]):
|
|
|
338
338
|
self,
|
|
339
339
|
response: httpx.Response,
|
|
340
340
|
response_model: type[T],
|
|
341
|
-
error_models: Optional[
|
|
341
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
342
342
|
) -> Response[T]: ...
|
|
343
343
|
|
|
344
344
|
@overload
|
|
@@ -346,14 +346,14 @@ class GitHubCore(Generic[A]):
|
|
|
346
346
|
self,
|
|
347
347
|
response: httpx.Response,
|
|
348
348
|
response_model: UnsetType = UNSET,
|
|
349
|
-
error_models: Optional[
|
|
349
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
350
350
|
) -> Response[Any]: ...
|
|
351
351
|
|
|
352
352
|
def _check(
|
|
353
353
|
self,
|
|
354
354
|
response: httpx.Response,
|
|
355
355
|
response_model: Union[type[T], UnsetType] = UNSET,
|
|
356
|
-
error_models: Optional[
|
|
356
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
357
357
|
) -> Union[Response[T], Response[Any]]:
|
|
358
358
|
if response.is_error:
|
|
359
359
|
error_models = error_models or {}
|
|
@@ -443,7 +443,7 @@ class GitHubCore(Generic[A]):
|
|
|
443
443
|
headers: Optional[HeaderTypes] = None,
|
|
444
444
|
cookies: Optional[CookieTypes] = None,
|
|
445
445
|
response_model: type[T],
|
|
446
|
-
error_models: Optional[
|
|
446
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
447
447
|
) -> Response[T]: ...
|
|
448
448
|
|
|
449
449
|
@overload
|
|
@@ -460,7 +460,7 @@ class GitHubCore(Generic[A]):
|
|
|
460
460
|
headers: Optional[HeaderTypes] = None,
|
|
461
461
|
cookies: Optional[CookieTypes] = None,
|
|
462
462
|
response_model: UnsetType = UNSET,
|
|
463
|
-
error_models: Optional[
|
|
463
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
464
464
|
) -> Response[Any]: ...
|
|
465
465
|
|
|
466
466
|
def request(
|
|
@@ -476,7 +476,7 @@ class GitHubCore(Generic[A]):
|
|
|
476
476
|
headers: Optional[HeaderTypes] = None,
|
|
477
477
|
cookies: Optional[CookieTypes] = None,
|
|
478
478
|
response_model: Union[type[T], UnsetType] = UNSET,
|
|
479
|
-
error_models: Optional[
|
|
479
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
480
480
|
) -> Union[Response[T], Response[Any]]:
|
|
481
481
|
"""Send a request.
|
|
482
482
|
|
|
@@ -525,7 +525,7 @@ class GitHubCore(Generic[A]):
|
|
|
525
525
|
headers: Optional[HeaderTypes] = None,
|
|
526
526
|
cookies: Optional[CookieTypes] = None,
|
|
527
527
|
response_model: type[T],
|
|
528
|
-
error_models: Optional[
|
|
528
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
529
529
|
) -> Response[T]: ...
|
|
530
530
|
|
|
531
531
|
@overload
|
|
@@ -542,7 +542,7 @@ class GitHubCore(Generic[A]):
|
|
|
542
542
|
headers: Optional[HeaderTypes] = None,
|
|
543
543
|
cookies: Optional[CookieTypes] = None,
|
|
544
544
|
response_model: UnsetType = UNSET,
|
|
545
|
-
error_models: Optional[
|
|
545
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
546
546
|
) -> Response[Any]: ...
|
|
547
547
|
|
|
548
548
|
async def arequest(
|
|
@@ -558,7 +558,7 @@ class GitHubCore(Generic[A]):
|
|
|
558
558
|
headers: Optional[HeaderTypes] = None,
|
|
559
559
|
cookies: Optional[CookieTypes] = None,
|
|
560
560
|
response_model: Union[type[T], UnsetType] = UNSET,
|
|
561
|
-
error_models: Optional[
|
|
561
|
+
error_models: Optional[Mapping[str, type]] = None,
|
|
562
562
|
) -> Union[Response[T], Response[Any]]:
|
|
563
563
|
"""Asynchronously send a request.
|
|
564
564
|
|
githubkit/github.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import Awaitable
|
|
1
|
+
from collections.abc import Awaitable, Sequence
|
|
2
2
|
from functools import cached_property
|
|
3
3
|
from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar, Union, overload
|
|
4
4
|
from typing_extensions import ParamSpec
|
|
@@ -70,7 +70,7 @@ class GitHub(GitHubCore[A]):
|
|
|
70
70
|
*,
|
|
71
71
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
72
72
|
accept_format: Optional[str] = None,
|
|
73
|
-
previews: Optional[
|
|
73
|
+
previews: Optional[Sequence[str]] = None,
|
|
74
74
|
user_agent: Optional[str] = None,
|
|
75
75
|
follow_redirects: bool = True,
|
|
76
76
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -89,7 +89,7 @@ class GitHub(GitHubCore[A]):
|
|
|
89
89
|
*,
|
|
90
90
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
91
91
|
accept_format: Optional[str] = None,
|
|
92
|
-
previews: Optional[
|
|
92
|
+
previews: Optional[Sequence[str]] = None,
|
|
93
93
|
user_agent: Optional[str] = None,
|
|
94
94
|
follow_redirects: bool = True,
|
|
95
95
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
|
@@ -108,7 +108,7 @@ class GitHub(GitHubCore[A]):
|
|
|
108
108
|
*,
|
|
109
109
|
base_url: Optional[Union[str, httpx.URL]] = None,
|
|
110
110
|
accept_format: Optional[str] = None,
|
|
111
|
-
previews: Optional[
|
|
111
|
+
previews: Optional[Sequence[str]] = None,
|
|
112
112
|
user_agent: Optional[str] = None,
|
|
113
113
|
follow_redirects: bool = True,
|
|
114
114
|
timeout: Optional[Union[float, httpx.Timeout]] = None,
|
githubkit/graphql/paginator.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
1
2
|
from typing import TYPE_CHECKING, Any, Optional, TypedDict
|
|
2
3
|
from typing_extensions import Self
|
|
3
4
|
from weakref import ref
|
|
@@ -30,13 +31,13 @@ class Paginator:
|
|
|
30
31
|
self,
|
|
31
32
|
graphql: "GraphQLNamespace",
|
|
32
33
|
query: str,
|
|
33
|
-
variables: Optional[
|
|
34
|
+
variables: Optional[Mapping[str, Any]] = None,
|
|
34
35
|
) -> None:
|
|
35
36
|
self._graphql_ref = ref(graphql)
|
|
36
37
|
self.query = query
|
|
37
38
|
|
|
38
39
|
self._has_next_page: bool = True
|
|
39
|
-
self._current_variables = variables
|
|
40
|
+
self._current_variables = dict(variables) if variables is not None else {}
|
|
40
41
|
|
|
41
42
|
@property
|
|
42
43
|
def _graphql(self) -> "GraphQLNamespace":
|
githubkit/rest/__init__.py
CHANGED
|
@@ -3750,7 +3750,7 @@ if TYPE_CHECKING:
|
|
|
3750
3750
|
WebhookDeploymentCreatedPropDeploymentPropCreator as WebhookDeploymentCreatedPropDeploymentPropCreator,
|
|
3751
3751
|
)
|
|
3752
3752
|
from githubkit.versions.v2022_11_28.models import (
|
|
3753
|
-
|
|
3753
|
+
WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1,
|
|
3754
3754
|
)
|
|
3755
3755
|
from githubkit.versions.v2022_11_28.models import (
|
|
3756
3756
|
WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp as WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp,
|
|
@@ -10673,7 +10673,7 @@ else:
|
|
|
10673
10673
|
"WebhookDeploymentCreated",
|
|
10674
10674
|
"WebhookDeploymentCreatedPropDeployment",
|
|
10675
10675
|
"WebhookDeploymentCreatedPropDeploymentPropCreator",
|
|
10676
|
-
"
|
|
10676
|
+
"WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1",
|
|
10677
10677
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp",
|
|
10678
10678
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner",
|
|
10679
10679
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropPermissions",
|
githubkit/typing.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import Hashable
|
|
1
|
+
from collections.abc import Hashable, Mapping, Sequence
|
|
2
2
|
from datetime import timedelta
|
|
3
3
|
from typing import (
|
|
4
4
|
IO,
|
|
@@ -27,8 +27,8 @@ URLTypes: TypeAlias = Union[httpx.URL, str]
|
|
|
27
27
|
PrimitiveData: TypeAlias = Optional[Union[str, int, float, bool]]
|
|
28
28
|
QueryParamTypes: TypeAlias = Union[
|
|
29
29
|
httpx.QueryParams,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]],
|
|
31
|
+
Sequence[tuple[str, PrimitiveData]],
|
|
32
32
|
tuple[tuple[str, PrimitiveData], ...],
|
|
33
33
|
str,
|
|
34
34
|
bytes,
|
|
@@ -36,10 +36,10 @@ QueryParamTypes: TypeAlias = Union[
|
|
|
36
36
|
|
|
37
37
|
HeaderTypes: TypeAlias = Union[
|
|
38
38
|
httpx.Headers,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
Mapping[str, str],
|
|
40
|
+
Mapping[bytes, bytes],
|
|
41
|
+
Sequence[tuple[str, str]],
|
|
42
|
+
Sequence[tuple[bytes, bytes]],
|
|
43
43
|
]
|
|
44
44
|
|
|
45
45
|
CookieTypes: TypeAlias = Union[httpx.Cookies, dict[str, str], list[tuple[str, str]]]
|
|
@@ -55,7 +55,9 @@ FileTypes: TypeAlias = Union[
|
|
|
55
55
|
# (filename, file (or bytes), content_type)
|
|
56
56
|
tuple[Optional[str], FileContent, Optional[str]],
|
|
57
57
|
]
|
|
58
|
-
RequestFiles: TypeAlias = Union[
|
|
58
|
+
RequestFiles: TypeAlias = Union[
|
|
59
|
+
Mapping[str, FileTypes], Sequence[tuple[str, FileTypes]]
|
|
60
|
+
]
|
|
59
61
|
|
|
60
62
|
if PYDANTIC_V2: # pragma: pydantic-v2
|
|
61
63
|
from pydantic import AfterValidator
|
|
@@ -2321,7 +2321,7 @@ if TYPE_CHECKING:
|
|
|
2321
2321
|
WebhookDeploymentCreatedPropDeploymentPropCreator as WebhookDeploymentCreatedPropDeploymentPropCreator,
|
|
2322
2322
|
)
|
|
2323
2323
|
from .group_0540 import (
|
|
2324
|
-
|
|
2324
|
+
WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1,
|
|
2325
2325
|
)
|
|
2326
2326
|
from .group_0540 import (
|
|
2327
2327
|
WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp as WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp,
|
|
@@ -10479,7 +10479,7 @@ else:
|
|
|
10479
10479
|
"WebhookDeploymentCreated",
|
|
10480
10480
|
"WebhookDeploymentCreatedPropDeployment",
|
|
10481
10481
|
"WebhookDeploymentCreatedPropDeploymentPropCreator",
|
|
10482
|
-
"
|
|
10482
|
+
"WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1",
|
|
10483
10483
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp",
|
|
10484
10484
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner",
|
|
10485
10485
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropPermissions",
|
|
@@ -73,6 +73,7 @@ class EnterpriseTeam(GitHubModel):
|
|
|
73
73
|
url: str = Field()
|
|
74
74
|
sync_to_organizations: str = Field()
|
|
75
75
|
group_id: Missing[Union[str, None]] = Field(default=UNSET)
|
|
76
|
+
group_name: Missing[Union[str, None]] = Field(default=UNSET)
|
|
76
77
|
html_url: str = Field()
|
|
77
78
|
members_url: str = Field()
|
|
78
79
|
created_at: datetime = Field()
|
|
@@ -15,16 +15,16 @@ from githubkit.compat import GitHubModel, model_rebuild
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class CheckAutomatedSecurityFixes(GitHubModel):
|
|
18
|
-
"""Check
|
|
18
|
+
"""Check Dependabot security updates
|
|
19
19
|
|
|
20
|
-
Check
|
|
20
|
+
Check Dependabot security updates
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
23
|
enabled: bool = Field(
|
|
24
|
-
description="Whether
|
|
24
|
+
description="Whether Dependabot security updates are enabled for the repository."
|
|
25
25
|
)
|
|
26
26
|
paused: bool = Field(
|
|
27
|
-
description="Whether
|
|
27
|
+
description="Whether Dependabot security updates are paused for the repository."
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
|
|
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Literal, Union
|
|
13
|
+
from typing import Annotated, Literal, Union
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertAppearedInBranchPropAlert(GitHubModel):
|
|
|
75
75
|
dismissed_by: Union[
|
|
76
76
|
WebhookCodeScanningAlertAppearedInBranchPropAlertPropDismissedBy, None
|
|
77
77
|
] = Field(title="User")
|
|
78
|
+
dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
|
|
79
|
+
Field(
|
|
80
|
+
default=UNSET,
|
|
81
|
+
description="The dismissal comment associated with the dismissal of the alert.",
|
|
82
|
+
)
|
|
83
|
+
)
|
|
78
84
|
dismissed_reason: Union[
|
|
79
85
|
None, Literal["false positive", "won't fix", "used in tests"]
|
|
80
86
|
] = Field(description="The reason for dismissing or closing the alert.")
|
|
87
|
+
fixed_at: Missing[None] = Field(
|
|
88
|
+
default=UNSET,
|
|
89
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
90
|
+
)
|
|
81
91
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
82
92
|
most_recent_instance: Missing[
|
|
83
93
|
Union[
|
|
@@ -87,8 +97,8 @@ class WebhookCodeScanningAlertAppearedInBranchPropAlert(GitHubModel):
|
|
|
87
97
|
] = Field(default=UNSET, title="Alert Instance")
|
|
88
98
|
number: int = Field(description="The code scanning alert number.")
|
|
89
99
|
rule: WebhookCodeScanningAlertAppearedInBranchPropAlertPropRule = Field()
|
|
90
|
-
state: Literal["open", "dismissed", "fixed"] = Field(
|
|
91
|
-
description="State of a code scanning alert."
|
|
100
|
+
state: Union[None, Literal["open", "dismissed", "fixed"]] = Field(
|
|
101
|
+
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."
|
|
92
102
|
)
|
|
93
103
|
tool: WebhookCodeScanningAlertAppearedInBranchPropAlertPropTool = Field()
|
|
94
104
|
url: str = Field()
|
|
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Literal, Union
|
|
13
|
+
from typing import Annotated, Literal, Union
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertClosedByUserPropAlert(GitHubModel):
|
|
|
75
75
|
dismissed_by: Union[
|
|
76
76
|
WebhookCodeScanningAlertClosedByUserPropAlertPropDismissedBy, None
|
|
77
77
|
] = Field(title="User")
|
|
78
|
+
dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
|
|
79
|
+
Field(
|
|
80
|
+
default=UNSET,
|
|
81
|
+
description="The dismissal comment associated with the dismissal of the alert.",
|
|
82
|
+
)
|
|
83
|
+
)
|
|
78
84
|
dismissed_reason: Union[
|
|
79
85
|
None, Literal["false positive", "won't fix", "used in tests"]
|
|
80
86
|
] = Field(description="The reason for dismissing or closing the alert.")
|
|
87
|
+
fixed_at: Missing[None] = Field(
|
|
88
|
+
default=UNSET,
|
|
89
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
90
|
+
)
|
|
81
91
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
82
92
|
most_recent_instance: Missing[
|
|
83
93
|
Union[WebhookCodeScanningAlertClosedByUserPropAlertPropMostRecentInstance, None]
|
|
@@ -82,7 +82,10 @@ class WebhookCodeScanningAlertCreatedPropAlert(GitHubModel):
|
|
|
82
82
|
dismissed_reason: None = Field(
|
|
83
83
|
description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
|
|
84
84
|
)
|
|
85
|
-
fixed_at: Missing[None] = Field(
|
|
85
|
+
fixed_at: Missing[None] = Field(
|
|
86
|
+
default=UNSET,
|
|
87
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
88
|
+
)
|
|
86
89
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
87
90
|
instances_url: Missing[str] = Field(default=UNSET)
|
|
88
91
|
most_recent_instance: Missing[
|
|
@@ -91,7 +94,7 @@ class WebhookCodeScanningAlertCreatedPropAlert(GitHubModel):
|
|
|
91
94
|
number: int = Field(description="The code scanning alert number.")
|
|
92
95
|
rule: WebhookCodeScanningAlertCreatedPropAlertPropRule = Field()
|
|
93
96
|
state: Union[None, Literal["open", "dismissed"]] = Field(
|
|
94
|
-
description="State of a code scanning alert."
|
|
97
|
+
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."
|
|
95
98
|
)
|
|
96
99
|
tool: Union[WebhookCodeScanningAlertCreatedPropAlertPropTool, None] = Field()
|
|
97
100
|
updated_at: Missing[Union[str, None]] = Field(default=UNSET)
|
|
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Literal, Union
|
|
13
|
+
from typing import Annotated, Literal, Union
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
|
|
|
75
75
|
dismissed_by: Union[WebhookCodeScanningAlertFixedPropAlertPropDismissedBy, None] = (
|
|
76
76
|
Field(title="User")
|
|
77
77
|
)
|
|
78
|
+
dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
|
|
79
|
+
Field(
|
|
80
|
+
default=UNSET,
|
|
81
|
+
description="The dismissal comment associated with the dismissal of the alert.",
|
|
82
|
+
)
|
|
83
|
+
)
|
|
78
84
|
dismissed_reason: Union[
|
|
79
85
|
None, Literal["false positive", "won't fix", "used in tests"]
|
|
80
86
|
] = Field(description="The reason for dismissing or closing the alert.")
|
|
87
|
+
fixed_at: Missing[None] = Field(
|
|
88
|
+
default=UNSET,
|
|
89
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
90
|
+
)
|
|
81
91
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
82
92
|
instances_url: Missing[str] = Field(default=UNSET)
|
|
83
93
|
most_recent_instance: Missing[
|
|
@@ -85,7 +95,9 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
|
|
|
85
95
|
] = Field(default=UNSET, title="Alert Instance")
|
|
86
96
|
number: int = Field(description="The code scanning alert number.")
|
|
87
97
|
rule: WebhookCodeScanningAlertFixedPropAlertPropRule = Field()
|
|
88
|
-
state: Literal["fixed"] = Field(
|
|
98
|
+
state: Union[None, Literal["fixed"]] = Field(
|
|
99
|
+
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."
|
|
100
|
+
)
|
|
89
101
|
tool: WebhookCodeScanningAlertFixedPropAlertPropTool = Field()
|
|
90
102
|
url: str = Field()
|
|
91
103
|
|
|
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Literal, Union
|
|
13
|
+
from typing import Annotated, Literal, Union
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
@@ -75,17 +75,27 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel):
|
|
|
75
75
|
dismissed_by: Union[
|
|
76
76
|
WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None
|
|
77
77
|
] = Field()
|
|
78
|
+
dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
|
|
79
|
+
Field(
|
|
80
|
+
default=UNSET,
|
|
81
|
+
description="The dismissal comment associated with the dismissal of the alert.",
|
|
82
|
+
)
|
|
83
|
+
)
|
|
78
84
|
dismissed_reason: Union[str, None] = Field(
|
|
79
85
|
description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
|
|
80
86
|
)
|
|
87
|
+
fixed_at: Missing[None] = Field(
|
|
88
|
+
default=UNSET,
|
|
89
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
90
|
+
)
|
|
81
91
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
82
92
|
most_recent_instance: Missing[
|
|
83
93
|
Union[WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance, None]
|
|
84
94
|
] = Field(default=UNSET, title="Alert Instance")
|
|
85
95
|
number: int = Field(description="The code scanning alert number.")
|
|
86
96
|
rule: WebhookCodeScanningAlertReopenedPropAlertPropRule = Field()
|
|
87
|
-
state: Literal["open", "dismissed", "fixed"] = Field(
|
|
88
|
-
description="State of a code scanning alert."
|
|
97
|
+
state: Union[None, Literal["open", "dismissed", "fixed"]] = Field(
|
|
98
|
+
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."
|
|
89
99
|
)
|
|
90
100
|
tool: WebhookCodeScanningAlertReopenedPropAlertPropTool = Field()
|
|
91
101
|
url: str = Field()
|
|
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from datetime import datetime
|
|
13
|
-
from typing import Literal, Union
|
|
13
|
+
from typing import Annotated, Literal, Union
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
@@ -73,9 +73,19 @@ class WebhookCodeScanningAlertReopenedByUserPropAlert(GitHubModel):
|
|
|
73
73
|
description="The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."
|
|
74
74
|
)
|
|
75
75
|
dismissed_by: None = Field()
|
|
76
|
+
dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
|
|
77
|
+
Field(
|
|
78
|
+
default=UNSET,
|
|
79
|
+
description="The dismissal comment associated with the dismissal of the alert.",
|
|
80
|
+
)
|
|
81
|
+
)
|
|
76
82
|
dismissed_reason: None = Field(
|
|
77
83
|
description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
|
|
78
84
|
)
|
|
85
|
+
fixed_at: Missing[None] = Field(
|
|
86
|
+
default=UNSET,
|
|
87
|
+
description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
|
|
88
|
+
)
|
|
79
89
|
html_url: str = Field(description="The GitHub URL of the alert resource.")
|
|
80
90
|
most_recent_instance: Missing[
|
|
81
91
|
Union[
|
|
@@ -84,8 +94,8 @@ class WebhookCodeScanningAlertReopenedByUserPropAlert(GitHubModel):
|
|
|
84
94
|
] = Field(default=UNSET, title="Alert Instance")
|
|
85
95
|
number: int = Field(description="The code scanning alert number.")
|
|
86
96
|
rule: WebhookCodeScanningAlertReopenedByUserPropAlertPropRule = Field()
|
|
87
|
-
state: Literal["open", "fixed"] = Field(
|
|
88
|
-
description="State of a code scanning alert."
|
|
97
|
+
state: Union[None, Literal["open", "fixed"]] = Field(
|
|
98
|
+
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."
|
|
89
99
|
)
|
|
90
100
|
tool: WebhookCodeScanningAlertReopenedByUserPropAlertPropTool = Field()
|
|
91
101
|
url: str = Field()
|
|
@@ -14,7 +14,7 @@ from typing import Literal, Union
|
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
17
|
-
from githubkit.compat import GitHubModel, model_rebuild
|
|
17
|
+
from githubkit.compat import ExtraGitHubModel, GitHubModel, model_rebuild
|
|
18
18
|
from githubkit.typing import Missing
|
|
19
19
|
from githubkit.utils import UNSET
|
|
20
20
|
|
|
@@ -76,7 +76,7 @@ class WebhookDeploymentCreatedPropDeployment(GitHubModel):
|
|
|
76
76
|
id: int = Field()
|
|
77
77
|
node_id: str = Field()
|
|
78
78
|
original_environment: str = Field()
|
|
79
|
-
payload: Union[
|
|
79
|
+
payload: Union[str, WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1] = (
|
|
80
80
|
Field()
|
|
81
81
|
)
|
|
82
82
|
performed_via_github_app: Missing[
|
|
@@ -124,8 +124,8 @@ class WebhookDeploymentCreatedPropDeploymentPropCreator(GitHubModel):
|
|
|
124
124
|
user_view_type: Missing[str] = Field(default=UNSET)
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
class
|
|
128
|
-
"""
|
|
127
|
+
class WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1(ExtraGitHubModel):
|
|
128
|
+
"""WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1"""
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
class WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp(GitHubModel):
|
|
@@ -572,7 +572,7 @@ class WebhookDeploymentCreatedPropWorkflowRunPropPullRequestsItemsPropHeadPropRe
|
|
|
572
572
|
model_rebuild(WebhookDeploymentCreated)
|
|
573
573
|
model_rebuild(WebhookDeploymentCreatedPropDeployment)
|
|
574
574
|
model_rebuild(WebhookDeploymentCreatedPropDeploymentPropCreator)
|
|
575
|
-
model_rebuild(
|
|
575
|
+
model_rebuild(WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1)
|
|
576
576
|
model_rebuild(WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp)
|
|
577
577
|
model_rebuild(WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner)
|
|
578
578
|
model_rebuild(
|
|
@@ -600,7 +600,7 @@ __all__ = (
|
|
|
600
600
|
"WebhookDeploymentCreated",
|
|
601
601
|
"WebhookDeploymentCreatedPropDeployment",
|
|
602
602
|
"WebhookDeploymentCreatedPropDeploymentPropCreator",
|
|
603
|
-
"
|
|
603
|
+
"WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1",
|
|
604
604
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp",
|
|
605
605
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner",
|
|
606
606
|
"WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropPermissions",
|
|
@@ -14,7 +14,7 @@ from typing import Literal, Union
|
|
|
14
14
|
|
|
15
15
|
from pydantic import Field
|
|
16
16
|
|
|
17
|
-
from githubkit.compat import GitHubModel, model_rebuild
|
|
17
|
+
from githubkit.compat import ExtraGitHubModel, GitHubModel, model_rebuild
|
|
18
18
|
from githubkit.typing import Missing
|
|
19
19
|
from githubkit.utils import UNSET
|
|
20
20
|
|
|
@@ -167,7 +167,7 @@ class WebhookDeploymentStatusCreatedPropDeploymentPropCreator(GitHubModel):
|
|
|
167
167
|
user_view_type: Missing[str] = Field(default=UNSET)
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
class WebhookDeploymentStatusCreatedPropDeploymentPropPayloadOneof1(
|
|
170
|
+
class WebhookDeploymentStatusCreatedPropDeploymentPropPayloadOneof1(ExtraGitHubModel):
|
|
171
171
|
"""WebhookDeploymentStatusCreatedPropDeploymentPropPayloadOneof1"""
|
|
172
172
|
|
|
173
173
|
|