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.

Files changed (78) hide show
  1. githubkit/config.py +3 -0
  2. githubkit/core.py +5 -0
  3. githubkit/github.py +3 -0
  4. githubkit/versions/ghec_v2022_11_28/models/group_0051.py +5 -1
  5. githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
  6. githubkit/versions/ghec_v2022_11_28/models/group_0098.py +4 -0
  7. githubkit/versions/ghec_v2022_11_28/models/group_1010.py +3 -1
  8. githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
  9. githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
  10. githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
  11. githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
  12. githubkit/versions/ghec_v2022_11_28/rest/checks.py +83 -66
  13. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
  14. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
  15. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
  16. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
  17. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
  18. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
  19. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
  20. githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
  21. githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
  22. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
  23. githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
  24. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
  25. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
  26. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
  27. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
  28. githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
  29. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
  30. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
  31. githubkit/versions/ghec_v2022_11_28/rest/repos.py +1035 -800
  32. githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
  33. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
  34. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
  35. githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
  36. githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
  37. githubkit/versions/ghec_v2022_11_28/types/group_0051.py +2 -1
  38. githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
  39. githubkit/versions/ghec_v2022_11_28/types/group_0098.py +1 -0
  40. githubkit/versions/ghec_v2022_11_28/types/group_1010.py +3 -1
  41. githubkit/versions/v2022_11_28/models/group_0030.py +5 -1
  42. githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
  43. githubkit/versions/v2022_11_28/models/group_0082.py +4 -0
  44. githubkit/versions/v2022_11_28/models/group_0936.py +3 -1
  45. githubkit/versions/v2022_11_28/rest/actions.py +534 -386
  46. githubkit/versions/v2022_11_28/rest/activity.py +60 -44
  47. githubkit/versions/v2022_11_28/rest/apps.py +102 -74
  48. githubkit/versions/v2022_11_28/rest/checks.py +83 -66
  49. githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
  50. githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
  51. githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
  52. githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
  53. githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
  54. githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
  55. githubkit/versions/v2022_11_28/rest/gists.py +56 -40
  56. githubkit/versions/v2022_11_28/rest/git.py +84 -60
  57. githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
  58. githubkit/versions/v2022_11_28/rest/issues.py +250 -198
  59. githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
  60. githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
  61. githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
  62. githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
  63. githubkit/versions/v2022_11_28/rest/projects.py +170 -126
  64. githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
  65. githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
  66. githubkit/versions/v2022_11_28/rest/repos.py +1035 -800
  67. githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
  68. githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
  69. githubkit/versions/v2022_11_28/rest/teams.py +274 -204
  70. githubkit/versions/v2022_11_28/rest/users.py +154 -118
  71. githubkit/versions/v2022_11_28/types/group_0030.py +2 -1
  72. githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
  73. githubkit/versions/v2022_11_28/types/group_0082.py +1 -0
  74. githubkit/versions/v2022_11_28/types/group_0936.py +3 -1
  75. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/METADATA +3 -2
  76. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/RECORD +78 -78
  77. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
  78. {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
@@ -101,13 +101,15 @@ class GitClient:
101
101
 
102
102
  url = f"/repos/{owner}/{repo}/git/blobs"
103
103
 
104
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
105
-
106
- if not kwargs:
107
- kwargs = UNSET
104
+ headers = {
105
+ "Content-Type": "application/json",
106
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
107
+ **(headers or {}),
108
+ }
108
109
 
109
110
  json = kwargs if data is UNSET else data
110
- json = type_validate_python(ReposOwnerRepoGitBlobsPostBody, json)
111
+ if self._github.config.rest_api_validate_body:
112
+ json = type_validate_python(ReposOwnerRepoGitBlobsPostBody, json)
111
113
  json = model_dump(json) if isinstance(json, BaseModel) else json
112
114
 
113
115
  return self._github.request(
@@ -169,13 +171,15 @@ class GitClient:
169
171
 
170
172
  url = f"/repos/{owner}/{repo}/git/blobs"
171
173
 
172
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
173
-
174
- if not kwargs:
175
- kwargs = UNSET
174
+ headers = {
175
+ "Content-Type": "application/json",
176
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
177
+ **(headers or {}),
178
+ }
176
179
 
177
180
  json = kwargs if data is UNSET else data
178
- json = type_validate_python(ReposOwnerRepoGitBlobsPostBody, json)
181
+ if self._github.config.rest_api_validate_body:
182
+ json = type_validate_python(ReposOwnerRepoGitBlobsPostBody, json)
179
183
  json = model_dump(json) if isinstance(json, BaseModel) else json
180
184
 
181
185
  return await self._github.arequest(
@@ -296,13 +300,15 @@ class GitClient:
296
300
 
297
301
  url = f"/repos/{owner}/{repo}/git/commits"
298
302
 
299
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
300
-
301
- if not kwargs:
302
- kwargs = UNSET
303
+ headers = {
304
+ "Content-Type": "application/json",
305
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
306
+ **(headers or {}),
307
+ }
303
308
 
304
309
  json = kwargs if data is UNSET else data
305
- json = type_validate_python(ReposOwnerRepoGitCommitsPostBody, json)
310
+ if self._github.config.rest_api_validate_body:
311
+ json = type_validate_python(ReposOwnerRepoGitCommitsPostBody, json)
306
312
  json = model_dump(json) if isinstance(json, BaseModel) else json
307
313
 
308
314
  return self._github.request(
@@ -364,13 +370,15 @@ class GitClient:
364
370
 
365
371
  url = f"/repos/{owner}/{repo}/git/commits"
366
372
 
367
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
368
-
369
- if not kwargs:
370
- kwargs = UNSET
373
+ headers = {
374
+ "Content-Type": "application/json",
375
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
376
+ **(headers or {}),
377
+ }
371
378
 
372
379
  json = kwargs if data is UNSET else data
373
- json = type_validate_python(ReposOwnerRepoGitCommitsPostBody, json)
380
+ if self._github.config.rest_api_validate_body:
381
+ json = type_validate_python(ReposOwnerRepoGitCommitsPostBody, json)
374
382
  json = model_dump(json) if isinstance(json, BaseModel) else json
375
383
 
376
384
  return await self._github.arequest(
@@ -592,13 +600,15 @@ class GitClient:
592
600
 
593
601
  url = f"/repos/{owner}/{repo}/git/refs"
594
602
 
595
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
596
-
597
- if not kwargs:
598
- kwargs = UNSET
603
+ headers = {
604
+ "Content-Type": "application/json",
605
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
606
+ **(headers or {}),
607
+ }
599
608
 
600
609
  json = kwargs if data is UNSET else data
601
- json = type_validate_python(ReposOwnerRepoGitRefsPostBody, json)
610
+ if self._github.config.rest_api_validate_body:
611
+ json = type_validate_python(ReposOwnerRepoGitRefsPostBody, json)
602
612
  json = model_dump(json) if isinstance(json, BaseModel) else json
603
613
 
604
614
  return self._github.request(
@@ -655,13 +665,15 @@ class GitClient:
655
665
 
656
666
  url = f"/repos/{owner}/{repo}/git/refs"
657
667
 
658
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
659
-
660
- if not kwargs:
661
- kwargs = UNSET
668
+ headers = {
669
+ "Content-Type": "application/json",
670
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
671
+ **(headers or {}),
672
+ }
662
673
 
663
674
  json = kwargs if data is UNSET else data
664
- json = type_validate_python(ReposOwnerRepoGitRefsPostBody, json)
675
+ if self._github.config.rest_api_validate_body:
676
+ json = type_validate_python(ReposOwnerRepoGitRefsPostBody, json)
665
677
  json = model_dump(json) if isinstance(json, BaseModel) else json
666
678
 
667
679
  return await self._github.arequest(
@@ -773,13 +785,15 @@ class GitClient:
773
785
 
774
786
  url = f"/repos/{owner}/{repo}/git/refs/{ref}"
775
787
 
776
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
777
-
778
- if not kwargs:
779
- kwargs = UNSET
788
+ headers = {
789
+ "Content-Type": "application/json",
790
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
791
+ **(headers or {}),
792
+ }
780
793
 
781
794
  json = kwargs if data is UNSET else data
782
- json = type_validate_python(ReposOwnerRepoGitRefsRefPatchBody, json)
795
+ if self._github.config.rest_api_validate_body:
796
+ json = type_validate_python(ReposOwnerRepoGitRefsRefPatchBody, json)
783
797
  json = model_dump(json) if isinstance(json, BaseModel) else json
784
798
 
785
799
  return self._github.request(
@@ -839,13 +853,15 @@ class GitClient:
839
853
 
840
854
  url = f"/repos/{owner}/{repo}/git/refs/{ref}"
841
855
 
842
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
843
-
844
- if not kwargs:
845
- kwargs = UNSET
856
+ headers = {
857
+ "Content-Type": "application/json",
858
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
859
+ **(headers or {}),
860
+ }
846
861
 
847
862
  json = kwargs if data is UNSET else data
848
- json = type_validate_python(ReposOwnerRepoGitRefsRefPatchBody, json)
863
+ if self._github.config.rest_api_validate_body:
864
+ json = type_validate_python(ReposOwnerRepoGitRefsRefPatchBody, json)
849
865
  json = model_dump(json) if isinstance(json, BaseModel) else json
850
866
 
851
867
  return await self._github.arequest(
@@ -905,13 +921,15 @@ class GitClient:
905
921
 
906
922
  url = f"/repos/{owner}/{repo}/git/tags"
907
923
 
908
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
909
-
910
- if not kwargs:
911
- kwargs = UNSET
924
+ headers = {
925
+ "Content-Type": "application/json",
926
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
927
+ **(headers or {}),
928
+ }
912
929
 
913
930
  json = kwargs if data is UNSET else data
914
- json = type_validate_python(ReposOwnerRepoGitTagsPostBody, json)
931
+ if self._github.config.rest_api_validate_body:
932
+ json = type_validate_python(ReposOwnerRepoGitTagsPostBody, json)
915
933
  json = model_dump(json) if isinstance(json, BaseModel) else json
916
934
 
917
935
  return self._github.request(
@@ -971,13 +989,15 @@ class GitClient:
971
989
 
972
990
  url = f"/repos/{owner}/{repo}/git/tags"
973
991
 
974
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
975
-
976
- if not kwargs:
977
- kwargs = UNSET
992
+ headers = {
993
+ "Content-Type": "application/json",
994
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
995
+ **(headers or {}),
996
+ }
978
997
 
979
998
  json = kwargs if data is UNSET else data
980
- json = type_validate_python(ReposOwnerRepoGitTagsPostBody, json)
999
+ if self._github.config.rest_api_validate_body:
1000
+ json = type_validate_python(ReposOwnerRepoGitTagsPostBody, json)
981
1001
  json = model_dump(json) if isinstance(json, BaseModel) else json
982
1002
 
983
1003
  return await self._github.arequest(
@@ -1088,13 +1108,15 @@ class GitClient:
1088
1108
 
1089
1109
  url = f"/repos/{owner}/{repo}/git/trees"
1090
1110
 
1091
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1092
-
1093
- if not kwargs:
1094
- kwargs = UNSET
1111
+ headers = {
1112
+ "Content-Type": "application/json",
1113
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1114
+ **(headers or {}),
1115
+ }
1095
1116
 
1096
1117
  json = kwargs if data is UNSET else data
1097
- json = type_validate_python(ReposOwnerRepoGitTreesPostBody, json)
1118
+ if self._github.config.rest_api_validate_body:
1119
+ json = type_validate_python(ReposOwnerRepoGitTreesPostBody, json)
1098
1120
  json = model_dump(json) if isinstance(json, BaseModel) else json
1099
1121
 
1100
1122
  return self._github.request(
@@ -1153,13 +1175,15 @@ class GitClient:
1153
1175
 
1154
1176
  url = f"/repos/{owner}/{repo}/git/trees"
1155
1177
 
1156
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1157
-
1158
- if not kwargs:
1159
- kwargs = UNSET
1178
+ headers = {
1179
+ "Content-Type": "application/json",
1180
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1181
+ **(headers or {}),
1182
+ }
1160
1183
 
1161
1184
  json = kwargs if data is UNSET else data
1162
- json = type_validate_python(ReposOwnerRepoGitTreesPostBody, json)
1185
+ if self._github.config.rest_api_validate_body:
1186
+ json = type_validate_python(ReposOwnerRepoGitTreesPostBody, json)
1163
1187
  json = model_dump(json) if isinstance(json, BaseModel) else json
1164
1188
 
1165
1189
  return await self._github.arequest(
@@ -146,13 +146,15 @@ class InteractionsClient:
146
146
 
147
147
  url = f"/orgs/{org}/interaction-limits"
148
148
 
149
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
150
-
151
- if not kwargs:
152
- kwargs = UNSET
149
+ headers = {
150
+ "Content-Type": "application/json",
151
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
152
+ **(headers or {}),
153
+ }
153
154
 
154
155
  json = kwargs if data is UNSET else data
155
- json = type_validate_python(InteractionLimit, json)
156
+ if self._github.config.rest_api_validate_body:
157
+ json = type_validate_python(InteractionLimit, json)
156
158
  json = model_dump(json) if isinstance(json, BaseModel) else json
157
159
 
158
160
  return self._github.request(
@@ -202,13 +204,15 @@ class InteractionsClient:
202
204
 
203
205
  url = f"/orgs/{org}/interaction-limits"
204
206
 
205
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
206
-
207
- if not kwargs:
208
- kwargs = UNSET
207
+ headers = {
208
+ "Content-Type": "application/json",
209
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
210
+ **(headers or {}),
211
+ }
209
212
 
210
213
  json = kwargs if data is UNSET else data
211
- json = type_validate_python(InteractionLimit, json)
214
+ if self._github.config.rest_api_validate_body:
215
+ json = type_validate_python(InteractionLimit, json)
212
216
  json = model_dump(json) if isinstance(json, BaseModel) else json
213
217
 
214
218
  return await self._github.arequest(
@@ -367,13 +371,15 @@ class InteractionsClient:
367
371
 
368
372
  url = f"/repos/{owner}/{repo}/interaction-limits"
369
373
 
370
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
371
-
372
- if not kwargs:
373
- kwargs = UNSET
374
+ headers = {
375
+ "Content-Type": "application/json",
376
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
377
+ **(headers or {}),
378
+ }
374
379
 
375
380
  json = kwargs if data is UNSET else data
376
- json = type_validate_python(InteractionLimit, json)
381
+ if self._github.config.rest_api_validate_body:
382
+ json = type_validate_python(InteractionLimit, json)
377
383
  json = model_dump(json) if isinstance(json, BaseModel) else json
378
384
 
379
385
  return self._github.request(
@@ -424,13 +430,15 @@ class InteractionsClient:
424
430
 
425
431
  url = f"/repos/{owner}/{repo}/interaction-limits"
426
432
 
427
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
428
-
429
- if not kwargs:
430
- kwargs = UNSET
433
+ headers = {
434
+ "Content-Type": "application/json",
435
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
436
+ **(headers or {}),
437
+ }
431
438
 
432
439
  json = kwargs if data is UNSET else data
433
- json = type_validate_python(InteractionLimit, json)
440
+ if self._github.config.rest_api_validate_body:
441
+ json = type_validate_python(InteractionLimit, json)
434
442
  json = model_dump(json) if isinstance(json, BaseModel) else json
435
443
 
436
444
  return await self._github.arequest(
@@ -570,13 +578,15 @@ class InteractionsClient:
570
578
 
571
579
  url = "/user/interaction-limits"
572
580
 
573
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
574
-
575
- if not kwargs:
576
- kwargs = UNSET
581
+ headers = {
582
+ "Content-Type": "application/json",
583
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
584
+ **(headers or {}),
585
+ }
577
586
 
578
587
  json = kwargs if data is UNSET else data
579
- json = type_validate_python(InteractionLimit, json)
588
+ if self._github.config.rest_api_validate_body:
589
+ json = type_validate_python(InteractionLimit, json)
580
590
  json = model_dump(json) if isinstance(json, BaseModel) else json
581
591
 
582
592
  return self._github.request(
@@ -620,13 +630,15 @@ class InteractionsClient:
620
630
 
621
631
  url = "/user/interaction-limits"
622
632
 
623
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
624
-
625
- if not kwargs:
626
- kwargs = UNSET
633
+ headers = {
634
+ "Content-Type": "application/json",
635
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
636
+ **(headers or {}),
637
+ }
627
638
 
628
639
  json = kwargs if data is UNSET else data
629
- json = type_validate_python(InteractionLimit, json)
640
+ if self._github.config.rest_api_validate_body:
641
+ json = type_validate_python(InteractionLimit, json)
630
642
  json = model_dump(json) if isinstance(json, BaseModel) else json
631
643
 
632
644
  return await self._github.arequest(