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
|
@@ -463,13 +463,17 @@ class CopilotClient:
|
|
|
463
463
|
|
|
464
464
|
url = f"/orgs/{org}/copilot/billing/selected_teams"
|
|
465
465
|
|
|
466
|
-
headers = {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
466
|
+
headers = {
|
|
467
|
+
"Content-Type": "application/json",
|
|
468
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
469
|
+
**(headers or {}),
|
|
470
|
+
}
|
|
470
471
|
|
|
471
472
|
json = kwargs if data is UNSET else data
|
|
472
|
-
|
|
473
|
+
if self._github.config.rest_api_validate_body:
|
|
474
|
+
json = type_validate_python(
|
|
475
|
+
OrgsOrgCopilotBillingSelectedTeamsPostBody, json
|
|
476
|
+
)
|
|
473
477
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
474
478
|
|
|
475
479
|
return self._github.request(
|
|
@@ -523,13 +527,17 @@ class CopilotClient:
|
|
|
523
527
|
|
|
524
528
|
url = f"/orgs/{org}/copilot/billing/selected_teams"
|
|
525
529
|
|
|
526
|
-
headers = {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
+
headers = {
|
|
531
|
+
"Content-Type": "application/json",
|
|
532
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
533
|
+
**(headers or {}),
|
|
534
|
+
}
|
|
530
535
|
|
|
531
536
|
json = kwargs if data is UNSET else data
|
|
532
|
-
|
|
537
|
+
if self._github.config.rest_api_validate_body:
|
|
538
|
+
json = type_validate_python(
|
|
539
|
+
OrgsOrgCopilotBillingSelectedTeamsPostBody, json
|
|
540
|
+
)
|
|
533
541
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
534
542
|
|
|
535
543
|
return await self._github.arequest(
|
|
@@ -583,13 +591,17 @@ class CopilotClient:
|
|
|
583
591
|
|
|
584
592
|
url = f"/orgs/{org}/copilot/billing/selected_teams"
|
|
585
593
|
|
|
586
|
-
headers = {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
594
|
+
headers = {
|
|
595
|
+
"Content-Type": "application/json",
|
|
596
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
597
|
+
**(headers or {}),
|
|
598
|
+
}
|
|
590
599
|
|
|
591
600
|
json = kwargs if data is UNSET else data
|
|
592
|
-
|
|
601
|
+
if self._github.config.rest_api_validate_body:
|
|
602
|
+
json = type_validate_python(
|
|
603
|
+
OrgsOrgCopilotBillingSelectedTeamsDeleteBody, json
|
|
604
|
+
)
|
|
593
605
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
594
606
|
|
|
595
607
|
return self._github.request(
|
|
@@ -643,13 +655,17 @@ class CopilotClient:
|
|
|
643
655
|
|
|
644
656
|
url = f"/orgs/{org}/copilot/billing/selected_teams"
|
|
645
657
|
|
|
646
|
-
headers = {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
658
|
+
headers = {
|
|
659
|
+
"Content-Type": "application/json",
|
|
660
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
661
|
+
**(headers or {}),
|
|
662
|
+
}
|
|
650
663
|
|
|
651
664
|
json = kwargs if data is UNSET else data
|
|
652
|
-
|
|
665
|
+
if self._github.config.rest_api_validate_body:
|
|
666
|
+
json = type_validate_python(
|
|
667
|
+
OrgsOrgCopilotBillingSelectedTeamsDeleteBody, json
|
|
668
|
+
)
|
|
653
669
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
654
670
|
|
|
655
671
|
return await self._github.arequest(
|
|
@@ -703,13 +719,17 @@ class CopilotClient:
|
|
|
703
719
|
|
|
704
720
|
url = f"/orgs/{org}/copilot/billing/selected_users"
|
|
705
721
|
|
|
706
|
-
headers = {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
722
|
+
headers = {
|
|
723
|
+
"Content-Type": "application/json",
|
|
724
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
725
|
+
**(headers or {}),
|
|
726
|
+
}
|
|
710
727
|
|
|
711
728
|
json = kwargs if data is UNSET else data
|
|
712
|
-
|
|
729
|
+
if self._github.config.rest_api_validate_body:
|
|
730
|
+
json = type_validate_python(
|
|
731
|
+
OrgsOrgCopilotBillingSelectedUsersPostBody, json
|
|
732
|
+
)
|
|
713
733
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
714
734
|
|
|
715
735
|
return self._github.request(
|
|
@@ -763,13 +783,17 @@ class CopilotClient:
|
|
|
763
783
|
|
|
764
784
|
url = f"/orgs/{org}/copilot/billing/selected_users"
|
|
765
785
|
|
|
766
|
-
headers = {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
786
|
+
headers = {
|
|
787
|
+
"Content-Type": "application/json",
|
|
788
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
789
|
+
**(headers or {}),
|
|
790
|
+
}
|
|
770
791
|
|
|
771
792
|
json = kwargs if data is UNSET else data
|
|
772
|
-
|
|
793
|
+
if self._github.config.rest_api_validate_body:
|
|
794
|
+
json = type_validate_python(
|
|
795
|
+
OrgsOrgCopilotBillingSelectedUsersPostBody, json
|
|
796
|
+
)
|
|
773
797
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
774
798
|
|
|
775
799
|
return await self._github.arequest(
|
|
@@ -823,13 +847,17 @@ class CopilotClient:
|
|
|
823
847
|
|
|
824
848
|
url = f"/orgs/{org}/copilot/billing/selected_users"
|
|
825
849
|
|
|
826
|
-
headers = {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
850
|
+
headers = {
|
|
851
|
+
"Content-Type": "application/json",
|
|
852
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
853
|
+
**(headers or {}),
|
|
854
|
+
}
|
|
830
855
|
|
|
831
856
|
json = kwargs if data is UNSET else data
|
|
832
|
-
|
|
857
|
+
if self._github.config.rest_api_validate_body:
|
|
858
|
+
json = type_validate_python(
|
|
859
|
+
OrgsOrgCopilotBillingSelectedUsersDeleteBody, json
|
|
860
|
+
)
|
|
833
861
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
834
862
|
|
|
835
863
|
return self._github.request(
|
|
@@ -883,13 +911,17 @@ class CopilotClient:
|
|
|
883
911
|
|
|
884
912
|
url = f"/orgs/{org}/copilot/billing/selected_users"
|
|
885
913
|
|
|
886
|
-
headers = {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
914
|
+
headers = {
|
|
915
|
+
"Content-Type": "application/json",
|
|
916
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
917
|
+
**(headers or {}),
|
|
918
|
+
}
|
|
890
919
|
|
|
891
920
|
json = kwargs if data is UNSET else data
|
|
892
|
-
|
|
921
|
+
if self._github.config.rest_api_validate_body:
|
|
922
|
+
json = type_validate_python(
|
|
923
|
+
OrgsOrgCopilotBillingSelectedUsersDeleteBody, json
|
|
924
|
+
)
|
|
893
925
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
894
926
|
|
|
895
927
|
return await self._github.arequest(
|
|
@@ -485,13 +485,15 @@ class DependabotClient:
|
|
|
485
485
|
|
|
486
486
|
url = f"/orgs/{org}/dependabot/secrets/{secret_name}"
|
|
487
487
|
|
|
488
|
-
headers = {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
488
|
+
headers = {
|
|
489
|
+
"Content-Type": "application/json",
|
|
490
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
491
|
+
**(headers or {}),
|
|
492
|
+
}
|
|
492
493
|
|
|
493
494
|
json = kwargs if data is UNSET else data
|
|
494
|
-
|
|
495
|
+
if self._github.config.rest_api_validate_body:
|
|
496
|
+
json = type_validate_python(OrgsOrgDependabotSecretsSecretNamePutBody, json)
|
|
495
497
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
496
498
|
|
|
497
499
|
return self._github.request(
|
|
@@ -541,13 +543,15 @@ class DependabotClient:
|
|
|
541
543
|
|
|
542
544
|
url = f"/orgs/{org}/dependabot/secrets/{secret_name}"
|
|
543
545
|
|
|
544
|
-
headers = {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
headers = {
|
|
547
|
+
"Content-Type": "application/json",
|
|
548
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
549
|
+
**(headers or {}),
|
|
550
|
+
}
|
|
548
551
|
|
|
549
552
|
json = kwargs if data is UNSET else data
|
|
550
|
-
|
|
553
|
+
if self._github.config.rest_api_validate_body:
|
|
554
|
+
json = type_validate_python(OrgsOrgDependabotSecretsSecretNamePutBody, json)
|
|
551
555
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
552
556
|
|
|
553
557
|
return await self._github.arequest(
|
|
@@ -698,15 +702,17 @@ class DependabotClient:
|
|
|
698
702
|
|
|
699
703
|
url = f"/orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
|
700
704
|
|
|
701
|
-
headers = {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
+
headers = {
|
|
706
|
+
"Content-Type": "application/json",
|
|
707
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
708
|
+
**(headers or {}),
|
|
709
|
+
}
|
|
705
710
|
|
|
706
711
|
json = kwargs if data is UNSET else data
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
712
|
+
if self._github.config.rest_api_validate_body:
|
|
713
|
+
json = type_validate_python(
|
|
714
|
+
OrgsOrgDependabotSecretsSecretNameRepositoriesPutBody, json
|
|
715
|
+
)
|
|
710
716
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
711
717
|
|
|
712
718
|
return self._github.request(
|
|
@@ -754,15 +760,17 @@ class DependabotClient:
|
|
|
754
760
|
|
|
755
761
|
url = f"/orgs/{org}/dependabot/secrets/{secret_name}/repositories"
|
|
756
762
|
|
|
757
|
-
headers = {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
763
|
+
headers = {
|
|
764
|
+
"Content-Type": "application/json",
|
|
765
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
766
|
+
**(headers or {}),
|
|
767
|
+
}
|
|
761
768
|
|
|
762
769
|
json = kwargs if data is UNSET else data
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
770
|
+
if self._github.config.rest_api_validate_body:
|
|
771
|
+
json = type_validate_python(
|
|
772
|
+
OrgsOrgDependabotSecretsSecretNameRepositoriesPutBody, json
|
|
773
|
+
)
|
|
766
774
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
767
775
|
|
|
768
776
|
return await self._github.arequest(
|
|
@@ -1096,15 +1104,17 @@ class DependabotClient:
|
|
|
1096
1104
|
|
|
1097
1105
|
url = f"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
|
1098
1106
|
|
|
1099
|
-
headers = {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1107
|
+
headers = {
|
|
1108
|
+
"Content-Type": "application/json",
|
|
1109
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1110
|
+
**(headers or {}),
|
|
1111
|
+
}
|
|
1103
1112
|
|
|
1104
1113
|
json = kwargs if data is UNSET else data
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1114
|
+
if self._github.config.rest_api_validate_body:
|
|
1115
|
+
json = type_validate_python(
|
|
1116
|
+
ReposOwnerRepoDependabotAlertsAlertNumberPatchBody, json
|
|
1117
|
+
)
|
|
1108
1118
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1109
1119
|
|
|
1110
1120
|
return self._github.request(
|
|
@@ -1176,15 +1186,17 @@ class DependabotClient:
|
|
|
1176
1186
|
|
|
1177
1187
|
url = f"/repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
|
|
1178
1188
|
|
|
1179
|
-
headers = {
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1189
|
+
headers = {
|
|
1190
|
+
"Content-Type": "application/json",
|
|
1191
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1192
|
+
**(headers or {}),
|
|
1193
|
+
}
|
|
1183
1194
|
|
|
1184
1195
|
json = kwargs if data is UNSET else data
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1196
|
+
if self._github.config.rest_api_validate_body:
|
|
1197
|
+
json = type_validate_python(
|
|
1198
|
+
ReposOwnerRepoDependabotAlertsAlertNumberPatchBody, json
|
|
1199
|
+
)
|
|
1188
1200
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1189
1201
|
|
|
1190
1202
|
return await self._github.arequest(
|
|
@@ -1395,15 +1407,17 @@ class DependabotClient:
|
|
|
1395
1407
|
|
|
1396
1408
|
url = f"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
|
|
1397
1409
|
|
|
1398
|
-
headers = {
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1410
|
+
headers = {
|
|
1411
|
+
"Content-Type": "application/json",
|
|
1412
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1413
|
+
**(headers or {}),
|
|
1414
|
+
}
|
|
1402
1415
|
|
|
1403
1416
|
json = kwargs if data is UNSET else data
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1417
|
+
if self._github.config.rest_api_validate_body:
|
|
1418
|
+
json = type_validate_python(
|
|
1419
|
+
ReposOwnerRepoDependabotSecretsSecretNamePutBody, json
|
|
1420
|
+
)
|
|
1407
1421
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1408
1422
|
|
|
1409
1423
|
return self._github.request(
|
|
@@ -1457,15 +1471,17 @@ class DependabotClient:
|
|
|
1457
1471
|
|
|
1458
1472
|
url = f"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
|
|
1459
1473
|
|
|
1460
|
-
headers = {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1474
|
+
headers = {
|
|
1475
|
+
"Content-Type": "application/json",
|
|
1476
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1477
|
+
**(headers or {}),
|
|
1478
|
+
}
|
|
1464
1479
|
|
|
1465
1480
|
json = kwargs if data is UNSET else data
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1481
|
+
if self._github.config.rest_api_validate_body:
|
|
1482
|
+
json = type_validate_python(
|
|
1483
|
+
ReposOwnerRepoDependabotSecretsSecretNamePutBody, json
|
|
1484
|
+
)
|
|
1469
1485
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1470
1486
|
|
|
1471
1487
|
return await self._github.arequest(
|
|
@@ -224,13 +224,15 @@ class DependencyGraphClient:
|
|
|
224
224
|
|
|
225
225
|
url = f"/repos/{owner}/{repo}/dependency-graph/snapshots"
|
|
226
226
|
|
|
227
|
-
headers = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
headers = {
|
|
228
|
+
"Content-Type": "application/json",
|
|
229
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
230
|
+
**(headers or {}),
|
|
231
|
+
}
|
|
231
232
|
|
|
232
233
|
json = kwargs if data is UNSET else data
|
|
233
|
-
|
|
234
|
+
if self._github.config.rest_api_validate_body:
|
|
235
|
+
json = type_validate_python(Snapshot, json)
|
|
234
236
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
235
237
|
|
|
236
238
|
return self._github.request(
|
|
@@ -287,13 +289,15 @@ class DependencyGraphClient:
|
|
|
287
289
|
|
|
288
290
|
url = f"/repos/{owner}/{repo}/dependency-graph/snapshots"
|
|
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(Snapshot, json)
|
|
297
301
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
298
302
|
|
|
299
303
|
return await self._github.arequest(
|
|
@@ -152,13 +152,15 @@ class GistsClient:
|
|
|
152
152
|
|
|
153
153
|
url = "/gists"
|
|
154
154
|
|
|
155
|
-
headers = {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
headers = {
|
|
156
|
+
"Content-Type": "application/json",
|
|
157
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
158
|
+
**(headers or {}),
|
|
159
|
+
}
|
|
159
160
|
|
|
160
161
|
json = kwargs if data is UNSET else data
|
|
161
|
-
|
|
162
|
+
if self._github.config.rest_api_validate_body:
|
|
163
|
+
json = type_validate_python(GistsPostBody, json)
|
|
162
164
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
163
165
|
|
|
164
166
|
return self._github.request(
|
|
@@ -203,13 +205,15 @@ class GistsClient:
|
|
|
203
205
|
|
|
204
206
|
url = "/gists"
|
|
205
207
|
|
|
206
|
-
headers = {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
headers = {
|
|
209
|
+
"Content-Type": "application/json",
|
|
210
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
211
|
+
**(headers or {}),
|
|
212
|
+
}
|
|
210
213
|
|
|
211
214
|
json = kwargs if data is UNSET else data
|
|
212
|
-
|
|
215
|
+
if self._github.config.rest_api_validate_body:
|
|
216
|
+
json = type_validate_python(GistsPostBody, json)
|
|
213
217
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
214
218
|
|
|
215
219
|
return await self._github.arequest(
|
|
@@ -508,13 +512,15 @@ class GistsClient:
|
|
|
508
512
|
|
|
509
513
|
url = f"/gists/{gist_id}"
|
|
510
514
|
|
|
511
|
-
headers = {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
+
headers = {
|
|
516
|
+
"Content-Type": "application/json",
|
|
517
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
518
|
+
**(headers or {}),
|
|
519
|
+
}
|
|
515
520
|
|
|
516
521
|
json = kwargs if data is UNSET else data
|
|
517
|
-
|
|
522
|
+
if self._github.config.rest_api_validate_body:
|
|
523
|
+
json = type_validate_python(Union[GistsGistIdPatchBody, None], json)
|
|
518
524
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
519
525
|
|
|
520
526
|
return self._github.request(
|
|
@@ -570,13 +576,15 @@ class GistsClient:
|
|
|
570
576
|
|
|
571
577
|
url = f"/gists/{gist_id}"
|
|
572
578
|
|
|
573
|
-
headers = {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
579
|
+
headers = {
|
|
580
|
+
"Content-Type": "application/json",
|
|
581
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
582
|
+
**(headers or {}),
|
|
583
|
+
}
|
|
577
584
|
|
|
578
585
|
json = kwargs if data is UNSET else data
|
|
579
|
-
|
|
586
|
+
if self._github.config.rest_api_validate_body:
|
|
587
|
+
json = type_validate_python(Union[GistsGistIdPatchBody, None], json)
|
|
580
588
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
581
589
|
|
|
582
590
|
return await self._github.arequest(
|
|
@@ -694,13 +702,15 @@ class GistsClient:
|
|
|
694
702
|
|
|
695
703
|
url = f"/gists/{gist_id}/comments"
|
|
696
704
|
|
|
697
|
-
headers = {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
705
|
+
headers = {
|
|
706
|
+
"Content-Type": "application/json",
|
|
707
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
708
|
+
**(headers or {}),
|
|
709
|
+
}
|
|
701
710
|
|
|
702
711
|
json = kwargs if data is UNSET else data
|
|
703
|
-
|
|
712
|
+
if self._github.config.rest_api_validate_body:
|
|
713
|
+
json = type_validate_python(GistsGistIdCommentsPostBody, json)
|
|
704
714
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
705
715
|
|
|
706
716
|
return self._github.request(
|
|
@@ -748,13 +758,15 @@ class GistsClient:
|
|
|
748
758
|
|
|
749
759
|
url = f"/gists/{gist_id}/comments"
|
|
750
760
|
|
|
751
|
-
headers = {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
761
|
+
headers = {
|
|
762
|
+
"Content-Type": "application/json",
|
|
763
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
764
|
+
**(headers or {}),
|
|
765
|
+
}
|
|
755
766
|
|
|
756
767
|
json = kwargs if data is UNSET else data
|
|
757
|
-
|
|
768
|
+
if self._github.config.rest_api_validate_body:
|
|
769
|
+
json = type_validate_python(GistsGistIdCommentsPostBody, json)
|
|
758
770
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
759
771
|
|
|
760
772
|
return await self._github.arequest(
|
|
@@ -911,13 +923,15 @@ class GistsClient:
|
|
|
911
923
|
|
|
912
924
|
url = f"/gists/{gist_id}/comments/{comment_id}"
|
|
913
925
|
|
|
914
|
-
headers = {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
926
|
+
headers = {
|
|
927
|
+
"Content-Type": "application/json",
|
|
928
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
929
|
+
**(headers or {}),
|
|
930
|
+
}
|
|
918
931
|
|
|
919
932
|
json = kwargs if data is UNSET else data
|
|
920
|
-
|
|
933
|
+
if self._github.config.rest_api_validate_body:
|
|
934
|
+
json = type_validate_python(GistsGistIdCommentsCommentIdPatchBody, json)
|
|
921
935
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
922
936
|
|
|
923
937
|
return self._github.request(
|
|
@@ -971,13 +985,15 @@ class GistsClient:
|
|
|
971
985
|
|
|
972
986
|
url = f"/gists/{gist_id}/comments/{comment_id}"
|
|
973
987
|
|
|
974
|
-
headers = {
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
988
|
+
headers = {
|
|
989
|
+
"Content-Type": "application/json",
|
|
990
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
991
|
+
**(headers or {}),
|
|
992
|
+
}
|
|
978
993
|
|
|
979
994
|
json = kwargs if data is UNSET else data
|
|
980
|
-
|
|
995
|
+
if self._github.config.rest_api_validate_body:
|
|
996
|
+
json = type_validate_python(GistsGistIdCommentsCommentIdPatchBody, json)
|
|
981
997
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
982
998
|
|
|
983
999
|
return await self._github.arequest(
|