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
@@ -184,13 +184,15 @@ class TeamsClient:
184
184
 
185
185
  url = f"/orgs/{org}/teams"
186
186
 
187
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
188
-
189
- if not kwargs:
190
- kwargs = UNSET
187
+ headers = {
188
+ "Content-Type": "application/json",
189
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
190
+ **(headers or {}),
191
+ }
191
192
 
192
193
  json = kwargs if data is UNSET else data
193
- json = type_validate_python(OrgsOrgTeamsPostBody, json)
194
+ if self._github.config.rest_api_validate_body:
195
+ json = type_validate_python(OrgsOrgTeamsPostBody, json)
194
196
  json = model_dump(json) if isinstance(json, BaseModel) else json
195
197
 
196
198
  return self._github.request(
@@ -247,13 +249,15 @@ class TeamsClient:
247
249
 
248
250
  url = f"/orgs/{org}/teams"
249
251
 
250
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
251
-
252
- if not kwargs:
253
- kwargs = UNSET
252
+ headers = {
253
+ "Content-Type": "application/json",
254
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
255
+ **(headers or {}),
256
+ }
254
257
 
255
258
  json = kwargs if data is UNSET else data
256
- json = type_validate_python(OrgsOrgTeamsPostBody, json)
259
+ if self._github.config.rest_api_validate_body:
260
+ json = type_validate_python(OrgsOrgTeamsPostBody, json)
257
261
  json = model_dump(json) if isinstance(json, BaseModel) else json
258
262
 
259
263
  return await self._github.arequest(
@@ -404,13 +408,15 @@ class TeamsClient:
404
408
 
405
409
  url = f"/orgs/{org}/teams/{team_slug}"
406
410
 
407
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
408
-
409
- if not kwargs:
410
- kwargs = UNSET
411
+ headers = {
412
+ "Content-Type": "application/json",
413
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
414
+ **(headers or {}),
415
+ }
411
416
 
412
417
  json = kwargs if data is UNSET else data
413
- json = type_validate_python(OrgsOrgTeamsTeamSlugPatchBody, json)
418
+ if self._github.config.rest_api_validate_body:
419
+ json = type_validate_python(OrgsOrgTeamsTeamSlugPatchBody, json)
414
420
  json = model_dump(json) if isinstance(json, BaseModel) else json
415
421
 
416
422
  return self._github.request(
@@ -474,13 +480,15 @@ class TeamsClient:
474
480
 
475
481
  url = f"/orgs/{org}/teams/{team_slug}"
476
482
 
477
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
478
-
479
- if not kwargs:
480
- kwargs = UNSET
483
+ headers = {
484
+ "Content-Type": "application/json",
485
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
486
+ **(headers or {}),
487
+ }
481
488
 
482
489
  json = kwargs if data is UNSET else data
483
- json = type_validate_python(OrgsOrgTeamsTeamSlugPatchBody, json)
490
+ if self._github.config.rest_api_validate_body:
491
+ json = type_validate_python(OrgsOrgTeamsTeamSlugPatchBody, json)
484
492
  json = model_dump(json) if isinstance(json, BaseModel) else json
485
493
 
486
494
  return await self._github.arequest(
@@ -606,13 +614,15 @@ class TeamsClient:
606
614
 
607
615
  url = f"/orgs/{org}/teams/{team_slug}/discussions"
608
616
 
609
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
610
-
611
- if not kwargs:
612
- kwargs = UNSET
617
+ headers = {
618
+ "Content-Type": "application/json",
619
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
620
+ **(headers or {}),
621
+ }
613
622
 
614
623
  json = kwargs if data is UNSET else data
615
- json = type_validate_python(OrgsOrgTeamsTeamSlugDiscussionsPostBody, json)
624
+ if self._github.config.rest_api_validate_body:
625
+ json = type_validate_python(OrgsOrgTeamsTeamSlugDiscussionsPostBody, json)
616
626
  json = model_dump(json) if isinstance(json, BaseModel) else json
617
627
 
618
628
  return self._github.request(
@@ -661,13 +671,15 @@ class TeamsClient:
661
671
 
662
672
  url = f"/orgs/{org}/teams/{team_slug}/discussions"
663
673
 
664
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
665
-
666
- if not kwargs:
667
- kwargs = UNSET
674
+ headers = {
675
+ "Content-Type": "application/json",
676
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
677
+ **(headers or {}),
678
+ }
668
679
 
669
680
  json = kwargs if data is UNSET else data
670
- json = type_validate_python(OrgsOrgTeamsTeamSlugDiscussionsPostBody, json)
681
+ if self._github.config.rest_api_validate_body:
682
+ json = type_validate_python(OrgsOrgTeamsTeamSlugDiscussionsPostBody, json)
671
683
  json = model_dump(json) if isinstance(json, BaseModel) else json
672
684
 
673
685
  return await self._github.arequest(
@@ -811,15 +823,17 @@ class TeamsClient:
811
823
 
812
824
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
813
825
 
814
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
815
-
816
- if not kwargs:
817
- kwargs = UNSET
826
+ headers = {
827
+ "Content-Type": "application/json",
828
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
829
+ **(headers or {}),
830
+ }
818
831
 
819
832
  json = kwargs if data is UNSET else data
820
- json = type_validate_python(
821
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberPatchBody, json
822
- )
833
+ if self._github.config.rest_api_validate_body:
834
+ json = type_validate_python(
835
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberPatchBody, json
836
+ )
823
837
  json = model_dump(json) if isinstance(json, BaseModel) else json
824
838
 
825
839
  return self._github.request(
@@ -877,15 +891,17 @@ class TeamsClient:
877
891
 
878
892
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
879
893
 
880
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
881
-
882
- if not kwargs:
883
- kwargs = UNSET
894
+ headers = {
895
+ "Content-Type": "application/json",
896
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
897
+ **(headers or {}),
898
+ }
884
899
 
885
900
  json = kwargs if data is UNSET else data
886
- json = type_validate_python(
887
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberPatchBody, json
888
- )
901
+ if self._github.config.rest_api_validate_body:
902
+ json = type_validate_python(
903
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberPatchBody, json
904
+ )
889
905
  json = model_dump(json) if isinstance(json, BaseModel) else json
890
906
 
891
907
  return await self._github.arequest(
@@ -1010,15 +1026,17 @@ class TeamsClient:
1010
1026
 
1011
1027
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
1012
1028
 
1013
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1014
-
1015
- if not kwargs:
1016
- kwargs = UNSET
1029
+ headers = {
1030
+ "Content-Type": "application/json",
1031
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1032
+ **(headers or {}),
1033
+ }
1017
1034
 
1018
1035
  json = kwargs if data is UNSET else data
1019
- json = type_validate_python(
1020
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsPostBody, json
1021
- )
1036
+ if self._github.config.rest_api_validate_body:
1037
+ json = type_validate_python(
1038
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsPostBody, json
1039
+ )
1022
1040
  json = model_dump(json) if isinstance(json, BaseModel) else json
1023
1041
 
1024
1042
  return self._github.request(
@@ -1073,15 +1091,17 @@ class TeamsClient:
1073
1091
 
1074
1092
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
1075
1093
 
1076
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1077
-
1078
- if not kwargs:
1079
- kwargs = UNSET
1094
+ headers = {
1095
+ "Content-Type": "application/json",
1096
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1097
+ **(headers or {}),
1098
+ }
1080
1099
 
1081
1100
  json = kwargs if data is UNSET else data
1082
- json = type_validate_python(
1083
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsPostBody, json
1084
- )
1101
+ if self._github.config.rest_api_validate_body:
1102
+ json = type_validate_python(
1103
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsPostBody, json
1104
+ )
1085
1105
  json = model_dump(json) if isinstance(json, BaseModel) else json
1086
1106
 
1087
1107
  return await self._github.arequest(
@@ -1229,16 +1249,18 @@ class TeamsClient:
1229
1249
 
1230
1250
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
1231
1251
 
1232
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1233
-
1234
- if not kwargs:
1235
- kwargs = UNSET
1252
+ headers = {
1253
+ "Content-Type": "application/json",
1254
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1255
+ **(headers or {}),
1256
+ }
1236
1257
 
1237
1258
  json = kwargs if data is UNSET else data
1238
- json = type_validate_python(
1239
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
1240
- json,
1241
- )
1259
+ if self._github.config.rest_api_validate_body:
1260
+ json = type_validate_python(
1261
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
1262
+ json,
1263
+ )
1242
1264
  json = model_dump(json) if isinstance(json, BaseModel) else json
1243
1265
 
1244
1266
  return self._github.request(
@@ -1296,16 +1318,18 @@ class TeamsClient:
1296
1318
 
1297
1319
  url = f"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
1298
1320
 
1299
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1300
-
1301
- if not kwargs:
1302
- kwargs = UNSET
1321
+ headers = {
1322
+ "Content-Type": "application/json",
1323
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1324
+ **(headers or {}),
1325
+ }
1303
1326
 
1304
1327
  json = kwargs if data is UNSET else data
1305
- json = type_validate_python(
1306
- OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
1307
- json,
1308
- )
1328
+ if self._github.config.rest_api_validate_body:
1329
+ json = type_validate_python(
1330
+ OrgsOrgTeamsTeamSlugDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
1331
+ json,
1332
+ )
1309
1333
  json = model_dump(json) if isinstance(json, BaseModel) else json
1310
1334
 
1311
1335
  return await self._github.arequest(
@@ -1538,15 +1562,17 @@ class TeamsClient:
1538
1562
 
1539
1563
  url = f"/orgs/{org}/teams/{team_slug}/memberships/{username}"
1540
1564
 
1541
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1542
-
1543
- if not kwargs:
1544
- kwargs = UNSET
1565
+ headers = {
1566
+ "Content-Type": "application/json",
1567
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1568
+ **(headers or {}),
1569
+ }
1545
1570
 
1546
1571
  json = kwargs if data is UNSET else data
1547
- json = type_validate_python(
1548
- OrgsOrgTeamsTeamSlugMembershipsUsernamePutBody, json
1549
- )
1572
+ if self._github.config.rest_api_validate_body:
1573
+ json = type_validate_python(
1574
+ OrgsOrgTeamsTeamSlugMembershipsUsernamePutBody, json
1575
+ )
1550
1576
  json = model_dump(json) if isinstance(json, BaseModel) else json
1551
1577
 
1552
1578
  return self._github.request(
@@ -1600,15 +1626,17 @@ class TeamsClient:
1600
1626
 
1601
1627
  url = f"/orgs/{org}/teams/{team_slug}/memberships/{username}"
1602
1628
 
1603
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1604
-
1605
- if not kwargs:
1606
- kwargs = UNSET
1629
+ headers = {
1630
+ "Content-Type": "application/json",
1631
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1632
+ **(headers or {}),
1633
+ }
1607
1634
 
1608
1635
  json = kwargs if data is UNSET else data
1609
- json = type_validate_python(
1610
- OrgsOrgTeamsTeamSlugMembershipsUsernamePutBody, json
1611
- )
1636
+ if self._github.config.rest_api_validate_body:
1637
+ json = type_validate_python(
1638
+ OrgsOrgTeamsTeamSlugMembershipsUsernamePutBody, json
1639
+ )
1612
1640
  json = model_dump(json) if isinstance(json, BaseModel) else json
1613
1641
 
1614
1642
  return await self._github.arequest(
@@ -1822,15 +1850,17 @@ class TeamsClient:
1822
1850
 
1823
1851
  url = f"/orgs/{org}/teams/{team_slug}/projects/{project_id}"
1824
1852
 
1825
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1826
-
1827
- if not kwargs:
1828
- kwargs = UNSET
1853
+ headers = {
1854
+ "Content-Type": "application/json",
1855
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1856
+ **(headers or {}),
1857
+ }
1829
1858
 
1830
1859
  json = kwargs if data is UNSET else data
1831
- json = type_validate_python(
1832
- Union[OrgsOrgTeamsTeamSlugProjectsProjectIdPutBody, None], json
1833
- )
1860
+ if self._github.config.rest_api_validate_body:
1861
+ json = type_validate_python(
1862
+ Union[OrgsOrgTeamsTeamSlugProjectsProjectIdPutBody, None], json
1863
+ )
1834
1864
  json = model_dump(json) if isinstance(json, BaseModel) else json
1835
1865
 
1836
1866
  return self._github.request(
@@ -1891,15 +1921,17 @@ class TeamsClient:
1891
1921
 
1892
1922
  url = f"/orgs/{org}/teams/{team_slug}/projects/{project_id}"
1893
1923
 
1894
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1895
-
1896
- if not kwargs:
1897
- kwargs = UNSET
1924
+ headers = {
1925
+ "Content-Type": "application/json",
1926
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1927
+ **(headers or {}),
1928
+ }
1898
1929
 
1899
1930
  json = kwargs if data is UNSET else data
1900
- json = type_validate_python(
1901
- Union[OrgsOrgTeamsTeamSlugProjectsProjectIdPutBody, None], json
1902
- )
1931
+ if self._github.config.rest_api_validate_body:
1932
+ json = type_validate_python(
1933
+ Union[OrgsOrgTeamsTeamSlugProjectsProjectIdPutBody, None], json
1934
+ )
1903
1935
  json = model_dump(json) if isinstance(json, BaseModel) else json
1904
1936
 
1905
1937
  return await self._github.arequest(
@@ -2108,13 +2140,15 @@ class TeamsClient:
2108
2140
 
2109
2141
  url = f"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
2110
2142
 
2111
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2112
-
2113
- if not kwargs:
2114
- kwargs = UNSET
2143
+ headers = {
2144
+ "Content-Type": "application/json",
2145
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2146
+ **(headers or {}),
2147
+ }
2115
2148
 
2116
2149
  json = kwargs if data is UNSET else data
2117
- json = type_validate_python(OrgsOrgTeamsTeamSlugReposOwnerRepoPutBody, json)
2150
+ if self._github.config.rest_api_validate_body:
2151
+ json = type_validate_python(OrgsOrgTeamsTeamSlugReposOwnerRepoPutBody, json)
2118
2152
  json = model_dump(json) if isinstance(json, BaseModel) else json
2119
2153
 
2120
2154
  return self._github.request(
@@ -2166,13 +2200,15 @@ class TeamsClient:
2166
2200
 
2167
2201
  url = f"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
2168
2202
 
2169
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2170
-
2171
- if not kwargs:
2172
- kwargs = UNSET
2203
+ headers = {
2204
+ "Content-Type": "application/json",
2205
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2206
+ **(headers or {}),
2207
+ }
2173
2208
 
2174
2209
  json = kwargs if data is UNSET else data
2175
- json = type_validate_python(OrgsOrgTeamsTeamSlugReposOwnerRepoPutBody, json)
2210
+ if self._github.config.rest_api_validate_body:
2211
+ json = type_validate_python(OrgsOrgTeamsTeamSlugReposOwnerRepoPutBody, json)
2176
2212
  json = model_dump(json) if isinstance(json, BaseModel) else json
2177
2213
 
2178
2214
  return await self._github.arequest(
@@ -2424,13 +2460,15 @@ class TeamsClient:
2424
2460
 
2425
2461
  url = f"/teams/{team_id}"
2426
2462
 
2427
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2428
-
2429
- if not kwargs:
2430
- kwargs = UNSET
2463
+ headers = {
2464
+ "Content-Type": "application/json",
2465
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2466
+ **(headers or {}),
2467
+ }
2431
2468
 
2432
2469
  json = kwargs if data is UNSET else data
2433
- json = type_validate_python(TeamsTeamIdPatchBody, json)
2470
+ if self._github.config.rest_api_validate_body:
2471
+ json = type_validate_python(TeamsTeamIdPatchBody, json)
2434
2472
  json = model_dump(json) if isinstance(json, BaseModel) else json
2435
2473
 
2436
2474
  return self._github.request(
@@ -2486,13 +2524,15 @@ class TeamsClient:
2486
2524
 
2487
2525
  url = f"/teams/{team_id}"
2488
2526
 
2489
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2490
-
2491
- if not kwargs:
2492
- kwargs = UNSET
2527
+ headers = {
2528
+ "Content-Type": "application/json",
2529
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2530
+ **(headers or {}),
2531
+ }
2493
2532
 
2494
2533
  json = kwargs if data is UNSET else data
2495
- json = type_validate_python(TeamsTeamIdPatchBody, json)
2534
+ if self._github.config.rest_api_validate_body:
2535
+ json = type_validate_python(TeamsTeamIdPatchBody, json)
2496
2536
  json = model_dump(json) if isinstance(json, BaseModel) else json
2497
2537
 
2498
2538
  return await self._github.arequest(
@@ -2609,13 +2649,15 @@ class TeamsClient:
2609
2649
 
2610
2650
  url = f"/teams/{team_id}/discussions"
2611
2651
 
2612
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2613
-
2614
- if not kwargs:
2615
- kwargs = UNSET
2652
+ headers = {
2653
+ "Content-Type": "application/json",
2654
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2655
+ **(headers or {}),
2656
+ }
2616
2657
 
2617
2658
  json = kwargs if data is UNSET else data
2618
- json = type_validate_python(TeamsTeamIdDiscussionsPostBody, json)
2659
+ if self._github.config.rest_api_validate_body:
2660
+ json = type_validate_python(TeamsTeamIdDiscussionsPostBody, json)
2619
2661
  json = model_dump(json) if isinstance(json, BaseModel) else json
2620
2662
 
2621
2663
  return self._github.request(
@@ -2661,13 +2703,15 @@ class TeamsClient:
2661
2703
 
2662
2704
  url = f"/teams/{team_id}/discussions"
2663
2705
 
2664
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2665
-
2666
- if not kwargs:
2667
- kwargs = UNSET
2706
+ headers = {
2707
+ "Content-Type": "application/json",
2708
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2709
+ **(headers or {}),
2710
+ }
2668
2711
 
2669
2712
  json = kwargs if data is UNSET else data
2670
- json = type_validate_python(TeamsTeamIdDiscussionsPostBody, json)
2713
+ if self._github.config.rest_api_validate_body:
2714
+ json = type_validate_python(TeamsTeamIdDiscussionsPostBody, json)
2671
2715
  json = model_dump(json) if isinstance(json, BaseModel) else json
2672
2716
 
2673
2717
  return await self._github.arequest(
@@ -2800,15 +2844,17 @@ class TeamsClient:
2800
2844
 
2801
2845
  url = f"/teams/{team_id}/discussions/{discussion_number}"
2802
2846
 
2803
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2804
-
2805
- if not kwargs:
2806
- kwargs = UNSET
2847
+ headers = {
2848
+ "Content-Type": "application/json",
2849
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2850
+ **(headers or {}),
2851
+ }
2807
2852
 
2808
2853
  json = kwargs if data is UNSET else data
2809
- json = type_validate_python(
2810
- TeamsTeamIdDiscussionsDiscussionNumberPatchBody, json
2811
- )
2854
+ if self._github.config.rest_api_validate_body:
2855
+ json = type_validate_python(
2856
+ TeamsTeamIdDiscussionsDiscussionNumberPatchBody, json
2857
+ )
2812
2858
  json = model_dump(json) if isinstance(json, BaseModel) else json
2813
2859
 
2814
2860
  return self._github.request(
@@ -2859,15 +2905,17 @@ class TeamsClient:
2859
2905
 
2860
2906
  url = f"/teams/{team_id}/discussions/{discussion_number}"
2861
2907
 
2862
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2863
-
2864
- if not kwargs:
2865
- kwargs = UNSET
2908
+ headers = {
2909
+ "Content-Type": "application/json",
2910
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2911
+ **(headers or {}),
2912
+ }
2866
2913
 
2867
2914
  json = kwargs if data is UNSET else data
2868
- json = type_validate_python(
2869
- TeamsTeamIdDiscussionsDiscussionNumberPatchBody, json
2870
- )
2915
+ if self._github.config.rest_api_validate_body:
2916
+ json = type_validate_python(
2917
+ TeamsTeamIdDiscussionsDiscussionNumberPatchBody, json
2918
+ )
2871
2919
  json = model_dump(json) if isinstance(json, BaseModel) else json
2872
2920
 
2873
2921
  return await self._github.arequest(
@@ -2987,15 +3035,17 @@ class TeamsClient:
2987
3035
 
2988
3036
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments"
2989
3037
 
2990
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2991
-
2992
- if not kwargs:
2993
- kwargs = UNSET
3038
+ headers = {
3039
+ "Content-Type": "application/json",
3040
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3041
+ **(headers or {}),
3042
+ }
2994
3043
 
2995
3044
  json = kwargs if data is UNSET else data
2996
- json = type_validate_python(
2997
- TeamsTeamIdDiscussionsDiscussionNumberCommentsPostBody, json
2998
- )
3045
+ if self._github.config.rest_api_validate_body:
3046
+ json = type_validate_python(
3047
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsPostBody, json
3048
+ )
2999
3049
  json = model_dump(json) if isinstance(json, BaseModel) else json
3000
3050
 
3001
3051
  return self._github.request(
@@ -3047,15 +3097,17 @@ class TeamsClient:
3047
3097
 
3048
3098
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments"
3049
3099
 
3050
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3051
-
3052
- if not kwargs:
3053
- kwargs = UNSET
3100
+ headers = {
3101
+ "Content-Type": "application/json",
3102
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3103
+ **(headers or {}),
3104
+ }
3054
3105
 
3055
3106
  json = kwargs if data is UNSET else data
3056
- json = type_validate_python(
3057
- TeamsTeamIdDiscussionsDiscussionNumberCommentsPostBody, json
3058
- )
3107
+ if self._github.config.rest_api_validate_body:
3108
+ json = type_validate_python(
3109
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsPostBody, json
3110
+ )
3059
3111
  json = model_dump(json) if isinstance(json, BaseModel) else json
3060
3112
 
3061
3113
  return await self._github.arequest(
@@ -3196,15 +3248,18 @@ class TeamsClient:
3196
3248
 
3197
3249
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}"
3198
3250
 
3199
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3200
-
3201
- if not kwargs:
3202
- kwargs = UNSET
3251
+ headers = {
3252
+ "Content-Type": "application/json",
3253
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3254
+ **(headers or {}),
3255
+ }
3203
3256
 
3204
3257
  json = kwargs if data is UNSET else data
3205
- json = type_validate_python(
3206
- TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberPatchBody, json
3207
- )
3258
+ if self._github.config.rest_api_validate_body:
3259
+ json = type_validate_python(
3260
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
3261
+ json,
3262
+ )
3208
3263
  json = model_dump(json) if isinstance(json, BaseModel) else json
3209
3264
 
3210
3265
  return self._github.request(
@@ -3259,15 +3314,18 @@ class TeamsClient:
3259
3314
 
3260
3315
  url = f"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}"
3261
3316
 
3262
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3263
-
3264
- if not kwargs:
3265
- kwargs = UNSET
3317
+ headers = {
3318
+ "Content-Type": "application/json",
3319
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3320
+ **(headers or {}),
3321
+ }
3266
3322
 
3267
3323
  json = kwargs if data is UNSET else data
3268
- json = type_validate_python(
3269
- TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberPatchBody, json
3270
- )
3324
+ if self._github.config.rest_api_validate_body:
3325
+ json = type_validate_python(
3326
+ TeamsTeamIdDiscussionsDiscussionNumberCommentsCommentNumberPatchBody,
3327
+ json,
3328
+ )
3271
3329
  json = model_dump(json) if isinstance(json, BaseModel) else json
3272
3330
 
3273
3331
  return await self._github.arequest(
@@ -3630,13 +3688,15 @@ class TeamsClient:
3630
3688
 
3631
3689
  url = f"/teams/{team_id}/memberships/{username}"
3632
3690
 
3633
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3634
-
3635
- if not kwargs:
3636
- kwargs = UNSET
3691
+ headers = {
3692
+ "Content-Type": "application/json",
3693
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3694
+ **(headers or {}),
3695
+ }
3637
3696
 
3638
3697
  json = kwargs if data is UNSET else data
3639
- json = type_validate_python(TeamsTeamIdMembershipsUsernamePutBody, json)
3698
+ if self._github.config.rest_api_validate_body:
3699
+ json = type_validate_python(TeamsTeamIdMembershipsUsernamePutBody, json)
3640
3700
  json = model_dump(json) if isinstance(json, BaseModel) else json
3641
3701
 
3642
3702
  return self._github.request(
@@ -3690,13 +3750,15 @@ class TeamsClient:
3690
3750
 
3691
3751
  url = f"/teams/{team_id}/memberships/{username}"
3692
3752
 
3693
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3694
-
3695
- if not kwargs:
3696
- kwargs = UNSET
3753
+ headers = {
3754
+ "Content-Type": "application/json",
3755
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3756
+ **(headers or {}),
3757
+ }
3697
3758
 
3698
3759
  json = kwargs if data is UNSET else data
3699
- json = type_validate_python(TeamsTeamIdMembershipsUsernamePutBody, json)
3760
+ if self._github.config.rest_api_validate_body:
3761
+ json = type_validate_python(TeamsTeamIdMembershipsUsernamePutBody, json)
3700
3762
  json = model_dump(json) if isinstance(json, BaseModel) else json
3701
3763
 
3702
3764
  return await self._github.arequest(
@@ -3905,13 +3967,15 @@ class TeamsClient:
3905
3967
 
3906
3968
  url = f"/teams/{team_id}/projects/{project_id}"
3907
3969
 
3908
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3909
-
3910
- if not kwargs:
3911
- kwargs = UNSET
3970
+ headers = {
3971
+ "Content-Type": "application/json",
3972
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3973
+ **(headers or {}),
3974
+ }
3912
3975
 
3913
3976
  json = kwargs if data is UNSET else data
3914
- json = type_validate_python(TeamsTeamIdProjectsProjectIdPutBody, json)
3977
+ if self._github.config.rest_api_validate_body:
3978
+ json = type_validate_python(TeamsTeamIdProjectsProjectIdPutBody, json)
3915
3979
  json = model_dump(json) if isinstance(json, BaseModel) else json
3916
3980
 
3917
3981
  return self._github.request(
@@ -3967,13 +4031,15 @@ class TeamsClient:
3967
4031
 
3968
4032
  url = f"/teams/{team_id}/projects/{project_id}"
3969
4033
 
3970
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3971
-
3972
- if not kwargs:
3973
- kwargs = UNSET
4034
+ headers = {
4035
+ "Content-Type": "application/json",
4036
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4037
+ **(headers or {}),
4038
+ }
3974
4039
 
3975
4040
  json = kwargs if data is UNSET else data
3976
- json = type_validate_python(TeamsTeamIdProjectsProjectIdPutBody, json)
4041
+ if self._github.config.rest_api_validate_body:
4042
+ json = type_validate_python(TeamsTeamIdProjectsProjectIdPutBody, json)
3977
4043
  json = model_dump(json) if isinstance(json, BaseModel) else json
3978
4044
 
3979
4045
  return await self._github.arequest(
@@ -4197,13 +4263,15 @@ class TeamsClient:
4197
4263
 
4198
4264
  url = f"/teams/{team_id}/repos/{owner}/{repo}"
4199
4265
 
4200
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4201
-
4202
- if not kwargs:
4203
- kwargs = UNSET
4266
+ headers = {
4267
+ "Content-Type": "application/json",
4268
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4269
+ **(headers or {}),
4270
+ }
4204
4271
 
4205
4272
  json = kwargs if data is UNSET else data
4206
- json = type_validate_python(TeamsTeamIdReposOwnerRepoPutBody, json)
4273
+ if self._github.config.rest_api_validate_body:
4274
+ json = type_validate_python(TeamsTeamIdReposOwnerRepoPutBody, json)
4207
4275
  json = model_dump(json) if isinstance(json, BaseModel) else json
4208
4276
 
4209
4277
  return self._github.request(
@@ -4260,13 +4328,15 @@ class TeamsClient:
4260
4328
 
4261
4329
  url = f"/teams/{team_id}/repos/{owner}/{repo}"
4262
4330
 
4263
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4264
-
4265
- if not kwargs:
4266
- kwargs = UNSET
4331
+ headers = {
4332
+ "Content-Type": "application/json",
4333
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4334
+ **(headers or {}),
4335
+ }
4267
4336
 
4268
4337
  json = kwargs if data is UNSET else data
4269
- json = type_validate_python(TeamsTeamIdReposOwnerRepoPutBody, json)
4338
+ if self._github.config.rest_api_validate_body:
4339
+ json = type_validate_python(TeamsTeamIdReposOwnerRepoPutBody, json)
4270
4340
  json = model_dump(json) if isinstance(json, BaseModel) else json
4271
4341
 
4272
4342
  return await self._github.arequest(