GitHubKit 0.11.12__py3-none-any.whl → 0.11.14__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.
Potentially problematic release.
This version of GitHubKit might be problematic. Click here for more details.
- githubkit/config.py +3 -0
- githubkit/core.py +5 -0
- githubkit/github.py +3 -0
- githubkit/versions/ghec_v2022_11_28/models/group_0051.py +5 -1
- githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
- githubkit/versions/ghec_v2022_11_28/models/group_0098.py +4 -0
- githubkit/versions/ghec_v2022_11_28/models/group_1010.py +3 -1
- githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
- githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
- githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
- githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
- githubkit/versions/ghec_v2022_11_28/rest/checks.py +83 -66
- githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
- githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
- githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
- githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
- githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
- githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
- githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
- githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
- githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
- githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
- githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
- githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
- githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
- githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
- githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
- githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
- githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
- githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
- githubkit/versions/ghec_v2022_11_28/rest/repos.py +1035 -800
- githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
- githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
- githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
- githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
- githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
- githubkit/versions/ghec_v2022_11_28/types/group_0051.py +2 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0098.py +1 -0
- githubkit/versions/ghec_v2022_11_28/types/group_1010.py +3 -1
- githubkit/versions/v2022_11_28/models/group_0030.py +5 -1
- githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
- githubkit/versions/v2022_11_28/models/group_0082.py +4 -0
- githubkit/versions/v2022_11_28/models/group_0936.py +3 -1
- githubkit/versions/v2022_11_28/rest/actions.py +534 -386
- githubkit/versions/v2022_11_28/rest/activity.py +60 -44
- githubkit/versions/v2022_11_28/rest/apps.py +102 -74
- githubkit/versions/v2022_11_28/rest/checks.py +83 -66
- githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
- githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
- githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
- githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
- githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
- githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
- githubkit/versions/v2022_11_28/rest/gists.py +56 -40
- githubkit/versions/v2022_11_28/rest/git.py +84 -60
- githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
- githubkit/versions/v2022_11_28/rest/issues.py +250 -198
- githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
- githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
- githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
- githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
- githubkit/versions/v2022_11_28/rest/projects.py +170 -126
- githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
- githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
- githubkit/versions/v2022_11_28/rest/repos.py +1035 -800
- githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
- githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
- githubkit/versions/v2022_11_28/rest/teams.py +274 -204
- githubkit/versions/v2022_11_28/rest/users.py +154 -118
- githubkit/versions/v2022_11_28/types/group_0030.py +2 -1
- githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
- githubkit/versions/v2022_11_28/types/group_0082.py +1 -0
- githubkit/versions/v2022_11_28/types/group_0936.py +3 -1
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/METADATA +3 -2
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/RECORD +78 -78
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
|
@@ -10,10 +10,9 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from weakref import ref
|
|
13
|
-
from typing_extensions import Annotated
|
|
14
13
|
from typing import TYPE_CHECKING, Dict, Literal, Optional, overload
|
|
15
14
|
|
|
16
|
-
from pydantic import
|
|
15
|
+
from pydantic import BaseModel
|
|
17
16
|
|
|
18
17
|
from githubkit.typing import Missing, UnsetType
|
|
19
18
|
from githubkit.utils import UNSET, exclude_unset
|
|
@@ -124,7 +123,9 @@ class ChecksClient:
|
|
|
124
123
|
head_sha: str,
|
|
125
124
|
details_url: Missing[str] = UNSET,
|
|
126
125
|
external_id: Missing[str] = UNSET,
|
|
127
|
-
status: Missing[
|
|
126
|
+
status: Missing[
|
|
127
|
+
Literal["queued", "in_progress", "waiting", "requested", "pending"]
|
|
128
|
+
] = UNSET,
|
|
128
129
|
started_at: Missing[datetime] = UNSET,
|
|
129
130
|
conclusion: Missing[
|
|
130
131
|
Literal[
|
|
@@ -171,22 +172,21 @@ class ChecksClient:
|
|
|
171
172
|
|
|
172
173
|
url = f"/repos/{owner}/{repo}/check-runs"
|
|
173
174
|
|
|
174
|
-
headers = {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
headers = {
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
178
|
+
**(headers or {}),
|
|
179
|
+
}
|
|
178
180
|
|
|
179
181
|
json = kwargs if data is UNSET else data
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
if self._github.config.rest_api_validate_body:
|
|
183
|
+
json = type_validate_python(
|
|
182
184
|
Union[
|
|
183
185
|
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
184
186
|
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
185
187
|
],
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
json,
|
|
189
|
-
)
|
|
188
|
+
json,
|
|
189
|
+
)
|
|
190
190
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
191
191
|
|
|
192
192
|
return self._github.request(
|
|
@@ -253,7 +253,9 @@ class ChecksClient:
|
|
|
253
253
|
head_sha: str,
|
|
254
254
|
details_url: Missing[str] = UNSET,
|
|
255
255
|
external_id: Missing[str] = UNSET,
|
|
256
|
-
status: Missing[
|
|
256
|
+
status: Missing[
|
|
257
|
+
Literal["queued", "in_progress", "waiting", "requested", "pending"]
|
|
258
|
+
] = UNSET,
|
|
257
259
|
started_at: Missing[datetime] = UNSET,
|
|
258
260
|
conclusion: Missing[
|
|
259
261
|
Literal[
|
|
@@ -300,22 +302,21 @@ class ChecksClient:
|
|
|
300
302
|
|
|
301
303
|
url = f"/repos/{owner}/{repo}/check-runs"
|
|
302
304
|
|
|
303
|
-
headers = {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
headers = {
|
|
306
|
+
"Content-Type": "application/json",
|
|
307
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
308
|
+
**(headers or {}),
|
|
309
|
+
}
|
|
307
310
|
|
|
308
311
|
json = kwargs if data is UNSET else data
|
|
309
|
-
|
|
310
|
-
|
|
312
|
+
if self._github.config.rest_api_validate_body:
|
|
313
|
+
json = type_validate_python(
|
|
311
314
|
Union[
|
|
312
315
|
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
313
316
|
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
314
317
|
],
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
json,
|
|
318
|
-
)
|
|
318
|
+
json,
|
|
319
|
+
)
|
|
319
320
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
320
321
|
|
|
321
322
|
return await self._github.arequest(
|
|
@@ -481,19 +482,21 @@ class ChecksClient:
|
|
|
481
482
|
|
|
482
483
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
483
484
|
|
|
484
|
-
headers = {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
headers = {
|
|
486
|
+
"Content-Type": "application/json",
|
|
487
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
488
|
+
**(headers or {}),
|
|
489
|
+
}
|
|
488
490
|
|
|
489
491
|
json = kwargs if data is UNSET else data
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
if self._github.config.rest_api_validate_body:
|
|
493
|
+
json = type_validate_python(
|
|
494
|
+
Union[
|
|
495
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
496
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
497
|
+
],
|
|
498
|
+
json,
|
|
499
|
+
)
|
|
497
500
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
498
501
|
|
|
499
502
|
return self._github.request(
|
|
@@ -613,19 +616,21 @@ class ChecksClient:
|
|
|
613
616
|
|
|
614
617
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
615
618
|
|
|
616
|
-
headers = {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
619
|
+
headers = {
|
|
620
|
+
"Content-Type": "application/json",
|
|
621
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
622
|
+
**(headers or {}),
|
|
623
|
+
}
|
|
620
624
|
|
|
621
625
|
json = kwargs if data is UNSET else data
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
626
|
+
if self._github.config.rest_api_validate_body:
|
|
627
|
+
json = type_validate_python(
|
|
628
|
+
Union[
|
|
629
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
630
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
631
|
+
],
|
|
632
|
+
json,
|
|
633
|
+
)
|
|
629
634
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
630
635
|
|
|
631
636
|
return await self._github.arequest(
|
|
@@ -794,13 +799,15 @@ class ChecksClient:
|
|
|
794
799
|
|
|
795
800
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
796
801
|
|
|
797
|
-
headers = {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
802
|
+
headers = {
|
|
803
|
+
"Content-Type": "application/json",
|
|
804
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
805
|
+
**(headers or {}),
|
|
806
|
+
}
|
|
801
807
|
|
|
802
808
|
json = kwargs if data is UNSET else data
|
|
803
|
-
|
|
809
|
+
if self._github.config.rest_api_validate_body:
|
|
810
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
804
811
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
805
812
|
|
|
806
813
|
return self._github.request(
|
|
@@ -847,13 +854,15 @@ class ChecksClient:
|
|
|
847
854
|
|
|
848
855
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
849
856
|
|
|
850
|
-
headers = {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
857
|
+
headers = {
|
|
858
|
+
"Content-Type": "application/json",
|
|
859
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
860
|
+
**(headers or {}),
|
|
861
|
+
}
|
|
854
862
|
|
|
855
863
|
json = kwargs if data is UNSET else data
|
|
856
|
-
|
|
864
|
+
if self._github.config.rest_api_validate_body:
|
|
865
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
857
866
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
858
867
|
|
|
859
868
|
return await self._github.arequest(
|
|
@@ -907,13 +916,17 @@ class ChecksClient:
|
|
|
907
916
|
|
|
908
917
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
909
918
|
|
|
910
|
-
headers = {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
919
|
+
headers = {
|
|
920
|
+
"Content-Type": "application/json",
|
|
921
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
922
|
+
**(headers or {}),
|
|
923
|
+
}
|
|
914
924
|
|
|
915
925
|
json = kwargs if data is UNSET else data
|
|
916
|
-
|
|
926
|
+
if self._github.config.rest_api_validate_body:
|
|
927
|
+
json = type_validate_python(
|
|
928
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
929
|
+
)
|
|
917
930
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
918
931
|
|
|
919
932
|
return self._github.request(
|
|
@@ -967,13 +980,17 @@ class ChecksClient:
|
|
|
967
980
|
|
|
968
981
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
969
982
|
|
|
970
|
-
headers = {
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
983
|
+
headers = {
|
|
984
|
+
"Content-Type": "application/json",
|
|
985
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
986
|
+
**(headers or {}),
|
|
987
|
+
}
|
|
974
988
|
|
|
975
989
|
json = kwargs if data is UNSET else data
|
|
976
|
-
|
|
990
|
+
if self._github.config.rest_api_validate_body:
|
|
991
|
+
json = type_validate_python(
|
|
992
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
993
|
+
)
|
|
977
994
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
978
995
|
|
|
979
996
|
return await self._github.arequest(
|
|
@@ -411,15 +411,17 @@ class CodeScanningClient:
|
|
|
411
411
|
|
|
412
412
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
413
413
|
|
|
414
|
-
headers = {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
414
|
+
headers = {
|
|
415
|
+
"Content-Type": "application/json",
|
|
416
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
417
|
+
**(headers or {}),
|
|
418
|
+
}
|
|
418
419
|
|
|
419
420
|
json = kwargs if data is UNSET else data
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
if self._github.config.rest_api_validate_body:
|
|
422
|
+
json = type_validate_python(
|
|
423
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
424
|
+
)
|
|
423
425
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
424
426
|
|
|
425
427
|
return self._github.request(
|
|
@@ -483,15 +485,17 @@ class CodeScanningClient:
|
|
|
483
485
|
|
|
484
486
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
485
487
|
|
|
486
|
-
headers = {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
headers = {
|
|
489
|
+
"Content-Type": "application/json",
|
|
490
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
491
|
+
**(headers or {}),
|
|
492
|
+
}
|
|
490
493
|
|
|
491
494
|
json = kwargs if data is UNSET else data
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
+
if self._github.config.rest_api_validate_body:
|
|
496
|
+
json = type_validate_python(
|
|
497
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
498
|
+
)
|
|
495
499
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
496
500
|
|
|
497
501
|
return await self._github.arequest(
|
|
@@ -1076,20 +1080,22 @@ class CodeScanningClient:
|
|
|
1076
1080
|
|
|
1077
1081
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1078
1082
|
|
|
1079
|
-
headers = {
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
+
headers = {
|
|
1084
|
+
"Content-Type": "application/json",
|
|
1085
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1086
|
+
**(headers or {}),
|
|
1087
|
+
}
|
|
1083
1088
|
|
|
1084
1089
|
json = kwargs if data is UNSET else data
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1090
|
+
if self._github.config.rest_api_validate_body:
|
|
1091
|
+
json = type_validate_python(
|
|
1092
|
+
Union[
|
|
1093
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1094
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1095
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1096
|
+
],
|
|
1097
|
+
json,
|
|
1098
|
+
)
|
|
1093
1099
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1094
1100
|
|
|
1095
1101
|
return self._github.request(
|
|
@@ -1200,20 +1206,22 @@ class CodeScanningClient:
|
|
|
1200
1206
|
|
|
1201
1207
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1202
1208
|
|
|
1203
|
-
headers = {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1209
|
+
headers = {
|
|
1210
|
+
"Content-Type": "application/json",
|
|
1211
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1212
|
+
**(headers or {}),
|
|
1213
|
+
}
|
|
1207
1214
|
|
|
1208
1215
|
json = kwargs if data is UNSET else data
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1216
|
+
if self._github.config.rest_api_validate_body:
|
|
1217
|
+
json = type_validate_python(
|
|
1218
|
+
Union[
|
|
1219
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1220
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1221
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1222
|
+
],
|
|
1223
|
+
json,
|
|
1224
|
+
)
|
|
1217
1225
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1218
1226
|
|
|
1219
1227
|
return await self._github.arequest(
|
|
@@ -1475,13 +1483,15 @@ class CodeScanningClient:
|
|
|
1475
1483
|
|
|
1476
1484
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1477
1485
|
|
|
1478
|
-
headers = {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1486
|
+
headers = {
|
|
1487
|
+
"Content-Type": "application/json",
|
|
1488
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1489
|
+
**(headers or {}),
|
|
1490
|
+
}
|
|
1482
1491
|
|
|
1483
1492
|
json = kwargs if data is UNSET else data
|
|
1484
|
-
|
|
1493
|
+
if self._github.config.rest_api_validate_body:
|
|
1494
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1485
1495
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1486
1496
|
|
|
1487
1497
|
return self._github.request(
|
|
@@ -1554,13 +1564,15 @@ class CodeScanningClient:
|
|
|
1554
1564
|
|
|
1555
1565
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1556
1566
|
|
|
1557
|
-
headers = {
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1567
|
+
headers = {
|
|
1568
|
+
"Content-Type": "application/json",
|
|
1569
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1570
|
+
**(headers or {}),
|
|
1571
|
+
}
|
|
1561
1572
|
|
|
1562
1573
|
json = kwargs if data is UNSET else data
|
|
1563
|
-
|
|
1574
|
+
if self._github.config.rest_api_validate_body:
|
|
1575
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1564
1576
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1565
1577
|
|
|
1566
1578
|
return await self._github.arequest(
|
|
@@ -1624,13 +1636,15 @@ class CodeScanningClient:
|
|
|
1624
1636
|
|
|
1625
1637
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1626
1638
|
|
|
1627
|
-
headers = {
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1639
|
+
headers = {
|
|
1640
|
+
"Content-Type": "application/json",
|
|
1641
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1642
|
+
**(headers or {}),
|
|
1643
|
+
}
|
|
1631
1644
|
|
|
1632
1645
|
json = kwargs if data is UNSET else data
|
|
1633
|
-
|
|
1646
|
+
if self._github.config.rest_api_validate_body:
|
|
1647
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1634
1648
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1635
1649
|
|
|
1636
1650
|
return self._github.request(
|
|
@@ -1693,13 +1707,15 @@ class CodeScanningClient:
|
|
|
1693
1707
|
|
|
1694
1708
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1695
1709
|
|
|
1696
|
-
headers = {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1710
|
+
headers = {
|
|
1711
|
+
"Content-Type": "application/json",
|
|
1712
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1713
|
+
**(headers or {}),
|
|
1714
|
+
}
|
|
1700
1715
|
|
|
1701
1716
|
json = kwargs if data is UNSET else data
|
|
1702
|
-
|
|
1717
|
+
if self._github.config.rest_api_validate_body:
|
|
1718
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1703
1719
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1704
1720
|
|
|
1705
1721
|
return await self._github.arequest(
|