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(
|
|
@@ -517,15 +517,17 @@ class CodeScanningClient:
|
|
|
517
517
|
|
|
518
518
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
519
519
|
|
|
520
|
-
headers = {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
headers = {
|
|
521
|
+
"Content-Type": "application/json",
|
|
522
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
523
|
+
**(headers or {}),
|
|
524
|
+
}
|
|
524
525
|
|
|
525
526
|
json = kwargs if data is UNSET else data
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
if self._github.config.rest_api_validate_body:
|
|
528
|
+
json = type_validate_python(
|
|
529
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
530
|
+
)
|
|
529
531
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
530
532
|
|
|
531
533
|
return self._github.request(
|
|
@@ -589,15 +591,17 @@ class CodeScanningClient:
|
|
|
589
591
|
|
|
590
592
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
591
593
|
|
|
592
|
-
headers = {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
headers = {
|
|
595
|
+
"Content-Type": "application/json",
|
|
596
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
597
|
+
**(headers or {}),
|
|
598
|
+
}
|
|
596
599
|
|
|
597
600
|
json = kwargs if data is UNSET else data
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
+
if self._github.config.rest_api_validate_body:
|
|
602
|
+
json = type_validate_python(
|
|
603
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
604
|
+
)
|
|
601
605
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
602
606
|
|
|
603
607
|
return await self._github.arequest(
|
|
@@ -1182,20 +1186,22 @@ class CodeScanningClient:
|
|
|
1182
1186
|
|
|
1183
1187
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1184
1188
|
|
|
1185
|
-
headers = {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
+
headers = {
|
|
1190
|
+
"Content-Type": "application/json",
|
|
1191
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1192
|
+
**(headers or {}),
|
|
1193
|
+
}
|
|
1189
1194
|
|
|
1190
1195
|
json = kwargs if data is UNSET else data
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1196
|
+
if self._github.config.rest_api_validate_body:
|
|
1197
|
+
json = type_validate_python(
|
|
1198
|
+
Union[
|
|
1199
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1200
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1201
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1202
|
+
],
|
|
1203
|
+
json,
|
|
1204
|
+
)
|
|
1199
1205
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1200
1206
|
|
|
1201
1207
|
return self._github.request(
|
|
@@ -1306,20 +1312,22 @@ class CodeScanningClient:
|
|
|
1306
1312
|
|
|
1307
1313
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1308
1314
|
|
|
1309
|
-
headers = {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1315
|
+
headers = {
|
|
1316
|
+
"Content-Type": "application/json",
|
|
1317
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1318
|
+
**(headers or {}),
|
|
1319
|
+
}
|
|
1313
1320
|
|
|
1314
1321
|
json = kwargs if data is UNSET else data
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1322
|
+
if self._github.config.rest_api_validate_body:
|
|
1323
|
+
json = type_validate_python(
|
|
1324
|
+
Union[
|
|
1325
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1326
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1327
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1328
|
+
],
|
|
1329
|
+
json,
|
|
1330
|
+
)
|
|
1323
1331
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1324
1332
|
|
|
1325
1333
|
return await self._github.arequest(
|
|
@@ -1581,13 +1589,15 @@ class CodeScanningClient:
|
|
|
1581
1589
|
|
|
1582
1590
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1583
1591
|
|
|
1584
|
-
headers = {
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1592
|
+
headers = {
|
|
1593
|
+
"Content-Type": "application/json",
|
|
1594
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1595
|
+
**(headers or {}),
|
|
1596
|
+
}
|
|
1588
1597
|
|
|
1589
1598
|
json = kwargs if data is UNSET else data
|
|
1590
|
-
|
|
1599
|
+
if self._github.config.rest_api_validate_body:
|
|
1600
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1591
1601
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1592
1602
|
|
|
1593
1603
|
return self._github.request(
|
|
@@ -1660,13 +1670,15 @@ class CodeScanningClient:
|
|
|
1660
1670
|
|
|
1661
1671
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1662
1672
|
|
|
1663
|
-
headers = {
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1673
|
+
headers = {
|
|
1674
|
+
"Content-Type": "application/json",
|
|
1675
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1676
|
+
**(headers or {}),
|
|
1677
|
+
}
|
|
1667
1678
|
|
|
1668
1679
|
json = kwargs if data is UNSET else data
|
|
1669
|
-
|
|
1680
|
+
if self._github.config.rest_api_validate_body:
|
|
1681
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1670
1682
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1671
1683
|
|
|
1672
1684
|
return await self._github.arequest(
|
|
@@ -1730,13 +1742,15 @@ class CodeScanningClient:
|
|
|
1730
1742
|
|
|
1731
1743
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1732
1744
|
|
|
1733
|
-
headers = {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1745
|
+
headers = {
|
|
1746
|
+
"Content-Type": "application/json",
|
|
1747
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1748
|
+
**(headers or {}),
|
|
1749
|
+
}
|
|
1737
1750
|
|
|
1738
1751
|
json = kwargs if data is UNSET else data
|
|
1739
|
-
|
|
1752
|
+
if self._github.config.rest_api_validate_body:
|
|
1753
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1740
1754
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1741
1755
|
|
|
1742
1756
|
return self._github.request(
|
|
@@ -1799,13 +1813,15 @@ class CodeScanningClient:
|
|
|
1799
1813
|
|
|
1800
1814
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1801
1815
|
|
|
1802
|
-
headers = {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1816
|
+
headers = {
|
|
1817
|
+
"Content-Type": "application/json",
|
|
1818
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1819
|
+
**(headers or {}),
|
|
1820
|
+
}
|
|
1806
1821
|
|
|
1807
1822
|
json = kwargs if data is UNSET else data
|
|
1808
|
-
|
|
1823
|
+
if self._github.config.rest_api_validate_body:
|
|
1824
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1809
1825
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1810
1826
|
|
|
1811
1827
|
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(
|