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
@@ -177,13 +177,15 @@ class ProjectsClient:
177
177
 
178
178
  url = f"/orgs/{org}/projects"
179
179
 
180
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
181
-
182
- if not kwargs:
183
- kwargs = UNSET
180
+ headers = {
181
+ "Content-Type": "application/json",
182
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
183
+ **(headers or {}),
184
+ }
184
185
 
185
186
  json = kwargs if data is UNSET else data
186
- json = type_validate_python(OrgsOrgProjectsPostBody, json)
187
+ if self._github.config.rest_api_validate_body:
188
+ json = type_validate_python(OrgsOrgProjectsPostBody, json)
187
189
  json = model_dump(json) if isinstance(json, BaseModel) else json
188
190
 
189
191
  return self._github.request(
@@ -240,13 +242,15 @@ class ProjectsClient:
240
242
 
241
243
  url = f"/orgs/{org}/projects"
242
244
 
243
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
244
-
245
- if not kwargs:
246
- kwargs = UNSET
245
+ headers = {
246
+ "Content-Type": "application/json",
247
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
248
+ **(headers or {}),
249
+ }
247
250
 
248
251
  json = kwargs if data is UNSET else data
249
- json = type_validate_python(OrgsOrgProjectsPostBody, json)
252
+ if self._github.config.rest_api_validate_body:
253
+ json = type_validate_python(OrgsOrgProjectsPostBody, json)
250
254
  json = model_dump(json) if isinstance(json, BaseModel) else json
251
255
 
252
256
  return await self._github.arequest(
@@ -405,13 +409,15 @@ class ProjectsClient:
405
409
 
406
410
  url = f"/projects/columns/cards/{card_id}"
407
411
 
408
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
409
-
410
- if not kwargs:
411
- kwargs = UNSET
412
+ headers = {
413
+ "Content-Type": "application/json",
414
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
415
+ **(headers or {}),
416
+ }
412
417
 
413
418
  json = kwargs if data is UNSET else data
414
- json = type_validate_python(ProjectsColumnsCardsCardIdPatchBody, json)
419
+ if self._github.config.rest_api_validate_body:
420
+ json = type_validate_python(ProjectsColumnsCardsCardIdPatchBody, json)
415
421
  json = model_dump(json) if isinstance(json, BaseModel) else json
416
422
 
417
423
  return self._github.request(
@@ -467,13 +473,15 @@ class ProjectsClient:
467
473
 
468
474
  url = f"/projects/columns/cards/{card_id}"
469
475
 
470
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
471
-
472
- if not kwargs:
473
- kwargs = UNSET
476
+ headers = {
477
+ "Content-Type": "application/json",
478
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
479
+ **(headers or {}),
480
+ }
474
481
 
475
482
  json = kwargs if data is UNSET else data
476
- json = type_validate_python(ProjectsColumnsCardsCardIdPatchBody, json)
483
+ if self._github.config.rest_api_validate_body:
484
+ json = type_validate_python(ProjectsColumnsCardsCardIdPatchBody, json)
477
485
  json = model_dump(json) if isinstance(json, BaseModel) else json
478
486
 
479
487
  return await self._github.arequest(
@@ -531,13 +539,15 @@ class ProjectsClient:
531
539
 
532
540
  url = f"/projects/columns/cards/{card_id}/moves"
533
541
 
534
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
535
-
536
- if not kwargs:
537
- kwargs = UNSET
542
+ headers = {
543
+ "Content-Type": "application/json",
544
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
545
+ **(headers or {}),
546
+ }
538
547
 
539
548
  json = kwargs if data is UNSET else data
540
- json = type_validate_python(ProjectsColumnsCardsCardIdMovesPostBody, json)
549
+ if self._github.config.rest_api_validate_body:
550
+ json = type_validate_python(ProjectsColumnsCardsCardIdMovesPostBody, json)
541
551
  json = model_dump(json) if isinstance(json, BaseModel) else json
542
552
 
543
553
  return self._github.request(
@@ -595,13 +605,15 @@ class ProjectsClient:
595
605
 
596
606
  url = f"/projects/columns/cards/{card_id}/moves"
597
607
 
598
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
599
-
600
- if not kwargs:
601
- kwargs = UNSET
608
+ headers = {
609
+ "Content-Type": "application/json",
610
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
611
+ **(headers or {}),
612
+ }
602
613
 
603
614
  json = kwargs if data is UNSET else data
604
- json = type_validate_python(ProjectsColumnsCardsCardIdMovesPostBody, json)
615
+ if self._github.config.rest_api_validate_body:
616
+ json = type_validate_python(ProjectsColumnsCardsCardIdMovesPostBody, json)
605
617
  json = model_dump(json) if isinstance(json, BaseModel) else json
606
618
 
607
619
  return await self._github.arequest(
@@ -751,13 +763,15 @@ class ProjectsClient:
751
763
 
752
764
  url = f"/projects/columns/{column_id}"
753
765
 
754
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
755
-
756
- if not kwargs:
757
- kwargs = UNSET
766
+ headers = {
767
+ "Content-Type": "application/json",
768
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
769
+ **(headers or {}),
770
+ }
758
771
 
759
772
  json = kwargs if data is UNSET else data
760
- json = type_validate_python(ProjectsColumnsColumnIdPatchBody, json)
773
+ if self._github.config.rest_api_validate_body:
774
+ json = type_validate_python(ProjectsColumnsColumnIdPatchBody, json)
761
775
  json = model_dump(json) if isinstance(json, BaseModel) else json
762
776
 
763
777
  return self._github.request(
@@ -805,13 +819,15 @@ class ProjectsClient:
805
819
 
806
820
  url = f"/projects/columns/{column_id}"
807
821
 
808
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
809
-
810
- if not kwargs:
811
- kwargs = UNSET
822
+ headers = {
823
+ "Content-Type": "application/json",
824
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
825
+ **(headers or {}),
826
+ }
812
827
 
813
828
  json = kwargs if data is UNSET else data
814
- json = type_validate_python(ProjectsColumnsColumnIdPatchBody, json)
829
+ if self._github.config.rest_api_validate_body:
830
+ json = type_validate_python(ProjectsColumnsColumnIdPatchBody, json)
815
831
  json = model_dump(json) if isinstance(json, BaseModel) else json
816
832
 
817
833
  return await self._github.arequest(
@@ -962,19 +978,21 @@ class ProjectsClient:
962
978
 
963
979
  url = f"/projects/columns/{column_id}/cards"
964
980
 
965
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
966
-
967
- if not kwargs:
968
- kwargs = UNSET
981
+ headers = {
982
+ "Content-Type": "application/json",
983
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
984
+ **(headers or {}),
985
+ }
969
986
 
970
987
  json = kwargs if data is UNSET else data
971
- json = type_validate_python(
972
- Union[
973
- ProjectsColumnsColumnIdCardsPostBodyOneof0,
974
- ProjectsColumnsColumnIdCardsPostBodyOneof1,
975
- ],
976
- json,
977
- )
988
+ if self._github.config.rest_api_validate_body:
989
+ json = type_validate_python(
990
+ Union[
991
+ ProjectsColumnsColumnIdCardsPostBodyOneof0,
992
+ ProjectsColumnsColumnIdCardsPostBodyOneof1,
993
+ ],
994
+ json,
995
+ )
978
996
  json = model_dump(json) if isinstance(json, BaseModel) else json
979
997
 
980
998
  return self._github.request(
@@ -1053,19 +1071,21 @@ class ProjectsClient:
1053
1071
 
1054
1072
  url = f"/projects/columns/{column_id}/cards"
1055
1073
 
1056
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1057
-
1058
- if not kwargs:
1059
- kwargs = UNSET
1074
+ headers = {
1075
+ "Content-Type": "application/json",
1076
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1077
+ **(headers or {}),
1078
+ }
1060
1079
 
1061
1080
  json = kwargs if data is UNSET else data
1062
- json = type_validate_python(
1063
- Union[
1064
- ProjectsColumnsColumnIdCardsPostBodyOneof0,
1065
- ProjectsColumnsColumnIdCardsPostBodyOneof1,
1066
- ],
1067
- json,
1068
- )
1081
+ if self._github.config.rest_api_validate_body:
1082
+ json = type_validate_python(
1083
+ Union[
1084
+ ProjectsColumnsColumnIdCardsPostBodyOneof0,
1085
+ ProjectsColumnsColumnIdCardsPostBodyOneof1,
1086
+ ],
1087
+ json,
1088
+ )
1069
1089
  json = model_dump(json) if isinstance(json, BaseModel) else json
1070
1090
 
1071
1091
  return await self._github.arequest(
@@ -1120,13 +1140,15 @@ class ProjectsClient:
1120
1140
 
1121
1141
  url = f"/projects/columns/{column_id}/moves"
1122
1142
 
1123
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1124
-
1125
- if not kwargs:
1126
- kwargs = UNSET
1143
+ headers = {
1144
+ "Content-Type": "application/json",
1145
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1146
+ **(headers or {}),
1147
+ }
1127
1148
 
1128
1149
  json = kwargs if data is UNSET else data
1129
- json = type_validate_python(ProjectsColumnsColumnIdMovesPostBody, json)
1150
+ if self._github.config.rest_api_validate_body:
1151
+ json = type_validate_python(ProjectsColumnsColumnIdMovesPostBody, json)
1130
1152
  json = model_dump(json) if isinstance(json, BaseModel) else json
1131
1153
 
1132
1154
  return self._github.request(
@@ -1180,13 +1202,15 @@ class ProjectsClient:
1180
1202
 
1181
1203
  url = f"/projects/columns/{column_id}/moves"
1182
1204
 
1183
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1184
-
1185
- if not kwargs:
1186
- kwargs = UNSET
1205
+ headers = {
1206
+ "Content-Type": "application/json",
1207
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1208
+ **(headers or {}),
1209
+ }
1187
1210
 
1188
1211
  json = kwargs if data is UNSET else data
1189
- json = type_validate_python(ProjectsColumnsColumnIdMovesPostBody, json)
1212
+ if self._github.config.rest_api_validate_body:
1213
+ json = type_validate_python(ProjectsColumnsColumnIdMovesPostBody, json)
1190
1214
  json = model_dump(json) if isinstance(json, BaseModel) else json
1191
1215
 
1192
1216
  return await self._github.arequest(
@@ -1349,13 +1373,15 @@ class ProjectsClient:
1349
1373
 
1350
1374
  url = f"/projects/{project_id}"
1351
1375
 
1352
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1353
-
1354
- if not kwargs:
1355
- kwargs = UNSET
1376
+ headers = {
1377
+ "Content-Type": "application/json",
1378
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1379
+ **(headers or {}),
1380
+ }
1356
1381
 
1357
1382
  json = kwargs if data is UNSET else data
1358
- json = type_validate_python(ProjectsProjectIdPatchBody, json)
1383
+ if self._github.config.rest_api_validate_body:
1384
+ json = type_validate_python(ProjectsProjectIdPatchBody, json)
1359
1385
  json = model_dump(json) if isinstance(json, BaseModel) else json
1360
1386
 
1361
1387
  return self._github.request(
@@ -1417,13 +1443,15 @@ class ProjectsClient:
1417
1443
 
1418
1444
  url = f"/projects/{project_id}"
1419
1445
 
1420
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1421
-
1422
- if not kwargs:
1423
- kwargs = UNSET
1446
+ headers = {
1447
+ "Content-Type": "application/json",
1448
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1449
+ **(headers or {}),
1450
+ }
1424
1451
 
1425
1452
  json = kwargs if data is UNSET else data
1426
- json = type_validate_python(ProjectsProjectIdPatchBody, json)
1453
+ if self._github.config.rest_api_validate_body:
1454
+ json = type_validate_python(ProjectsProjectIdPatchBody, json)
1427
1455
  json = model_dump(json) if isinstance(json, BaseModel) else json
1428
1456
 
1429
1457
  return await self._github.arequest(
@@ -1564,15 +1592,17 @@ class ProjectsClient:
1564
1592
 
1565
1593
  url = f"/projects/{project_id}/collaborators/{username}"
1566
1594
 
1567
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1568
-
1569
- if not kwargs:
1570
- kwargs = UNSET
1595
+ headers = {
1596
+ "Content-Type": "application/json",
1597
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1598
+ **(headers or {}),
1599
+ }
1571
1600
 
1572
1601
  json = kwargs if data is UNSET else data
1573
- json = type_validate_python(
1574
- Union[ProjectsProjectIdCollaboratorsUsernamePutBody, None], json
1575
- )
1602
+ if self._github.config.rest_api_validate_body:
1603
+ json = type_validate_python(
1604
+ Union[ProjectsProjectIdCollaboratorsUsernamePutBody, None], json
1605
+ )
1576
1606
  json = model_dump(json) if isinstance(json, BaseModel) else json
1577
1607
 
1578
1608
  return self._github.request(
@@ -1634,15 +1664,17 @@ class ProjectsClient:
1634
1664
 
1635
1665
  url = f"/projects/{project_id}/collaborators/{username}"
1636
1666
 
1637
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1638
-
1639
- if not kwargs:
1640
- kwargs = UNSET
1667
+ headers = {
1668
+ "Content-Type": "application/json",
1669
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1670
+ **(headers or {}),
1671
+ }
1641
1672
 
1642
1673
  json = kwargs if data is UNSET else data
1643
- json = type_validate_python(
1644
- Union[ProjectsProjectIdCollaboratorsUsernamePutBody, None], json
1645
- )
1674
+ if self._github.config.rest_api_validate_body:
1675
+ json = type_validate_python(
1676
+ Union[ProjectsProjectIdCollaboratorsUsernamePutBody, None], json
1677
+ )
1646
1678
  json = model_dump(json) if isinstance(json, BaseModel) else json
1647
1679
 
1648
1680
  return await self._github.arequest(
@@ -1876,13 +1908,15 @@ class ProjectsClient:
1876
1908
 
1877
1909
  url = f"/projects/{project_id}/columns"
1878
1910
 
1879
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1880
-
1881
- if not kwargs:
1882
- kwargs = UNSET
1911
+ headers = {
1912
+ "Content-Type": "application/json",
1913
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1914
+ **(headers or {}),
1915
+ }
1883
1916
 
1884
1917
  json = kwargs if data is UNSET else data
1885
- json = type_validate_python(ProjectsProjectIdColumnsPostBody, json)
1918
+ if self._github.config.rest_api_validate_body:
1919
+ json = type_validate_python(ProjectsProjectIdColumnsPostBody, json)
1886
1920
  json = model_dump(json) if isinstance(json, BaseModel) else json
1887
1921
 
1888
1922
  return self._github.request(
@@ -1936,13 +1970,15 @@ class ProjectsClient:
1936
1970
 
1937
1971
  url = f"/projects/{project_id}/columns"
1938
1972
 
1939
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1940
-
1941
- if not kwargs:
1942
- kwargs = UNSET
1973
+ headers = {
1974
+ "Content-Type": "application/json",
1975
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1976
+ **(headers or {}),
1977
+ }
1943
1978
 
1944
1979
  json = kwargs if data is UNSET else data
1945
- json = type_validate_python(ProjectsProjectIdColumnsPostBody, json)
1980
+ if self._github.config.rest_api_validate_body:
1981
+ json = type_validate_python(ProjectsProjectIdColumnsPostBody, json)
1946
1982
  json = model_dump(json) if isinstance(json, BaseModel) else json
1947
1983
 
1948
1984
  return await self._github.arequest(
@@ -2082,13 +2118,15 @@ class ProjectsClient:
2082
2118
 
2083
2119
  url = f"/repos/{owner}/{repo}/projects"
2084
2120
 
2085
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2086
-
2087
- if not kwargs:
2088
- kwargs = UNSET
2121
+ headers = {
2122
+ "Content-Type": "application/json",
2123
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2124
+ **(headers or {}),
2125
+ }
2089
2126
 
2090
2127
  json = kwargs if data is UNSET else data
2091
- json = type_validate_python(ReposOwnerRepoProjectsPostBody, json)
2128
+ if self._github.config.rest_api_validate_body:
2129
+ json = type_validate_python(ReposOwnerRepoProjectsPostBody, json)
2092
2130
  json = model_dump(json) if isinstance(json, BaseModel) else json
2093
2131
 
2094
2132
  return self._github.request(
@@ -2148,13 +2186,15 @@ class ProjectsClient:
2148
2186
 
2149
2187
  url = f"/repos/{owner}/{repo}/projects"
2150
2188
 
2151
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2152
-
2153
- if not kwargs:
2154
- kwargs = UNSET
2189
+ headers = {
2190
+ "Content-Type": "application/json",
2191
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2192
+ **(headers or {}),
2193
+ }
2155
2194
 
2156
2195
  json = kwargs if data is UNSET else data
2157
- json = type_validate_python(ReposOwnerRepoProjectsPostBody, json)
2196
+ if self._github.config.rest_api_validate_body:
2197
+ json = type_validate_python(ReposOwnerRepoProjectsPostBody, json)
2158
2198
  json = model_dump(json) if isinstance(json, BaseModel) else json
2159
2199
 
2160
2200
  return await self._github.arequest(
@@ -2208,13 +2248,15 @@ class ProjectsClient:
2208
2248
 
2209
2249
  url = "/user/projects"
2210
2250
 
2211
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2212
-
2213
- if not kwargs:
2214
- kwargs = UNSET
2251
+ headers = {
2252
+ "Content-Type": "application/json",
2253
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2254
+ **(headers or {}),
2255
+ }
2215
2256
 
2216
2257
  json = kwargs if data is UNSET else data
2217
- json = type_validate_python(UserProjectsPostBody, json)
2258
+ if self._github.config.rest_api_validate_body:
2259
+ json = type_validate_python(UserProjectsPostBody, json)
2218
2260
  json = model_dump(json) if isinstance(json, BaseModel) else json
2219
2261
 
2220
2262
  return self._github.request(
@@ -2266,13 +2308,15 @@ class ProjectsClient:
2266
2308
 
2267
2309
  url = "/user/projects"
2268
2310
 
2269
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2270
-
2271
- if not kwargs:
2272
- kwargs = UNSET
2311
+ headers = {
2312
+ "Content-Type": "application/json",
2313
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2314
+ **(headers or {}),
2315
+ }
2273
2316
 
2274
2317
  json = kwargs if data is UNSET else data
2275
- json = type_validate_python(UserProjectsPostBody, json)
2318
+ if self._github.config.rest_api_validate_body:
2319
+ json = type_validate_python(UserProjectsPostBody, json)
2276
2320
  json = model_dump(json) if isinstance(json, BaseModel) else json
2277
2321
 
2278
2322
  return await self._github.arequest(