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
@@ -215,13 +215,15 @@ class PullsClient:
215
215
 
216
216
  url = f"/repos/{owner}/{repo}/pulls"
217
217
 
218
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
219
-
220
- if not kwargs:
221
- kwargs = UNSET
218
+ headers = {
219
+ "Content-Type": "application/json",
220
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
221
+ **(headers or {}),
222
+ }
222
223
 
223
224
  json = kwargs if data is UNSET else data
224
- json = type_validate_python(ReposOwnerRepoPullsPostBody, json)
225
+ if self._github.config.rest_api_validate_body:
226
+ json = type_validate_python(ReposOwnerRepoPullsPostBody, json)
225
227
  json = model_dump(json) if isinstance(json, BaseModel) else json
226
228
 
227
229
  return self._github.request(
@@ -284,13 +286,15 @@ class PullsClient:
284
286
 
285
287
  url = f"/repos/{owner}/{repo}/pulls"
286
288
 
287
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
288
-
289
- if not kwargs:
290
- kwargs = UNSET
289
+ headers = {
290
+ "Content-Type": "application/json",
291
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
292
+ **(headers or {}),
293
+ }
291
294
 
292
295
  json = kwargs if data is UNSET else data
293
- json = type_validate_python(ReposOwnerRepoPullsPostBody, json)
296
+ if self._github.config.rest_api_validate_body:
297
+ json = type_validate_python(ReposOwnerRepoPullsPostBody, json)
294
298
  json = model_dump(json) if isinstance(json, BaseModel) else json
295
299
 
296
300
  return await self._github.arequest(
@@ -525,13 +529,17 @@ class PullsClient:
525
529
 
526
530
  url = f"/repos/{owner}/{repo}/pulls/comments/{comment_id}"
527
531
 
528
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
529
-
530
- if not kwargs:
531
- kwargs = UNSET
532
+ headers = {
533
+ "Content-Type": "application/json",
534
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
535
+ **(headers or {}),
536
+ }
532
537
 
533
538
  json = kwargs if data is UNSET else data
534
- json = type_validate_python(ReposOwnerRepoPullsCommentsCommentIdPatchBody, json)
539
+ if self._github.config.rest_api_validate_body:
540
+ json = type_validate_python(
541
+ ReposOwnerRepoPullsCommentsCommentIdPatchBody, json
542
+ )
535
543
  json = model_dump(json) if isinstance(json, BaseModel) else json
536
544
 
537
545
  return self._github.request(
@@ -584,13 +592,17 @@ class PullsClient:
584
592
 
585
593
  url = f"/repos/{owner}/{repo}/pulls/comments/{comment_id}"
586
594
 
587
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
588
-
589
- if not kwargs:
590
- kwargs = UNSET
595
+ headers = {
596
+ "Content-Type": "application/json",
597
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
598
+ **(headers or {}),
599
+ }
591
600
 
592
601
  json = kwargs if data is UNSET else data
593
- json = type_validate_python(ReposOwnerRepoPullsCommentsCommentIdPatchBody, json)
602
+ if self._github.config.rest_api_validate_body:
603
+ json = type_validate_python(
604
+ ReposOwnerRepoPullsCommentsCommentIdPatchBody, json
605
+ )
594
606
  json = model_dump(json) if isinstance(json, BaseModel) else json
595
607
 
596
608
  return await self._github.arequest(
@@ -715,13 +727,15 @@ class PullsClient:
715
727
 
716
728
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}"
717
729
 
718
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
719
-
720
- if not kwargs:
721
- kwargs = UNSET
730
+ headers = {
731
+ "Content-Type": "application/json",
732
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
733
+ **(headers or {}),
734
+ }
722
735
 
723
736
  json = kwargs if data is UNSET else data
724
- json = type_validate_python(ReposOwnerRepoPullsPullNumberPatchBody, json)
737
+ if self._github.config.rest_api_validate_body:
738
+ json = type_validate_python(ReposOwnerRepoPullsPullNumberPatchBody, json)
725
739
  json = model_dump(json) if isinstance(json, BaseModel) else json
726
740
 
727
741
  return self._github.request(
@@ -784,13 +798,15 @@ class PullsClient:
784
798
 
785
799
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}"
786
800
 
787
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
788
-
789
- if not kwargs:
790
- kwargs = UNSET
801
+ headers = {
802
+ "Content-Type": "application/json",
803
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
804
+ **(headers or {}),
805
+ }
791
806
 
792
807
  json = kwargs if data is UNSET else data
793
- json = type_validate_python(ReposOwnerRepoPullsPullNumberPatchBody, json)
808
+ if self._github.config.rest_api_validate_body:
809
+ json = type_validate_python(ReposOwnerRepoPullsPullNumberPatchBody, json)
794
810
  json = model_dump(json) if isinstance(json, BaseModel) else json
795
811
 
796
812
  return await self._github.arequest(
@@ -936,13 +952,17 @@ class PullsClient:
936
952
 
937
953
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/comments"
938
954
 
939
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
940
-
941
- if not kwargs:
942
- kwargs = UNSET
955
+ headers = {
956
+ "Content-Type": "application/json",
957
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
958
+ **(headers or {}),
959
+ }
943
960
 
944
961
  json = kwargs if data is UNSET else data
945
- json = type_validate_python(ReposOwnerRepoPullsPullNumberCommentsPostBody, json)
962
+ if self._github.config.rest_api_validate_body:
963
+ json = type_validate_python(
964
+ ReposOwnerRepoPullsPullNumberCommentsPostBody, json
965
+ )
946
966
  json = model_dump(json) if isinstance(json, BaseModel) else json
947
967
 
948
968
  return self._github.request(
@@ -1010,13 +1030,17 @@ class PullsClient:
1010
1030
 
1011
1031
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/comments"
1012
1032
 
1013
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1014
-
1015
- if not kwargs:
1016
- kwargs = UNSET
1033
+ headers = {
1034
+ "Content-Type": "application/json",
1035
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1036
+ **(headers or {}),
1037
+ }
1017
1038
 
1018
1039
  json = kwargs if data is UNSET else data
1019
- json = type_validate_python(ReposOwnerRepoPullsPullNumberCommentsPostBody, json)
1040
+ if self._github.config.rest_api_validate_body:
1041
+ json = type_validate_python(
1042
+ ReposOwnerRepoPullsPullNumberCommentsPostBody, json
1043
+ )
1020
1044
  json = model_dump(json) if isinstance(json, BaseModel) else json
1021
1045
 
1022
1046
  return await self._github.arequest(
@@ -1079,15 +1103,17 @@ class PullsClient:
1079
1103
 
1080
1104
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"
1081
1105
 
1082
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1083
-
1084
- if not kwargs:
1085
- kwargs = UNSET
1106
+ headers = {
1107
+ "Content-Type": "application/json",
1108
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1109
+ **(headers or {}),
1110
+ }
1086
1111
 
1087
1112
  json = kwargs if data is UNSET else data
1088
- json = type_validate_python(
1089
- ReposOwnerRepoPullsPullNumberCommentsCommentIdRepliesPostBody, json
1090
- )
1113
+ if self._github.config.rest_api_validate_body:
1114
+ json = type_validate_python(
1115
+ ReposOwnerRepoPullsPullNumberCommentsCommentIdRepliesPostBody, json
1116
+ )
1091
1117
  json = model_dump(json) if isinstance(json, BaseModel) else json
1092
1118
 
1093
1119
  return self._github.request(
@@ -1149,15 +1175,17 @@ class PullsClient:
1149
1175
 
1150
1176
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"
1151
1177
 
1152
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1153
-
1154
- if not kwargs:
1155
- kwargs = UNSET
1178
+ headers = {
1179
+ "Content-Type": "application/json",
1180
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1181
+ **(headers or {}),
1182
+ }
1156
1183
 
1157
1184
  json = kwargs if data is UNSET else data
1158
- json = type_validate_python(
1159
- ReposOwnerRepoPullsPullNumberCommentsCommentIdRepliesPostBody, json
1160
- )
1185
+ if self._github.config.rest_api_validate_body:
1186
+ json = type_validate_python(
1187
+ ReposOwnerRepoPullsPullNumberCommentsCommentIdRepliesPostBody, json
1188
+ )
1161
1189
  json = model_dump(json) if isinstance(json, BaseModel) else json
1162
1190
 
1163
1191
  return await self._github.arequest(
@@ -1420,15 +1448,17 @@ class PullsClient:
1420
1448
 
1421
1449
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/merge"
1422
1450
 
1423
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1424
-
1425
- if not kwargs:
1426
- kwargs = UNSET
1451
+ headers = {
1452
+ "Content-Type": "application/json",
1453
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1454
+ **(headers or {}),
1455
+ }
1427
1456
 
1428
1457
  json = kwargs if data is UNSET else data
1429
- json = type_validate_python(
1430
- Union[ReposOwnerRepoPullsPullNumberMergePutBody, None], json
1431
- )
1458
+ if self._github.config.rest_api_validate_body:
1459
+ json = type_validate_python(
1460
+ Union[ReposOwnerRepoPullsPullNumberMergePutBody, None], json
1461
+ )
1432
1462
  json = model_dump(json) if isinstance(json, BaseModel) else json
1433
1463
 
1434
1464
  return self._github.request(
@@ -1501,15 +1531,17 @@ class PullsClient:
1501
1531
 
1502
1532
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/merge"
1503
1533
 
1504
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1505
-
1506
- if not kwargs:
1507
- kwargs = UNSET
1534
+ headers = {
1535
+ "Content-Type": "application/json",
1536
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1537
+ **(headers or {}),
1538
+ }
1508
1539
 
1509
1540
  json = kwargs if data is UNSET else data
1510
- json = type_validate_python(
1511
- Union[ReposOwnerRepoPullsPullNumberMergePutBody, None], json
1512
- )
1541
+ if self._github.config.rest_api_validate_body:
1542
+ json = type_validate_python(
1543
+ Union[ReposOwnerRepoPullsPullNumberMergePutBody, None], json
1544
+ )
1513
1545
  json = model_dump(json) if isinstance(json, BaseModel) else json
1514
1546
 
1515
1547
  return await self._github.arequest(
@@ -1643,19 +1675,21 @@ class PullsClient:
1643
1675
 
1644
1676
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
1645
1677
 
1646
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1647
-
1648
- if not kwargs:
1649
- kwargs = UNSET
1678
+ headers = {
1679
+ "Content-Type": "application/json",
1680
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1681
+ **(headers or {}),
1682
+ }
1650
1683
 
1651
1684
  json = kwargs if data is UNSET else data
1652
- json = type_validate_python(
1653
- Union[
1654
- ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof0,
1655
- ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof1,
1656
- ],
1657
- json,
1658
- )
1685
+ if self._github.config.rest_api_validate_body:
1686
+ json = type_validate_python(
1687
+ Union[
1688
+ ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof0,
1689
+ ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof1,
1690
+ ],
1691
+ json,
1692
+ )
1659
1693
  json = model_dump(json) if isinstance(json, BaseModel) else json
1660
1694
 
1661
1695
  return self._github.request(
@@ -1739,19 +1773,21 @@ class PullsClient:
1739
1773
 
1740
1774
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
1741
1775
 
1742
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1743
-
1744
- if not kwargs:
1745
- kwargs = UNSET
1776
+ headers = {
1777
+ "Content-Type": "application/json",
1778
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1779
+ **(headers or {}),
1780
+ }
1746
1781
 
1747
1782
  json = kwargs if data is UNSET else data
1748
- json = type_validate_python(
1749
- Union[
1750
- ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof0,
1751
- ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof1,
1752
- ],
1753
- json,
1754
- )
1783
+ if self._github.config.rest_api_validate_body:
1784
+ json = type_validate_python(
1785
+ Union[
1786
+ ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof0,
1787
+ ReposOwnerRepoPullsPullNumberRequestedReviewersPostBodyAnyof1,
1788
+ ],
1789
+ json,
1790
+ )
1755
1791
  json = model_dump(json) if isinstance(json, BaseModel) else json
1756
1792
 
1757
1793
  return await self._github.arequest(
@@ -1811,15 +1847,17 @@ class PullsClient:
1811
1847
 
1812
1848
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
1813
1849
 
1814
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1815
-
1816
- if not kwargs:
1817
- kwargs = UNSET
1850
+ headers = {
1851
+ "Content-Type": "application/json",
1852
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1853
+ **(headers or {}),
1854
+ }
1818
1855
 
1819
1856
  json = kwargs if data is UNSET else data
1820
- json = type_validate_python(
1821
- ReposOwnerRepoPullsPullNumberRequestedReviewersDeleteBody, json
1822
- )
1857
+ if self._github.config.rest_api_validate_body:
1858
+ json = type_validate_python(
1859
+ ReposOwnerRepoPullsPullNumberRequestedReviewersDeleteBody, json
1860
+ )
1823
1861
  json = model_dump(json) if isinstance(json, BaseModel) else json
1824
1862
 
1825
1863
  return self._github.request(
@@ -1879,15 +1917,17 @@ class PullsClient:
1879
1917
 
1880
1918
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
1881
1919
 
1882
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1883
-
1884
- if not kwargs:
1885
- kwargs = UNSET
1920
+ headers = {
1921
+ "Content-Type": "application/json",
1922
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1923
+ **(headers or {}),
1924
+ }
1886
1925
 
1887
1926
  json = kwargs if data is UNSET else data
1888
- json = type_validate_python(
1889
- ReposOwnerRepoPullsPullNumberRequestedReviewersDeleteBody, json
1890
- )
1927
+ if self._github.config.rest_api_validate_body:
1928
+ json = type_validate_python(
1929
+ ReposOwnerRepoPullsPullNumberRequestedReviewersDeleteBody, json
1930
+ )
1891
1931
  json = model_dump(json) if isinstance(json, BaseModel) else json
1892
1932
 
1893
1933
  return await self._github.arequest(
@@ -2016,13 +2056,17 @@ class PullsClient:
2016
2056
 
2017
2057
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews"
2018
2058
 
2019
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2020
-
2021
- if not kwargs:
2022
- kwargs = UNSET
2059
+ headers = {
2060
+ "Content-Type": "application/json",
2061
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2062
+ **(headers or {}),
2063
+ }
2023
2064
 
2024
2065
  json = kwargs if data is UNSET else data
2025
- json = type_validate_python(ReposOwnerRepoPullsPullNumberReviewsPostBody, json)
2066
+ if self._github.config.rest_api_validate_body:
2067
+ json = type_validate_python(
2068
+ ReposOwnerRepoPullsPullNumberReviewsPostBody, json
2069
+ )
2026
2070
  json = model_dump(json) if isinstance(json, BaseModel) else json
2027
2071
 
2028
2072
  return self._github.request(
@@ -2086,13 +2130,17 @@ class PullsClient:
2086
2130
 
2087
2131
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews"
2088
2132
 
2089
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2090
-
2091
- if not kwargs:
2092
- kwargs = UNSET
2133
+ headers = {
2134
+ "Content-Type": "application/json",
2135
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2136
+ **(headers or {}),
2137
+ }
2093
2138
 
2094
2139
  json = kwargs if data is UNSET else data
2095
- json = type_validate_python(ReposOwnerRepoPullsPullNumberReviewsPostBody, json)
2140
+ if self._github.config.rest_api_validate_body:
2141
+ json = type_validate_python(
2142
+ ReposOwnerRepoPullsPullNumberReviewsPostBody, json
2143
+ )
2096
2144
  json = model_dump(json) if isinstance(json, BaseModel) else json
2097
2145
 
2098
2146
  return await self._github.arequest(
@@ -2207,15 +2255,17 @@ class PullsClient:
2207
2255
 
2208
2256
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
2209
2257
 
2210
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2211
-
2212
- if not kwargs:
2213
- kwargs = UNSET
2258
+ headers = {
2259
+ "Content-Type": "application/json",
2260
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2261
+ **(headers or {}),
2262
+ }
2214
2263
 
2215
2264
  json = kwargs if data is UNSET else data
2216
- json = type_validate_python(
2217
- ReposOwnerRepoPullsPullNumberReviewsReviewIdPutBody, json
2218
- )
2265
+ if self._github.config.rest_api_validate_body:
2266
+ json = type_validate_python(
2267
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdPutBody, json
2268
+ )
2219
2269
  json = model_dump(json) if isinstance(json, BaseModel) else json
2220
2270
 
2221
2271
  return self._github.request(
@@ -2275,15 +2325,17 @@ class PullsClient:
2275
2325
 
2276
2326
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
2277
2327
 
2278
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2279
-
2280
- if not kwargs:
2281
- kwargs = UNSET
2328
+ headers = {
2329
+ "Content-Type": "application/json",
2330
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2331
+ **(headers or {}),
2332
+ }
2282
2333
 
2283
2334
  json = kwargs if data is UNSET else data
2284
- json = type_validate_python(
2285
- ReposOwnerRepoPullsPullNumberReviewsReviewIdPutBody, json
2286
- )
2335
+ if self._github.config.rest_api_validate_body:
2336
+ json = type_validate_python(
2337
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdPutBody, json
2338
+ )
2287
2339
  json = model_dump(json) if isinstance(json, BaseModel) else json
2288
2340
 
2289
2341
  return await self._github.arequest(
@@ -2479,15 +2531,17 @@ class PullsClient:
2479
2531
  f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"
2480
2532
  )
2481
2533
 
2482
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2483
-
2484
- if not kwargs:
2485
- kwargs = UNSET
2534
+ headers = {
2535
+ "Content-Type": "application/json",
2536
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2537
+ **(headers or {}),
2538
+ }
2486
2539
 
2487
2540
  json = kwargs if data is UNSET else data
2488
- json = type_validate_python(
2489
- ReposOwnerRepoPullsPullNumberReviewsReviewIdDismissalsPutBody, json
2490
- )
2541
+ if self._github.config.rest_api_validate_body:
2542
+ json = type_validate_python(
2543
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdDismissalsPutBody, json
2544
+ )
2491
2545
  json = model_dump(json) if isinstance(json, BaseModel) else json
2492
2546
 
2493
2547
  return self._github.request(
@@ -2554,15 +2608,17 @@ class PullsClient:
2554
2608
  f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"
2555
2609
  )
2556
2610
 
2557
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2558
-
2559
- if not kwargs:
2560
- kwargs = UNSET
2611
+ headers = {
2612
+ "Content-Type": "application/json",
2613
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2614
+ **(headers or {}),
2615
+ }
2561
2616
 
2562
2617
  json = kwargs if data is UNSET else data
2563
- json = type_validate_python(
2564
- ReposOwnerRepoPullsPullNumberReviewsReviewIdDismissalsPutBody, json
2565
- )
2618
+ if self._github.config.rest_api_validate_body:
2619
+ json = type_validate_python(
2620
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdDismissalsPutBody, json
2621
+ )
2566
2622
  json = model_dump(json) if isinstance(json, BaseModel) else json
2567
2623
 
2568
2624
  return await self._github.arequest(
@@ -2627,15 +2683,17 @@ class PullsClient:
2627
2683
 
2628
2684
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"
2629
2685
 
2630
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2631
-
2632
- if not kwargs:
2633
- kwargs = UNSET
2686
+ headers = {
2687
+ "Content-Type": "application/json",
2688
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2689
+ **(headers or {}),
2690
+ }
2634
2691
 
2635
2692
  json = kwargs if data is UNSET else data
2636
- json = type_validate_python(
2637
- ReposOwnerRepoPullsPullNumberReviewsReviewIdEventsPostBody, json
2638
- )
2693
+ if self._github.config.rest_api_validate_body:
2694
+ json = type_validate_python(
2695
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdEventsPostBody, json
2696
+ )
2639
2697
  json = model_dump(json) if isinstance(json, BaseModel) else json
2640
2698
 
2641
2699
  return self._github.request(
@@ -2701,15 +2759,17 @@ class PullsClient:
2701
2759
 
2702
2760
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"
2703
2761
 
2704
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2705
-
2706
- if not kwargs:
2707
- kwargs = UNSET
2762
+ headers = {
2763
+ "Content-Type": "application/json",
2764
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2765
+ **(headers or {}),
2766
+ }
2708
2767
 
2709
2768
  json = kwargs if data is UNSET else data
2710
- json = type_validate_python(
2711
- ReposOwnerRepoPullsPullNumberReviewsReviewIdEventsPostBody, json
2712
- )
2769
+ if self._github.config.rest_api_validate_body:
2770
+ json = type_validate_python(
2771
+ ReposOwnerRepoPullsPullNumberReviewsReviewIdEventsPostBody, json
2772
+ )
2713
2773
  json = model_dump(json) if isinstance(json, BaseModel) else json
2714
2774
 
2715
2775
  return await self._github.arequest(
@@ -2775,15 +2835,17 @@ class PullsClient:
2775
2835
 
2776
2836
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch"
2777
2837
 
2778
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2779
-
2780
- if not kwargs:
2781
- kwargs = UNSET
2838
+ headers = {
2839
+ "Content-Type": "application/json",
2840
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2841
+ **(headers or {}),
2842
+ }
2782
2843
 
2783
2844
  json = kwargs if data is UNSET else data
2784
- json = type_validate_python(
2785
- Union[ReposOwnerRepoPullsPullNumberUpdateBranchPutBody, None], json
2786
- )
2845
+ if self._github.config.rest_api_validate_body:
2846
+ json = type_validate_python(
2847
+ Union[ReposOwnerRepoPullsPullNumberUpdateBranchPutBody, None], json
2848
+ )
2787
2849
  json = model_dump(json) if isinstance(json, BaseModel) else json
2788
2850
 
2789
2851
  return self._github.request(
@@ -2848,15 +2910,17 @@ class PullsClient:
2848
2910
 
2849
2911
  url = f"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch"
2850
2912
 
2851
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2852
-
2853
- if not kwargs:
2854
- kwargs = UNSET
2913
+ headers = {
2914
+ "Content-Type": "application/json",
2915
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2916
+ **(headers or {}),
2917
+ }
2855
2918
 
2856
2919
  json = kwargs if data is UNSET else data
2857
- json = type_validate_python(
2858
- Union[ReposOwnerRepoPullsPullNumberUpdateBranchPutBody, None], json
2859
- )
2920
+ if self._github.config.rest_api_validate_body:
2921
+ json = type_validate_python(
2922
+ Union[ReposOwnerRepoPullsPullNumberUpdateBranchPutBody, None], json
2923
+ )
2860
2924
  json = model_dump(json) if isinstance(json, BaseModel) else json
2861
2925
 
2862
2926
  return await self._github.arequest(