GitHubKit 0.11.13__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_0088.py +0 -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 +84 -64
- 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 +1020 -766
- 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_0088.py +0 -1
- githubkit/versions/v2022_11_28/models/group_0060.py +0 -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 +84 -64
- 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 +1020 -766
- 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_0060.py +0 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/METADATA +2 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/RECORD +66 -66
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
|
@@ -172,19 +172,21 @@ class ChecksClient:
|
|
|
172
172
|
|
|
173
173
|
url = f"/repos/{owner}/{repo}/check-runs"
|
|
174
174
|
|
|
175
|
-
headers = {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
headers = {
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
178
|
+
**(headers or {}),
|
|
179
|
+
}
|
|
179
180
|
|
|
180
181
|
json = kwargs if data is UNSET else data
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
if self._github.config.rest_api_validate_body:
|
|
183
|
+
json = type_validate_python(
|
|
184
|
+
Union[
|
|
185
|
+
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
186
|
+
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
187
|
+
],
|
|
188
|
+
json,
|
|
189
|
+
)
|
|
188
190
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
189
191
|
|
|
190
192
|
return self._github.request(
|
|
@@ -300,19 +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
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
312
|
+
if self._github.config.rest_api_validate_body:
|
|
313
|
+
json = type_validate_python(
|
|
314
|
+
Union[
|
|
315
|
+
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
316
|
+
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
317
|
+
],
|
|
318
|
+
json,
|
|
319
|
+
)
|
|
316
320
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
317
321
|
|
|
318
322
|
return await self._github.arequest(
|
|
@@ -478,19 +482,21 @@ class ChecksClient:
|
|
|
478
482
|
|
|
479
483
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
480
484
|
|
|
481
|
-
headers = {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
+
headers = {
|
|
486
|
+
"Content-Type": "application/json",
|
|
487
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
488
|
+
**(headers or {}),
|
|
489
|
+
}
|
|
485
490
|
|
|
486
491
|
json = kwargs if data is UNSET else data
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
if self._github.config.rest_api_validate_body:
|
|
493
|
+
json = type_validate_python(
|
|
494
|
+
Union[
|
|
495
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
496
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
497
|
+
],
|
|
498
|
+
json,
|
|
499
|
+
)
|
|
494
500
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
495
501
|
|
|
496
502
|
return self._github.request(
|
|
@@ -610,19 +616,21 @@ class ChecksClient:
|
|
|
610
616
|
|
|
611
617
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
612
618
|
|
|
613
|
-
headers = {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
619
|
+
headers = {
|
|
620
|
+
"Content-Type": "application/json",
|
|
621
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
622
|
+
**(headers or {}),
|
|
623
|
+
}
|
|
617
624
|
|
|
618
625
|
json = kwargs if data is UNSET else data
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
+
if self._github.config.rest_api_validate_body:
|
|
627
|
+
json = type_validate_python(
|
|
628
|
+
Union[
|
|
629
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
630
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
631
|
+
],
|
|
632
|
+
json,
|
|
633
|
+
)
|
|
626
634
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
627
635
|
|
|
628
636
|
return await self._github.arequest(
|
|
@@ -791,13 +799,15 @@ class ChecksClient:
|
|
|
791
799
|
|
|
792
800
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
793
801
|
|
|
794
|
-
headers = {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
802
|
+
headers = {
|
|
803
|
+
"Content-Type": "application/json",
|
|
804
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
805
|
+
**(headers or {}),
|
|
806
|
+
}
|
|
798
807
|
|
|
799
808
|
json = kwargs if data is UNSET else data
|
|
800
|
-
|
|
809
|
+
if self._github.config.rest_api_validate_body:
|
|
810
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
801
811
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
802
812
|
|
|
803
813
|
return self._github.request(
|
|
@@ -844,13 +854,15 @@ class ChecksClient:
|
|
|
844
854
|
|
|
845
855
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
846
856
|
|
|
847
|
-
headers = {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
857
|
+
headers = {
|
|
858
|
+
"Content-Type": "application/json",
|
|
859
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
860
|
+
**(headers or {}),
|
|
861
|
+
}
|
|
851
862
|
|
|
852
863
|
json = kwargs if data is UNSET else data
|
|
853
|
-
|
|
864
|
+
if self._github.config.rest_api_validate_body:
|
|
865
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
854
866
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
855
867
|
|
|
856
868
|
return await self._github.arequest(
|
|
@@ -904,13 +916,17 @@ class ChecksClient:
|
|
|
904
916
|
|
|
905
917
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
906
918
|
|
|
907
|
-
headers = {
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
919
|
+
headers = {
|
|
920
|
+
"Content-Type": "application/json",
|
|
921
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
922
|
+
**(headers or {}),
|
|
923
|
+
}
|
|
911
924
|
|
|
912
925
|
json = kwargs if data is UNSET else data
|
|
913
|
-
|
|
926
|
+
if self._github.config.rest_api_validate_body:
|
|
927
|
+
json = type_validate_python(
|
|
928
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
929
|
+
)
|
|
914
930
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
915
931
|
|
|
916
932
|
return self._github.request(
|
|
@@ -964,13 +980,17 @@ class ChecksClient:
|
|
|
964
980
|
|
|
965
981
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
966
982
|
|
|
967
|
-
headers = {
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
983
|
+
headers = {
|
|
984
|
+
"Content-Type": "application/json",
|
|
985
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
986
|
+
**(headers or {}),
|
|
987
|
+
}
|
|
971
988
|
|
|
972
989
|
json = kwargs if data is UNSET else data
|
|
973
|
-
|
|
990
|
+
if self._github.config.rest_api_validate_body:
|
|
991
|
+
json = type_validate_python(
|
|
992
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
993
|
+
)
|
|
974
994
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
975
995
|
|
|
976
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(
|
|
@@ -204,13 +204,15 @@ class CodeSecurityClient:
|
|
|
204
204
|
|
|
205
205
|
url = f"/orgs/{org}/code-security/configurations"
|
|
206
206
|
|
|
207
|
-
headers = {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
headers = {
|
|
208
|
+
"Content-Type": "application/json",
|
|
209
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
210
|
+
**(headers or {}),
|
|
211
|
+
}
|
|
211
212
|
|
|
212
213
|
json = kwargs if data is UNSET else data
|
|
213
|
-
|
|
214
|
+
if self._github.config.rest_api_validate_body:
|
|
215
|
+
json = type_validate_python(OrgsOrgCodeSecurityConfigurationsPostBody, json)
|
|
214
216
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
215
217
|
|
|
216
218
|
return self._github.request(
|
|
@@ -287,13 +289,15 @@ class CodeSecurityClient:
|
|
|
287
289
|
|
|
288
290
|
url = f"/orgs/{org}/code-security/configurations"
|
|
289
291
|
|
|
290
|
-
headers = {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
headers = {
|
|
293
|
+
"Content-Type": "application/json",
|
|
294
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
295
|
+
**(headers or {}),
|
|
296
|
+
}
|
|
294
297
|
|
|
295
298
|
json = kwargs if data is UNSET else data
|
|
296
|
-
|
|
299
|
+
if self._github.config.rest_api_validate_body:
|
|
300
|
+
json = type_validate_python(OrgsOrgCodeSecurityConfigurationsPostBody, json)
|
|
297
301
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
298
302
|
|
|
299
303
|
return await self._github.arequest(
|
|
@@ -394,15 +398,17 @@ class CodeSecurityClient:
|
|
|
394
398
|
|
|
395
399
|
url = f"/orgs/{org}/code-security/configurations/detach"
|
|
396
400
|
|
|
397
|
-
headers = {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
+
headers = {
|
|
402
|
+
"Content-Type": "application/json",
|
|
403
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
404
|
+
**(headers or {}),
|
|
405
|
+
}
|
|
401
406
|
|
|
402
407
|
json = kwargs if data is UNSET else data
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
408
|
+
if self._github.config.rest_api_validate_body:
|
|
409
|
+
json = type_validate_python(
|
|
410
|
+
OrgsOrgCodeSecurityConfigurationsDetachDeleteBody, json
|
|
411
|
+
)
|
|
406
412
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
407
413
|
|
|
408
414
|
return self._github.request(
|
|
@@ -454,15 +460,17 @@ class CodeSecurityClient:
|
|
|
454
460
|
|
|
455
461
|
url = f"/orgs/{org}/code-security/configurations/detach"
|
|
456
462
|
|
|
457
|
-
headers = {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
463
|
+
headers = {
|
|
464
|
+
"Content-Type": "application/json",
|
|
465
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
466
|
+
**(headers or {}),
|
|
467
|
+
}
|
|
461
468
|
|
|
462
469
|
json = kwargs if data is UNSET else data
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
470
|
+
if self._github.config.rest_api_validate_body:
|
|
471
|
+
json = type_validate_python(
|
|
472
|
+
OrgsOrgCodeSecurityConfigurationsDetachDeleteBody, json
|
|
473
|
+
)
|
|
466
474
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
467
475
|
|
|
468
476
|
return await self._github.arequest(
|
|
@@ -655,15 +663,17 @@ class CodeSecurityClient:
|
|
|
655
663
|
|
|
656
664
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}"
|
|
657
665
|
|
|
658
|
-
headers = {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
666
|
+
headers = {
|
|
667
|
+
"Content-Type": "application/json",
|
|
668
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
669
|
+
**(headers or {}),
|
|
670
|
+
}
|
|
662
671
|
|
|
663
672
|
json = kwargs if data is UNSET else data
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
673
|
+
if self._github.config.rest_api_validate_body:
|
|
674
|
+
json = type_validate_python(
|
|
675
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdPatchBody, json
|
|
676
|
+
)
|
|
667
677
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
668
678
|
|
|
669
679
|
return self._github.request(
|
|
@@ -745,15 +755,17 @@ class CodeSecurityClient:
|
|
|
745
755
|
|
|
746
756
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}"
|
|
747
757
|
|
|
748
|
-
headers = {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
758
|
+
headers = {
|
|
759
|
+
"Content-Type": "application/json",
|
|
760
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
761
|
+
**(headers or {}),
|
|
762
|
+
}
|
|
752
763
|
|
|
753
764
|
json = kwargs if data is UNSET else data
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
765
|
+
if self._github.config.rest_api_validate_body:
|
|
766
|
+
json = type_validate_python(
|
|
767
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdPatchBody, json
|
|
768
|
+
)
|
|
757
769
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
758
770
|
|
|
759
771
|
return await self._github.arequest(
|
|
@@ -806,15 +818,17 @@ class CodeSecurityClient:
|
|
|
806
818
|
|
|
807
819
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}/attach"
|
|
808
820
|
|
|
809
|
-
headers = {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
821
|
+
headers = {
|
|
822
|
+
"Content-Type": "application/json",
|
|
823
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
824
|
+
**(headers or {}),
|
|
825
|
+
}
|
|
813
826
|
|
|
814
827
|
json = kwargs if data is UNSET else data
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
828
|
+
if self._github.config.rest_api_validate_body:
|
|
829
|
+
json = type_validate_python(
|
|
830
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdAttachPostBody, json
|
|
831
|
+
)
|
|
818
832
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
819
833
|
|
|
820
834
|
return self._github.request(
|
|
@@ -867,15 +881,17 @@ class CodeSecurityClient:
|
|
|
867
881
|
|
|
868
882
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}/attach"
|
|
869
883
|
|
|
870
|
-
headers = {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
884
|
+
headers = {
|
|
885
|
+
"Content-Type": "application/json",
|
|
886
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
887
|
+
**(headers or {}),
|
|
888
|
+
}
|
|
874
889
|
|
|
875
890
|
json = kwargs if data is UNSET else data
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
891
|
+
if self._github.config.rest_api_validate_body:
|
|
892
|
+
json = type_validate_python(
|
|
893
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdAttachPostBody, json
|
|
894
|
+
)
|
|
879
895
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
880
896
|
|
|
881
897
|
return await self._github.arequest(
|
|
@@ -936,15 +952,17 @@ class CodeSecurityClient:
|
|
|
936
952
|
|
|
937
953
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}/defaults"
|
|
938
954
|
|
|
939
|
-
headers = {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
955
|
+
headers = {
|
|
956
|
+
"Content-Type": "application/json",
|
|
957
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
958
|
+
**(headers or {}),
|
|
959
|
+
}
|
|
943
960
|
|
|
944
961
|
json = kwargs if data is UNSET else data
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
962
|
+
if self._github.config.rest_api_validate_body:
|
|
963
|
+
json = type_validate_python(
|
|
964
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdDefaultsPutBody, json
|
|
965
|
+
)
|
|
948
966
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
949
967
|
|
|
950
968
|
return self._github.request(
|
|
@@ -1009,15 +1027,17 @@ class CodeSecurityClient:
|
|
|
1009
1027
|
|
|
1010
1028
|
url = f"/orgs/{org}/code-security/configurations/{configuration_id}/defaults"
|
|
1011
1029
|
|
|
1012
|
-
headers = {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1030
|
+
headers = {
|
|
1031
|
+
"Content-Type": "application/json",
|
|
1032
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1033
|
+
**(headers or {}),
|
|
1034
|
+
}
|
|
1016
1035
|
|
|
1017
1036
|
json = kwargs if data is UNSET else data
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1037
|
+
if self._github.config.rest_api_validate_body:
|
|
1038
|
+
json = type_validate_python(
|
|
1039
|
+
OrgsOrgCodeSecurityConfigurationsConfigurationIdDefaultsPutBody, json
|
|
1040
|
+
)
|
|
1021
1041
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1022
1042
|
|
|
1023
1043
|
return await self._github.arequest(
|