GitHubKit 0.11.13__py3-none-any.whl → 0.11.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of GitHubKit might be problematic. Click here for more details.

Files changed (66) 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_0088.py +0 -1
  5. githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
  6. githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
  7. githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
  8. githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
  9. githubkit/versions/ghec_v2022_11_28/rest/checks.py +84 -64
  10. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
  11. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
  12. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
  13. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
  14. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
  15. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
  16. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
  17. githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
  18. githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
  19. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
  20. githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
  21. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
  22. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
  23. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
  24. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
  25. githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
  26. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
  27. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
  28. githubkit/versions/ghec_v2022_11_28/rest/repos.py +1020 -766
  29. githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
  30. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
  31. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
  32. githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
  33. githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
  34. githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
  35. githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
  36. githubkit/versions/v2022_11_28/rest/actions.py +534 -386
  37. githubkit/versions/v2022_11_28/rest/activity.py +60 -44
  38. githubkit/versions/v2022_11_28/rest/apps.py +102 -74
  39. githubkit/versions/v2022_11_28/rest/checks.py +84 -64
  40. githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
  41. githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
  42. githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
  43. githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
  44. githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
  45. githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
  46. githubkit/versions/v2022_11_28/rest/gists.py +56 -40
  47. githubkit/versions/v2022_11_28/rest/git.py +84 -60
  48. githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
  49. githubkit/versions/v2022_11_28/rest/issues.py +250 -198
  50. githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
  51. githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
  52. githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
  53. githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
  54. githubkit/versions/v2022_11_28/rest/projects.py +170 -126
  55. githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
  56. githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
  57. githubkit/versions/v2022_11_28/rest/repos.py +1020 -766
  58. githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
  59. githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
  60. githubkit/versions/v2022_11_28/rest/teams.py +274 -204
  61. githubkit/versions/v2022_11_28/rest/users.py +154 -118
  62. githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
  63. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/METADATA +2 -1
  64. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/RECORD +66 -66
  65. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
  66. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
@@ -165,15 +165,17 @@ class EnterpriseAdminClient:
165
165
 
166
166
  url = f"/enterprises/{enterprise}/actions/permissions"
167
167
 
168
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
169
-
170
- if not kwargs:
171
- kwargs = UNSET
168
+ headers = {
169
+ "Content-Type": "application/json",
170
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
171
+ **(headers or {}),
172
+ }
172
173
 
173
174
  json = kwargs if data is UNSET else data
174
- json = type_validate_python(
175
- EnterprisesEnterpriseActionsPermissionsPutBody, json
176
- )
175
+ if self._github.config.rest_api_validate_body:
176
+ json = type_validate_python(
177
+ EnterprisesEnterpriseActionsPermissionsPutBody, json
178
+ )
177
179
  json = model_dump(json) if isinstance(json, BaseModel) else json
178
180
 
179
181
  return self._github.request(
@@ -217,15 +219,17 @@ class EnterpriseAdminClient:
217
219
 
218
220
  url = f"/enterprises/{enterprise}/actions/permissions"
219
221
 
220
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
221
-
222
- if not kwargs:
223
- kwargs = UNSET
222
+ headers = {
223
+ "Content-Type": "application/json",
224
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
225
+ **(headers or {}),
226
+ }
224
227
 
225
228
  json = kwargs if data is UNSET else data
226
- json = type_validate_python(
227
- EnterprisesEnterpriseActionsPermissionsPutBody, json
228
- )
229
+ if self._github.config.rest_api_validate_body:
230
+ json = type_validate_python(
231
+ EnterprisesEnterpriseActionsPermissionsPutBody, json
232
+ )
229
233
  json = model_dump(json) if isinstance(json, BaseModel) else json
230
234
 
231
235
  return await self._github.arequest(
@@ -332,15 +336,17 @@ class EnterpriseAdminClient:
332
336
 
333
337
  url = f"/enterprises/{enterprise}/actions/permissions/organizations"
334
338
 
335
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
336
-
337
- if not kwargs:
338
- kwargs = UNSET
339
+ headers = {
340
+ "Content-Type": "application/json",
341
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
342
+ **(headers or {}),
343
+ }
339
344
 
340
345
  json = kwargs if data is UNSET else data
341
- json = type_validate_python(
342
- EnterprisesEnterpriseActionsPermissionsOrganizationsPutBody, json
343
- )
346
+ if self._github.config.rest_api_validate_body:
347
+ json = type_validate_python(
348
+ EnterprisesEnterpriseActionsPermissionsOrganizationsPutBody, json
349
+ )
344
350
  json = model_dump(json) if isinstance(json, BaseModel) else json
345
351
 
346
352
  return self._github.request(
@@ -385,15 +391,17 @@ class EnterpriseAdminClient:
385
391
 
386
392
  url = f"/enterprises/{enterprise}/actions/permissions/organizations"
387
393
 
388
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
389
-
390
- if not kwargs:
391
- kwargs = UNSET
394
+ headers = {
395
+ "Content-Type": "application/json",
396
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
397
+ **(headers or {}),
398
+ }
392
399
 
393
400
  json = kwargs if data is UNSET else data
394
- json = type_validate_python(
395
- EnterprisesEnterpriseActionsPermissionsOrganizationsPutBody, json
396
- )
401
+ if self._github.config.rest_api_validate_body:
402
+ json = type_validate_python(
403
+ EnterprisesEnterpriseActionsPermissionsOrganizationsPutBody, json
404
+ )
397
405
  json = model_dump(json) if isinstance(json, BaseModel) else json
398
406
 
399
407
  return await self._github.arequest(
@@ -556,13 +564,15 @@ class EnterpriseAdminClient:
556
564
 
557
565
  url = f"/enterprises/{enterprise}/actions/permissions/selected-actions"
558
566
 
559
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
560
-
561
- if not kwargs:
562
- kwargs = UNSET
567
+ headers = {
568
+ "Content-Type": "application/json",
569
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
570
+ **(headers or {}),
571
+ }
563
572
 
564
573
  json = kwargs if data is UNSET else data
565
- json = type_validate_python(SelectedActions, json)
574
+ if self._github.config.rest_api_validate_body:
575
+ json = type_validate_python(SelectedActions, json)
566
576
  json = model_dump(json) if isinstance(json, BaseModel) else json
567
577
 
568
578
  return self._github.request(
@@ -607,13 +617,15 @@ class EnterpriseAdminClient:
607
617
 
608
618
  url = f"/enterprises/{enterprise}/actions/permissions/selected-actions"
609
619
 
610
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
611
-
612
- if not kwargs:
613
- kwargs = UNSET
620
+ headers = {
621
+ "Content-Type": "application/json",
622
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
623
+ **(headers or {}),
624
+ }
614
625
 
615
626
  json = kwargs if data is UNSET else data
616
- json = type_validate_python(SelectedActions, json)
627
+ if self._github.config.rest_api_validate_body:
628
+ json = type_validate_python(SelectedActions, json)
617
629
  json = model_dump(json) if isinstance(json, BaseModel) else json
618
630
 
619
631
  return await self._github.arequest(
@@ -727,15 +739,17 @@ class EnterpriseAdminClient:
727
739
 
728
740
  url = f"/enterprises/{enterprise}/actions/runner-groups"
729
741
 
730
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
731
-
732
- if not kwargs:
733
- kwargs = UNSET
742
+ headers = {
743
+ "Content-Type": "application/json",
744
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
745
+ **(headers or {}),
746
+ }
734
747
 
735
748
  json = kwargs if data is UNSET else data
736
- json = type_validate_python(
737
- EnterprisesEnterpriseActionsRunnerGroupsPostBody, json
738
- )
749
+ if self._github.config.rest_api_validate_body:
750
+ json = type_validate_python(
751
+ EnterprisesEnterpriseActionsRunnerGroupsPostBody, json
752
+ )
739
753
  json = model_dump(json) if isinstance(json, BaseModel) else json
740
754
 
741
755
  return self._github.request(
@@ -788,15 +802,17 @@ class EnterpriseAdminClient:
788
802
 
789
803
  url = f"/enterprises/{enterprise}/actions/runner-groups"
790
804
 
791
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
792
-
793
- if not kwargs:
794
- kwargs = UNSET
805
+ headers = {
806
+ "Content-Type": "application/json",
807
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
808
+ **(headers or {}),
809
+ }
795
810
 
796
811
  json = kwargs if data is UNSET else data
797
- json = type_validate_python(
798
- EnterprisesEnterpriseActionsRunnerGroupsPostBody, json
799
- )
812
+ if self._github.config.rest_api_validate_body:
813
+ json = type_validate_python(
814
+ EnterprisesEnterpriseActionsRunnerGroupsPostBody, json
815
+ )
800
816
  json = model_dump(json) if isinstance(json, BaseModel) else json
801
817
 
802
818
  return await self._github.arequest(
@@ -936,15 +952,17 @@ class EnterpriseAdminClient:
936
952
 
937
953
  url = f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}"
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(
946
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdPatchBody, json
947
- )
962
+ if self._github.config.rest_api_validate_body:
963
+ json = type_validate_python(
964
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdPatchBody, json
965
+ )
948
966
  json = model_dump(json) if isinstance(json, BaseModel) else json
949
967
 
950
968
  return self._github.request(
@@ -1002,15 +1020,17 @@ class EnterpriseAdminClient:
1002
1020
 
1003
1021
  url = f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}"
1004
1022
 
1005
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1006
-
1007
- if not kwargs:
1008
- kwargs = UNSET
1023
+ headers = {
1024
+ "Content-Type": "application/json",
1025
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1026
+ **(headers or {}),
1027
+ }
1009
1028
 
1010
1029
  json = kwargs if data is UNSET else data
1011
- json = type_validate_python(
1012
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdPatchBody, json
1013
- )
1030
+ if self._github.config.rest_api_validate_body:
1031
+ json = type_validate_python(
1032
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdPatchBody, json
1033
+ )
1014
1034
  json = model_dump(json) if isinstance(json, BaseModel) else json
1015
1035
 
1016
1036
  return await self._github.arequest(
@@ -1129,16 +1149,18 @@ class EnterpriseAdminClient:
1129
1149
 
1130
1150
  url = f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"
1131
1151
 
1132
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1133
-
1134
- if not kwargs:
1135
- kwargs = UNSET
1152
+ headers = {
1153
+ "Content-Type": "application/json",
1154
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1155
+ **(headers or {}),
1156
+ }
1136
1157
 
1137
1158
  json = kwargs if data is UNSET else data
1138
- json = type_validate_python(
1139
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdOrganizationsPutBody,
1140
- json,
1141
- )
1159
+ if self._github.config.rest_api_validate_body:
1160
+ json = type_validate_python(
1161
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdOrganizationsPutBody,
1162
+ json,
1163
+ )
1142
1164
  json = model_dump(json) if isinstance(json, BaseModel) else json
1143
1165
 
1144
1166
  return self._github.request(
@@ -1188,16 +1210,18 @@ class EnterpriseAdminClient:
1188
1210
 
1189
1211
  url = f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"
1190
1212
 
1191
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1192
-
1193
- if not kwargs:
1194
- kwargs = UNSET
1213
+ headers = {
1214
+ "Content-Type": "application/json",
1215
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1216
+ **(headers or {}),
1217
+ }
1195
1218
 
1196
1219
  json = kwargs if data is UNSET else data
1197
- json = type_validate_python(
1198
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdOrganizationsPutBody,
1199
- json,
1200
- )
1220
+ if self._github.config.rest_api_validate_body:
1221
+ json = type_validate_python(
1222
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdOrganizationsPutBody,
1223
+ json,
1224
+ )
1201
1225
  json = model_dump(json) if isinstance(json, BaseModel) else json
1202
1226
 
1203
1227
  return await self._github.arequest(
@@ -1401,15 +1425,18 @@ class EnterpriseAdminClient:
1401
1425
  f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"
1402
1426
  )
1403
1427
 
1404
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1405
-
1406
- if not kwargs:
1407
- kwargs = UNSET
1428
+ headers = {
1429
+ "Content-Type": "application/json",
1430
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1431
+ **(headers or {}),
1432
+ }
1408
1433
 
1409
1434
  json = kwargs if data is UNSET else data
1410
- json = type_validate_python(
1411
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdRunnersPutBody, json
1412
- )
1435
+ if self._github.config.rest_api_validate_body:
1436
+ json = type_validate_python(
1437
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdRunnersPutBody,
1438
+ json,
1439
+ )
1413
1440
  json = model_dump(json) if isinstance(json, BaseModel) else json
1414
1441
 
1415
1442
  return self._github.request(
@@ -1461,15 +1488,18 @@ class EnterpriseAdminClient:
1461
1488
  f"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"
1462
1489
  )
1463
1490
 
1464
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1465
-
1466
- if not kwargs:
1467
- kwargs = UNSET
1491
+ headers = {
1492
+ "Content-Type": "application/json",
1493
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1494
+ **(headers or {}),
1495
+ }
1468
1496
 
1469
1497
  json = kwargs if data is UNSET else data
1470
- json = type_validate_python(
1471
- EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdRunnersPutBody, json
1472
- )
1498
+ if self._github.config.rest_api_validate_body:
1499
+ json = type_validate_python(
1500
+ EnterprisesEnterpriseActionsRunnerGroupsRunnerGroupIdRunnersPutBody,
1501
+ json,
1502
+ )
1473
1503
  json = model_dump(json) if isinstance(json, BaseModel) else json
1474
1504
 
1475
1505
  return await self._github.arequest(
@@ -1932,15 +1962,17 @@ class EnterpriseAdminClient:
1932
1962
 
1933
1963
  url = f"/enterprises/{enterprise}/actions/runners/{runner_id}/labels"
1934
1964
 
1935
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1936
-
1937
- if not kwargs:
1938
- kwargs = UNSET
1965
+ headers = {
1966
+ "Content-Type": "application/json",
1967
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1968
+ **(headers or {}),
1969
+ }
1939
1970
 
1940
1971
  json = kwargs if data is UNSET else data
1941
- json = type_validate_python(
1942
- EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPutBody, json
1943
- )
1972
+ if self._github.config.rest_api_validate_body:
1973
+ json = type_validate_python(
1974
+ EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPutBody, json
1975
+ )
1944
1976
  json = model_dump(json) if isinstance(json, BaseModel) else json
1945
1977
 
1946
1978
  return self._github.request(
@@ -1998,15 +2030,17 @@ class EnterpriseAdminClient:
1998
2030
 
1999
2031
  url = f"/enterprises/{enterprise}/actions/runners/{runner_id}/labels"
2000
2032
 
2001
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2002
-
2003
- if not kwargs:
2004
- kwargs = UNSET
2033
+ headers = {
2034
+ "Content-Type": "application/json",
2035
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2036
+ **(headers or {}),
2037
+ }
2005
2038
 
2006
2039
  json = kwargs if data is UNSET else data
2007
- json = type_validate_python(
2008
- EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPutBody, json
2009
- )
2040
+ if self._github.config.rest_api_validate_body:
2041
+ json = type_validate_python(
2042
+ EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPutBody, json
2043
+ )
2010
2044
  json = model_dump(json) if isinstance(json, BaseModel) else json
2011
2045
 
2012
2046
  return await self._github.arequest(
@@ -2064,15 +2098,17 @@ class EnterpriseAdminClient:
2064
2098
 
2065
2099
  url = f"/enterprises/{enterprise}/actions/runners/{runner_id}/labels"
2066
2100
 
2067
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2068
-
2069
- if not kwargs:
2070
- kwargs = UNSET
2101
+ headers = {
2102
+ "Content-Type": "application/json",
2103
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2104
+ **(headers or {}),
2105
+ }
2071
2106
 
2072
2107
  json = kwargs if data is UNSET else data
2073
- json = type_validate_python(
2074
- EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPostBody, json
2075
- )
2108
+ if self._github.config.rest_api_validate_body:
2109
+ json = type_validate_python(
2110
+ EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPostBody, json
2111
+ )
2076
2112
  json = model_dump(json) if isinstance(json, BaseModel) else json
2077
2113
 
2078
2114
  return self._github.request(
@@ -2130,15 +2166,17 @@ class EnterpriseAdminClient:
2130
2166
 
2131
2167
  url = f"/enterprises/{enterprise}/actions/runners/{runner_id}/labels"
2132
2168
 
2133
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2134
-
2135
- if not kwargs:
2136
- kwargs = UNSET
2169
+ headers = {
2170
+ "Content-Type": "application/json",
2171
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2172
+ **(headers or {}),
2173
+ }
2137
2174
 
2138
2175
  json = kwargs if data is UNSET else data
2139
- json = type_validate_python(
2140
- EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPostBody, json
2141
- )
2176
+ if self._github.config.rest_api_validate_body:
2177
+ json = type_validate_python(
2178
+ EnterprisesEnterpriseActionsRunnersRunnerIdLabelsPostBody, json
2179
+ )
2142
2180
  json = model_dump(json) if isinstance(json, BaseModel) else json
2143
2181
 
2144
2182
  return await self._github.arequest(
@@ -2387,13 +2425,15 @@ class EnterpriseAdminClient:
2387
2425
 
2388
2426
  url = f"/enterprises/{enterprise}/announcement"
2389
2427
 
2390
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2391
-
2392
- if not kwargs:
2393
- kwargs = UNSET
2428
+ headers = {
2429
+ "Content-Type": "application/json",
2430
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2431
+ **(headers or {}),
2432
+ }
2394
2433
 
2395
2434
  json = kwargs if data is UNSET else data
2396
- json = type_validate_python(Announcement, json)
2435
+ if self._github.config.rest_api_validate_body:
2436
+ json = type_validate_python(Announcement, json)
2397
2437
  json = model_dump(json) if isinstance(json, BaseModel) else json
2398
2438
 
2399
2439
  return self._github.request(
@@ -2438,13 +2478,15 @@ class EnterpriseAdminClient:
2438
2478
 
2439
2479
  url = f"/enterprises/{enterprise}/announcement"
2440
2480
 
2441
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2442
-
2443
- if not kwargs:
2444
- kwargs = UNSET
2481
+ headers = {
2482
+ "Content-Type": "application/json",
2483
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2484
+ **(headers or {}),
2485
+ }
2445
2486
 
2446
2487
  json = kwargs if data is UNSET else data
2447
- json = type_validate_python(Announcement, json)
2488
+ if self._github.config.rest_api_validate_body:
2489
+ json = type_validate_python(Announcement, json)
2448
2490
  json = model_dump(json) if isinstance(json, BaseModel) else json
2449
2491
 
2450
2492
  return await self._github.arequest(
@@ -2635,15 +2677,17 @@ class EnterpriseAdminClient:
2635
2677
 
2636
2678
  url = f"/enterprises/{enterprise}/code_security_and_analysis"
2637
2679
 
2638
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2639
-
2640
- if not kwargs:
2641
- kwargs = UNSET
2680
+ headers = {
2681
+ "Content-Type": "application/json",
2682
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2683
+ **(headers or {}),
2684
+ }
2642
2685
 
2643
2686
  json = kwargs if data is UNSET else data
2644
- json = type_validate_python(
2645
- EnterprisesEnterpriseCodeSecurityAndAnalysisPatchBody, json
2646
- )
2687
+ if self._github.config.rest_api_validate_body:
2688
+ json = type_validate_python(
2689
+ EnterprisesEnterpriseCodeSecurityAndAnalysisPatchBody, json
2690
+ )
2647
2691
  json = model_dump(json) if isinstance(json, BaseModel) else json
2648
2692
 
2649
2693
  return self._github.request(
@@ -2706,15 +2750,17 @@ class EnterpriseAdminClient:
2706
2750
 
2707
2751
  url = f"/enterprises/{enterprise}/code_security_and_analysis"
2708
2752
 
2709
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2710
-
2711
- if not kwargs:
2712
- kwargs = UNSET
2753
+ headers = {
2754
+ "Content-Type": "application/json",
2755
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2756
+ **(headers or {}),
2757
+ }
2713
2758
 
2714
2759
  json = kwargs if data is UNSET else data
2715
- json = type_validate_python(
2716
- EnterprisesEnterpriseCodeSecurityAndAnalysisPatchBody, json
2717
- )
2760
+ if self._github.config.rest_api_validate_body:
2761
+ json = type_validate_python(
2762
+ EnterprisesEnterpriseCodeSecurityAndAnalysisPatchBody, json
2763
+ )
2718
2764
  json = model_dump(json) if isinstance(json, BaseModel) else json
2719
2765
 
2720
2766
  return await self._github.arequest(
@@ -3003,13 +3049,15 @@ class EnterpriseAdminClient:
3003
3049
 
3004
3050
  url = f"/scim/v2/enterprises/{enterprise}/Groups"
3005
3051
 
3006
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3007
-
3008
- if not kwargs:
3009
- kwargs = UNSET
3052
+ headers = {
3053
+ "Content-Type": "application/json",
3054
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3055
+ **(headers or {}),
3056
+ }
3010
3057
 
3011
3058
  json = kwargs if data is UNSET else data
3012
- json = type_validate_python(Group, json)
3059
+ if self._github.config.rest_api_validate_body:
3060
+ json = type_validate_python(Group, json)
3013
3061
  json = model_dump(json) if isinstance(json, BaseModel) else json
3014
3062
 
3015
3063
  return self._github.request(
@@ -3061,13 +3109,15 @@ class EnterpriseAdminClient:
3061
3109
 
3062
3110
  url = f"/scim/v2/enterprises/{enterprise}/Groups"
3063
3111
 
3064
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3065
-
3066
- if not kwargs:
3067
- kwargs = UNSET
3112
+ headers = {
3113
+ "Content-Type": "application/json",
3114
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3115
+ **(headers or {}),
3116
+ }
3068
3117
 
3069
3118
  json = kwargs if data is UNSET else data
3070
- json = type_validate_python(Group, json)
3119
+ if self._github.config.rest_api_validate_body:
3120
+ json = type_validate_python(Group, json)
3071
3121
  json = model_dump(json) if isinstance(json, BaseModel) else json
3072
3122
 
3073
3123
  return await self._github.arequest(
@@ -3190,13 +3240,15 @@ class EnterpriseAdminClient:
3190
3240
 
3191
3241
  url = f"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}"
3192
3242
 
3193
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3194
-
3195
- if not kwargs:
3196
- kwargs = UNSET
3243
+ headers = {
3244
+ "Content-Type": "application/json",
3245
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3246
+ **(headers or {}),
3247
+ }
3197
3248
 
3198
3249
  json = kwargs if data is UNSET else data
3199
- json = type_validate_python(Group, json)
3250
+ if self._github.config.rest_api_validate_body:
3251
+ json = type_validate_python(Group, json)
3200
3252
  json = model_dump(json) if isinstance(json, BaseModel) else json
3201
3253
 
3202
3254
  return self._github.request(
@@ -3252,13 +3304,15 @@ class EnterpriseAdminClient:
3252
3304
 
3253
3305
  url = f"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}"
3254
3306
 
3255
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3256
-
3257
- if not kwargs:
3258
- kwargs = UNSET
3307
+ headers = {
3308
+ "Content-Type": "application/json",
3309
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3310
+ **(headers or {}),
3311
+ }
3259
3312
 
3260
3313
  json = kwargs if data is UNSET else data
3261
- json = type_validate_python(Group, json)
3314
+ if self._github.config.rest_api_validate_body:
3315
+ json = type_validate_python(Group, json)
3262
3316
  json = model_dump(json) if isinstance(json, BaseModel) else json
3263
3317
 
3264
3318
  return await self._github.arequest(
@@ -3366,13 +3420,15 @@ class EnterpriseAdminClient:
3366
3420
 
3367
3421
  url = f"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}"
3368
3422
 
3369
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3370
-
3371
- if not kwargs:
3372
- kwargs = UNSET
3423
+ headers = {
3424
+ "Content-Type": "application/json",
3425
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3426
+ **(headers or {}),
3427
+ }
3373
3428
 
3374
3429
  json = kwargs if data is UNSET else data
3375
- json = type_validate_python(PatchSchema, json)
3430
+ if self._github.config.rest_api_validate_body:
3431
+ json = type_validate_python(PatchSchema, json)
3376
3432
  json = model_dump(json) if isinstance(json, BaseModel) else json
3377
3433
 
3378
3434
  return self._github.request(
@@ -3425,13 +3481,15 @@ class EnterpriseAdminClient:
3425
3481
 
3426
3482
  url = f"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}"
3427
3483
 
3428
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3429
-
3430
- if not kwargs:
3431
- kwargs = UNSET
3484
+ headers = {
3485
+ "Content-Type": "application/json",
3486
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3487
+ **(headers or {}),
3488
+ }
3432
3489
 
3433
3490
  json = kwargs if data is UNSET else data
3434
- json = type_validate_python(PatchSchema, json)
3491
+ if self._github.config.rest_api_validate_body:
3492
+ json = type_validate_python(PatchSchema, json)
3435
3493
  json = model_dump(json) if isinstance(json, BaseModel) else json
3436
3494
 
3437
3495
  return await self._github.arequest(
@@ -3559,13 +3617,15 @@ class EnterpriseAdminClient:
3559
3617
 
3560
3618
  url = f"/scim/v2/enterprises/{enterprise}/Users"
3561
3619
 
3562
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3563
-
3564
- if not kwargs:
3565
- kwargs = UNSET
3620
+ headers = {
3621
+ "Content-Type": "application/json",
3622
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3623
+ **(headers or {}),
3624
+ }
3566
3625
 
3567
3626
  json = kwargs if data is UNSET else data
3568
- json = type_validate_python(User, json)
3627
+ if self._github.config.rest_api_validate_body:
3628
+ json = type_validate_python(User, json)
3569
3629
  json = model_dump(json) if isinstance(json, BaseModel) else json
3570
3630
 
3571
3631
  return self._github.request(
@@ -3621,13 +3681,15 @@ class EnterpriseAdminClient:
3621
3681
 
3622
3682
  url = f"/scim/v2/enterprises/{enterprise}/Users"
3623
3683
 
3624
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3625
-
3626
- if not kwargs:
3627
- kwargs = UNSET
3684
+ headers = {
3685
+ "Content-Type": "application/json",
3686
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3687
+ **(headers or {}),
3688
+ }
3628
3689
 
3629
3690
  json = kwargs if data is UNSET else data
3630
- json = type_validate_python(User, json)
3691
+ if self._github.config.rest_api_validate_body:
3692
+ json = type_validate_python(User, json)
3631
3693
  json = model_dump(json) if isinstance(json, BaseModel) else json
3632
3694
 
3633
3695
  return await self._github.arequest(
@@ -3742,13 +3804,15 @@ class EnterpriseAdminClient:
3742
3804
 
3743
3805
  url = f"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}"
3744
3806
 
3745
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3746
-
3747
- if not kwargs:
3748
- kwargs = UNSET
3807
+ headers = {
3808
+ "Content-Type": "application/json",
3809
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3810
+ **(headers or {}),
3811
+ }
3749
3812
 
3750
3813
  json = kwargs if data is UNSET else data
3751
- json = type_validate_python(User, json)
3814
+ if self._github.config.rest_api_validate_body:
3815
+ json = type_validate_python(User, json)
3752
3816
  json = model_dump(json) if isinstance(json, BaseModel) else json
3753
3817
 
3754
3818
  return self._github.request(
@@ -3808,13 +3872,15 @@ class EnterpriseAdminClient:
3808
3872
 
3809
3873
  url = f"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}"
3810
3874
 
3811
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3812
-
3813
- if not kwargs:
3814
- kwargs = UNSET
3875
+ headers = {
3876
+ "Content-Type": "application/json",
3877
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3878
+ **(headers or {}),
3879
+ }
3815
3880
 
3816
3881
  json = kwargs if data is UNSET else data
3817
- json = type_validate_python(User, json)
3882
+ if self._github.config.rest_api_validate_body:
3883
+ json = type_validate_python(User, json)
3818
3884
  json = model_dump(json) if isinstance(json, BaseModel) else json
3819
3885
 
3820
3886
  return await self._github.arequest(
@@ -3927,13 +3993,15 @@ class EnterpriseAdminClient:
3927
3993
 
3928
3994
  url = f"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}"
3929
3995
 
3930
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3931
-
3932
- if not kwargs:
3933
- kwargs = UNSET
3996
+ headers = {
3997
+ "Content-Type": "application/json",
3998
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3999
+ **(headers or {}),
4000
+ }
3934
4001
 
3935
4002
  json = kwargs if data is UNSET else data
3936
- json = type_validate_python(PatchSchema, json)
4003
+ if self._github.config.rest_api_validate_body:
4004
+ json = type_validate_python(PatchSchema, json)
3937
4005
  json = model_dump(json) if isinstance(json, BaseModel) else json
3938
4006
 
3939
4007
  return self._github.request(
@@ -3992,13 +4060,15 @@ class EnterpriseAdminClient:
3992
4060
 
3993
4061
  url = f"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}"
3994
4062
 
3995
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3996
-
3997
- if not kwargs:
3998
- kwargs = UNSET
4063
+ headers = {
4064
+ "Content-Type": "application/json",
4065
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4066
+ **(headers or {}),
4067
+ }
3999
4068
 
4000
4069
  json = kwargs if data is UNSET else data
4001
- json = type_validate_python(PatchSchema, json)
4070
+ if self._github.config.rest_api_validate_body:
4071
+ json = type_validate_python(PatchSchema, json)
4002
4072
  json = model_dump(json) if isinstance(json, BaseModel) else json
4003
4073
 
4004
4074
  return await self._github.arequest(