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
@@ -306,13 +306,15 @@ class ActionsClient:
306
306
 
307
307
  url = f"/orgs/{org}/actions/permissions"
308
308
 
309
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
310
-
311
- if not kwargs:
312
- kwargs = UNSET
309
+ headers = {
310
+ "Content-Type": "application/json",
311
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
312
+ **(headers or {}),
313
+ }
313
314
 
314
315
  json = kwargs if data is UNSET else data
315
- json = type_validate_python(OrgsOrgActionsPermissionsPutBody, json)
316
+ if self._github.config.rest_api_validate_body:
317
+ json = type_validate_python(OrgsOrgActionsPermissionsPutBody, json)
316
318
  json = model_dump(json) if isinstance(json, BaseModel) else json
317
319
 
318
320
  return self._github.request(
@@ -356,13 +358,15 @@ class ActionsClient:
356
358
 
357
359
  url = f"/orgs/{org}/actions/permissions"
358
360
 
359
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
360
-
361
- if not kwargs:
362
- kwargs = UNSET
361
+ headers = {
362
+ "Content-Type": "application/json",
363
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
364
+ **(headers or {}),
365
+ }
363
366
 
364
367
  json = kwargs if data is UNSET else data
365
- json = type_validate_python(OrgsOrgActionsPermissionsPutBody, json)
368
+ if self._github.config.rest_api_validate_body:
369
+ json = type_validate_python(OrgsOrgActionsPermissionsPutBody, json)
366
370
  json = model_dump(json) if isinstance(json, BaseModel) else json
367
371
 
368
372
  return await self._github.arequest(
@@ -463,13 +467,17 @@ class ActionsClient:
463
467
 
464
468
  url = f"/orgs/{org}/actions/permissions/repositories"
465
469
 
466
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
467
-
468
- if not kwargs:
469
- kwargs = UNSET
470
+ headers = {
471
+ "Content-Type": "application/json",
472
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
473
+ **(headers or {}),
474
+ }
470
475
 
471
476
  json = kwargs if data is UNSET else data
472
- json = type_validate_python(OrgsOrgActionsPermissionsRepositoriesPutBody, json)
477
+ if self._github.config.rest_api_validate_body:
478
+ json = type_validate_python(
479
+ OrgsOrgActionsPermissionsRepositoriesPutBody, json
480
+ )
473
481
  json = model_dump(json) if isinstance(json, BaseModel) else json
474
482
 
475
483
  return self._github.request(
@@ -512,13 +520,17 @@ class ActionsClient:
512
520
 
513
521
  url = f"/orgs/{org}/actions/permissions/repositories"
514
522
 
515
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
516
-
517
- if not kwargs:
518
- kwargs = UNSET
523
+ headers = {
524
+ "Content-Type": "application/json",
525
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
526
+ **(headers or {}),
527
+ }
519
528
 
520
529
  json = kwargs if data is UNSET else data
521
- json = type_validate_python(OrgsOrgActionsPermissionsRepositoriesPutBody, json)
530
+ if self._github.config.rest_api_validate_body:
531
+ json = type_validate_python(
532
+ OrgsOrgActionsPermissionsRepositoriesPutBody, json
533
+ )
522
534
  json = model_dump(json) if isinstance(json, BaseModel) else json
523
535
 
524
536
  return await self._github.arequest(
@@ -681,13 +693,15 @@ class ActionsClient:
681
693
 
682
694
  url = f"/orgs/{org}/actions/permissions/selected-actions"
683
695
 
684
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
685
-
686
- if not kwargs:
687
- kwargs = UNSET
696
+ headers = {
697
+ "Content-Type": "application/json",
698
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
699
+ **(headers or {}),
700
+ }
688
701
 
689
702
  json = kwargs if data is UNSET else data
690
- json = type_validate_python(SelectedActions, json)
703
+ if self._github.config.rest_api_validate_body:
704
+ json = type_validate_python(SelectedActions, json)
691
705
  json = model_dump(json) if isinstance(json, BaseModel) else json
692
706
 
693
707
  return self._github.request(
@@ -732,13 +746,15 @@ class ActionsClient:
732
746
 
733
747
  url = f"/orgs/{org}/actions/permissions/selected-actions"
734
748
 
735
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
736
-
737
- if not kwargs:
738
- kwargs = UNSET
749
+ headers = {
750
+ "Content-Type": "application/json",
751
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
752
+ **(headers or {}),
753
+ }
739
754
 
740
755
  json = kwargs if data is UNSET else data
741
- json = type_validate_python(SelectedActions, json)
756
+ if self._github.config.rest_api_validate_body:
757
+ json = type_validate_python(SelectedActions, json)
742
758
  json = model_dump(json) if isinstance(json, BaseModel) else json
743
759
 
744
760
  return await self._github.arequest(
@@ -824,13 +840,15 @@ class ActionsClient:
824
840
 
825
841
  url = f"/orgs/{org}/actions/permissions/workflow"
826
842
 
827
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
828
-
829
- if not kwargs:
830
- kwargs = UNSET
843
+ headers = {
844
+ "Content-Type": "application/json",
845
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
846
+ **(headers or {}),
847
+ }
831
848
 
832
849
  json = kwargs if data is UNSET else data
833
- json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
850
+ if self._github.config.rest_api_validate_body:
851
+ json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
834
852
  json = model_dump(json) if isinstance(json, BaseModel) else json
835
853
 
836
854
  return self._github.request(
@@ -874,13 +892,15 @@ class ActionsClient:
874
892
 
875
893
  url = f"/orgs/{org}/actions/permissions/workflow"
876
894
 
877
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
878
-
879
- if not kwargs:
880
- kwargs = UNSET
895
+ headers = {
896
+ "Content-Type": "application/json",
897
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
898
+ **(headers or {}),
899
+ }
881
900
 
882
901
  json = kwargs if data is UNSET else data
883
- json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
902
+ if self._github.config.rest_api_validate_body:
903
+ json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
884
904
  json = model_dump(json) if isinstance(json, BaseModel) else json
885
905
 
886
906
  return await self._github.arequest(
@@ -1039,15 +1059,17 @@ class ActionsClient:
1039
1059
 
1040
1060
  url = f"/orgs/{org}/actions/runners/generate-jitconfig"
1041
1061
 
1042
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1043
-
1044
- if not kwargs:
1045
- kwargs = UNSET
1062
+ headers = {
1063
+ "Content-Type": "application/json",
1064
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1065
+ **(headers or {}),
1066
+ }
1046
1067
 
1047
1068
  json = kwargs if data is UNSET else data
1048
- json = type_validate_python(
1049
- OrgsOrgActionsRunnersGenerateJitconfigPostBody, json
1050
- )
1069
+ if self._github.config.rest_api_validate_body:
1070
+ json = type_validate_python(
1071
+ OrgsOrgActionsRunnersGenerateJitconfigPostBody, json
1072
+ )
1051
1073
  json = model_dump(json) if isinstance(json, BaseModel) else json
1052
1074
 
1053
1075
  return self._github.request(
@@ -1103,15 +1125,17 @@ class ActionsClient:
1103
1125
 
1104
1126
  url = f"/orgs/{org}/actions/runners/generate-jitconfig"
1105
1127
 
1106
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1107
-
1108
- if not kwargs:
1109
- kwargs = UNSET
1128
+ headers = {
1129
+ "Content-Type": "application/json",
1130
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1131
+ **(headers or {}),
1132
+ }
1110
1133
 
1111
1134
  json = kwargs if data is UNSET else data
1112
- json = type_validate_python(
1113
- OrgsOrgActionsRunnersGenerateJitconfigPostBody, json
1114
- )
1135
+ if self._github.config.rest_api_validate_body:
1136
+ json = type_validate_python(
1137
+ OrgsOrgActionsRunnersGenerateJitconfigPostBody, json
1138
+ )
1115
1139
  json = model_dump(json) if isinstance(json, BaseModel) else json
1116
1140
 
1117
1141
  return await self._github.arequest(
@@ -1389,13 +1413,17 @@ class ActionsClient:
1389
1413
 
1390
1414
  url = f"/orgs/{org}/actions/runners/{runner_id}/labels"
1391
1415
 
1392
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1393
-
1394
- if not kwargs:
1395
- kwargs = UNSET
1416
+ headers = {
1417
+ "Content-Type": "application/json",
1418
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1419
+ **(headers or {}),
1420
+ }
1396
1421
 
1397
1422
  json = kwargs if data is UNSET else data
1398
- json = type_validate_python(OrgsOrgActionsRunnersRunnerIdLabelsPutBody, json)
1423
+ if self._github.config.rest_api_validate_body:
1424
+ json = type_validate_python(
1425
+ OrgsOrgActionsRunnersRunnerIdLabelsPutBody, json
1426
+ )
1399
1427
  json = model_dump(json) if isinstance(json, BaseModel) else json
1400
1428
 
1401
1429
  return self._github.request(
@@ -1451,13 +1479,17 @@ class ActionsClient:
1451
1479
 
1452
1480
  url = f"/orgs/{org}/actions/runners/{runner_id}/labels"
1453
1481
 
1454
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1455
-
1456
- if not kwargs:
1457
- kwargs = UNSET
1482
+ headers = {
1483
+ "Content-Type": "application/json",
1484
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1485
+ **(headers or {}),
1486
+ }
1458
1487
 
1459
1488
  json = kwargs if data is UNSET else data
1460
- json = type_validate_python(OrgsOrgActionsRunnersRunnerIdLabelsPutBody, json)
1489
+ if self._github.config.rest_api_validate_body:
1490
+ json = type_validate_python(
1491
+ OrgsOrgActionsRunnersRunnerIdLabelsPutBody, json
1492
+ )
1461
1493
  json = model_dump(json) if isinstance(json, BaseModel) else json
1462
1494
 
1463
1495
  return await self._github.arequest(
@@ -1513,13 +1545,17 @@ class ActionsClient:
1513
1545
 
1514
1546
  url = f"/orgs/{org}/actions/runners/{runner_id}/labels"
1515
1547
 
1516
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1517
-
1518
- if not kwargs:
1519
- kwargs = UNSET
1548
+ headers = {
1549
+ "Content-Type": "application/json",
1550
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1551
+ **(headers or {}),
1552
+ }
1520
1553
 
1521
1554
  json = kwargs if data is UNSET else data
1522
- json = type_validate_python(OrgsOrgActionsRunnersRunnerIdLabelsPostBody, json)
1555
+ if self._github.config.rest_api_validate_body:
1556
+ json = type_validate_python(
1557
+ OrgsOrgActionsRunnersRunnerIdLabelsPostBody, json
1558
+ )
1523
1559
  json = model_dump(json) if isinstance(json, BaseModel) else json
1524
1560
 
1525
1561
  return self._github.request(
@@ -1575,13 +1611,17 @@ class ActionsClient:
1575
1611
 
1576
1612
  url = f"/orgs/{org}/actions/runners/{runner_id}/labels"
1577
1613
 
1578
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1579
-
1580
- if not kwargs:
1581
- kwargs = UNSET
1614
+ headers = {
1615
+ "Content-Type": "application/json",
1616
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1617
+ **(headers or {}),
1618
+ }
1582
1619
 
1583
1620
  json = kwargs if data is UNSET else data
1584
- json = type_validate_python(OrgsOrgActionsRunnersRunnerIdLabelsPostBody, json)
1621
+ if self._github.config.rest_api_validate_body:
1622
+ json = type_validate_python(
1623
+ OrgsOrgActionsRunnersRunnerIdLabelsPostBody, json
1624
+ )
1585
1625
  json = model_dump(json) if isinstance(json, BaseModel) else json
1586
1626
 
1587
1627
  return await self._github.arequest(
@@ -1897,13 +1937,15 @@ class ActionsClient:
1897
1937
 
1898
1938
  url = f"/orgs/{org}/actions/secrets/{secret_name}"
1899
1939
 
1900
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1901
-
1902
- if not kwargs:
1903
- kwargs = UNSET
1940
+ headers = {
1941
+ "Content-Type": "application/json",
1942
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1943
+ **(headers or {}),
1944
+ }
1904
1945
 
1905
1946
  json = kwargs if data is UNSET else data
1906
- json = type_validate_python(OrgsOrgActionsSecretsSecretNamePutBody, json)
1947
+ if self._github.config.rest_api_validate_body:
1948
+ json = type_validate_python(OrgsOrgActionsSecretsSecretNamePutBody, json)
1907
1949
  json = model_dump(json) if isinstance(json, BaseModel) else json
1908
1950
 
1909
1951
  return self._github.request(
@@ -1953,13 +1995,15 @@ class ActionsClient:
1953
1995
 
1954
1996
  url = f"/orgs/{org}/actions/secrets/{secret_name}"
1955
1997
 
1956
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1957
-
1958
- if not kwargs:
1959
- kwargs = UNSET
1998
+ headers = {
1999
+ "Content-Type": "application/json",
2000
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2001
+ **(headers or {}),
2002
+ }
1960
2003
 
1961
2004
  json = kwargs if data is UNSET else data
1962
- json = type_validate_python(OrgsOrgActionsSecretsSecretNamePutBody, json)
2005
+ if self._github.config.rest_api_validate_body:
2006
+ json = type_validate_python(OrgsOrgActionsSecretsSecretNamePutBody, json)
1963
2007
  json = model_dump(json) if isinstance(json, BaseModel) else json
1964
2008
 
1965
2009
  return await self._github.arequest(
@@ -2104,15 +2148,17 @@ class ActionsClient:
2104
2148
 
2105
2149
  url = f"/orgs/{org}/actions/secrets/{secret_name}/repositories"
2106
2150
 
2107
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2108
-
2109
- if not kwargs:
2110
- kwargs = UNSET
2151
+ headers = {
2152
+ "Content-Type": "application/json",
2153
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2154
+ **(headers or {}),
2155
+ }
2111
2156
 
2112
2157
  json = kwargs if data is UNSET else data
2113
- json = type_validate_python(
2114
- OrgsOrgActionsSecretsSecretNameRepositoriesPutBody, json
2115
- )
2158
+ if self._github.config.rest_api_validate_body:
2159
+ json = type_validate_python(
2160
+ OrgsOrgActionsSecretsSecretNameRepositoriesPutBody, json
2161
+ )
2116
2162
  json = model_dump(json) if isinstance(json, BaseModel) else json
2117
2163
 
2118
2164
  return self._github.request(
@@ -2158,15 +2204,17 @@ class ActionsClient:
2158
2204
 
2159
2205
  url = f"/orgs/{org}/actions/secrets/{secret_name}/repositories"
2160
2206
 
2161
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2162
-
2163
- if not kwargs:
2164
- kwargs = UNSET
2207
+ headers = {
2208
+ "Content-Type": "application/json",
2209
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2210
+ **(headers or {}),
2211
+ }
2165
2212
 
2166
2213
  json = kwargs if data is UNSET else data
2167
- json = type_validate_python(
2168
- OrgsOrgActionsSecretsSecretNameRepositoriesPutBody, json
2169
- )
2214
+ if self._github.config.rest_api_validate_body:
2215
+ json = type_validate_python(
2216
+ OrgsOrgActionsSecretsSecretNameRepositoriesPutBody, json
2217
+ )
2170
2218
  json = model_dump(json) if isinstance(json, BaseModel) else json
2171
2219
 
2172
2220
  return await self._github.arequest(
@@ -2354,13 +2402,15 @@ class ActionsClient:
2354
2402
 
2355
2403
  url = f"/orgs/{org}/actions/variables"
2356
2404
 
2357
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2358
-
2359
- if not kwargs:
2360
- kwargs = UNSET
2405
+ headers = {
2406
+ "Content-Type": "application/json",
2407
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2408
+ **(headers or {}),
2409
+ }
2361
2410
 
2362
2411
  json = kwargs if data is UNSET else data
2363
- json = type_validate_python(OrgsOrgActionsVariablesPostBody, json)
2412
+ if self._github.config.rest_api_validate_body:
2413
+ json = type_validate_python(OrgsOrgActionsVariablesPostBody, json)
2364
2414
  json = model_dump(json) if isinstance(json, BaseModel) else json
2365
2415
 
2366
2416
  return self._github.request(
@@ -2407,13 +2457,15 @@ class ActionsClient:
2407
2457
 
2408
2458
  url = f"/orgs/{org}/actions/variables"
2409
2459
 
2410
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2411
-
2412
- if not kwargs:
2413
- kwargs = UNSET
2460
+ headers = {
2461
+ "Content-Type": "application/json",
2462
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2463
+ **(headers or {}),
2464
+ }
2414
2465
 
2415
2466
  json = kwargs if data is UNSET else data
2416
- json = type_validate_python(OrgsOrgActionsVariablesPostBody, json)
2467
+ if self._github.config.rest_api_validate_body:
2468
+ json = type_validate_python(OrgsOrgActionsVariablesPostBody, json)
2417
2469
  json = model_dump(json) if isinstance(json, BaseModel) else json
2418
2470
 
2419
2471
  return await self._github.arequest(
@@ -2544,13 +2596,15 @@ class ActionsClient:
2544
2596
 
2545
2597
  url = f"/orgs/{org}/actions/variables/{name}"
2546
2598
 
2547
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2548
-
2549
- if not kwargs:
2550
- kwargs = UNSET
2599
+ headers = {
2600
+ "Content-Type": "application/json",
2601
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2602
+ **(headers or {}),
2603
+ }
2551
2604
 
2552
2605
  json = kwargs if data is UNSET else data
2553
- json = type_validate_python(OrgsOrgActionsVariablesNamePatchBody, json)
2606
+ if self._github.config.rest_api_validate_body:
2607
+ json = type_validate_python(OrgsOrgActionsVariablesNamePatchBody, json)
2554
2608
  json = model_dump(json) if isinstance(json, BaseModel) else json
2555
2609
 
2556
2610
  return self._github.request(
@@ -2598,13 +2652,15 @@ class ActionsClient:
2598
2652
 
2599
2653
  url = f"/orgs/{org}/actions/variables/{name}"
2600
2654
 
2601
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2602
-
2603
- if not kwargs:
2604
- kwargs = UNSET
2655
+ headers = {
2656
+ "Content-Type": "application/json",
2657
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2658
+ **(headers or {}),
2659
+ }
2605
2660
 
2606
2661
  json = kwargs if data is UNSET else data
2607
- json = type_validate_python(OrgsOrgActionsVariablesNamePatchBody, json)
2662
+ if self._github.config.rest_api_validate_body:
2663
+ json = type_validate_python(OrgsOrgActionsVariablesNamePatchBody, json)
2608
2664
  json = model_dump(json) if isinstance(json, BaseModel) else json
2609
2665
 
2610
2666
  return await self._github.arequest(
@@ -2712,15 +2768,17 @@ class ActionsClient:
2712
2768
 
2713
2769
  url = f"/orgs/{org}/actions/variables/{name}/repositories"
2714
2770
 
2715
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2716
-
2717
- if not kwargs:
2718
- kwargs = UNSET
2771
+ headers = {
2772
+ "Content-Type": "application/json",
2773
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2774
+ **(headers or {}),
2775
+ }
2719
2776
 
2720
2777
  json = kwargs if data is UNSET else data
2721
- json = type_validate_python(
2722
- OrgsOrgActionsVariablesNameRepositoriesPutBody, json
2723
- )
2778
+ if self._github.config.rest_api_validate_body:
2779
+ json = type_validate_python(
2780
+ OrgsOrgActionsVariablesNameRepositoriesPutBody, json
2781
+ )
2724
2782
  json = model_dump(json) if isinstance(json, BaseModel) else json
2725
2783
 
2726
2784
  return self._github.request(
@@ -2767,15 +2825,17 @@ class ActionsClient:
2767
2825
 
2768
2826
  url = f"/orgs/{org}/actions/variables/{name}/repositories"
2769
2827
 
2770
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2771
-
2772
- if not kwargs:
2773
- kwargs = UNSET
2828
+ headers = {
2829
+ "Content-Type": "application/json",
2830
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2831
+ **(headers or {}),
2832
+ }
2774
2833
 
2775
2834
  json = kwargs if data is UNSET else data
2776
- json = type_validate_python(
2777
- OrgsOrgActionsVariablesNameRepositoriesPutBody, json
2778
- )
2835
+ if self._github.config.rest_api_validate_body:
2836
+ json = type_validate_python(
2837
+ OrgsOrgActionsVariablesNameRepositoriesPutBody, json
2838
+ )
2779
2839
  json = model_dump(json) if isinstance(json, BaseModel) else json
2780
2840
 
2781
2841
  return await self._github.arequest(
@@ -3431,15 +3491,17 @@ class ActionsClient:
3431
3491
 
3432
3492
  url = f"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"
3433
3493
 
3434
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3435
-
3436
- if not kwargs:
3437
- kwargs = UNSET
3494
+ headers = {
3495
+ "Content-Type": "application/json",
3496
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3497
+ **(headers or {}),
3498
+ }
3438
3499
 
3439
3500
  json = kwargs if data is UNSET else data
3440
- json = type_validate_python(
3441
- Union[ReposOwnerRepoActionsJobsJobIdRerunPostBody, None], json
3442
- )
3501
+ if self._github.config.rest_api_validate_body:
3502
+ json = type_validate_python(
3503
+ Union[ReposOwnerRepoActionsJobsJobIdRerunPostBody, None], json
3504
+ )
3443
3505
  json = model_dump(json) if isinstance(json, BaseModel) else json
3444
3506
 
3445
3507
  return self._github.request(
@@ -3502,15 +3564,17 @@ class ActionsClient:
3502
3564
 
3503
3565
  url = f"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"
3504
3566
 
3505
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3506
-
3507
- if not kwargs:
3508
- kwargs = UNSET
3567
+ headers = {
3568
+ "Content-Type": "application/json",
3569
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3570
+ **(headers or {}),
3571
+ }
3509
3572
 
3510
3573
  json = kwargs if data is UNSET else data
3511
- json = type_validate_python(
3512
- Union[ReposOwnerRepoActionsJobsJobIdRerunPostBody, None], json
3513
- )
3574
+ if self._github.config.rest_api_validate_body:
3575
+ json = type_validate_python(
3576
+ Union[ReposOwnerRepoActionsJobsJobIdRerunPostBody, None], json
3577
+ )
3514
3578
  json = model_dump(json) if isinstance(json, BaseModel) else json
3515
3579
 
3516
3580
  return await self._github.arequest(
@@ -3618,15 +3682,17 @@ class ActionsClient:
3618
3682
 
3619
3683
  url = f"/repos/{owner}/{repo}/actions/oidc/customization/sub"
3620
3684
 
3621
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3622
-
3623
- if not kwargs:
3624
- kwargs = UNSET
3685
+ headers = {
3686
+ "Content-Type": "application/json",
3687
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3688
+ **(headers or {}),
3689
+ }
3625
3690
 
3626
3691
  json = kwargs if data is UNSET else data
3627
- json = type_validate_python(
3628
- ReposOwnerRepoActionsOidcCustomizationSubPutBody, json
3629
- )
3692
+ if self._github.config.rest_api_validate_body:
3693
+ json = type_validate_python(
3694
+ ReposOwnerRepoActionsOidcCustomizationSubPutBody, json
3695
+ )
3630
3696
  json = model_dump(json) if isinstance(json, BaseModel) else json
3631
3697
 
3632
3698
  return self._github.request(
@@ -3684,15 +3750,17 @@ class ActionsClient:
3684
3750
 
3685
3751
  url = f"/repos/{owner}/{repo}/actions/oidc/customization/sub"
3686
3752
 
3687
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3688
-
3689
- if not kwargs:
3690
- kwargs = UNSET
3753
+ headers = {
3754
+ "Content-Type": "application/json",
3755
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3756
+ **(headers or {}),
3757
+ }
3691
3758
 
3692
3759
  json = kwargs if data is UNSET else data
3693
- json = type_validate_python(
3694
- ReposOwnerRepoActionsOidcCustomizationSubPutBody, json
3695
- )
3760
+ if self._github.config.rest_api_validate_body:
3761
+ json = type_validate_python(
3762
+ ReposOwnerRepoActionsOidcCustomizationSubPutBody, json
3763
+ )
3696
3764
  json = model_dump(json) if isinstance(json, BaseModel) else json
3697
3765
 
3698
3766
  return await self._github.arequest(
@@ -3909,13 +3977,15 @@ class ActionsClient:
3909
3977
 
3910
3978
  url = f"/repos/{owner}/{repo}/actions/permissions"
3911
3979
 
3912
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3913
-
3914
- if not kwargs:
3915
- kwargs = UNSET
3980
+ headers = {
3981
+ "Content-Type": "application/json",
3982
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3983
+ **(headers or {}),
3984
+ }
3916
3985
 
3917
3986
  json = kwargs if data is UNSET else data
3918
- json = type_validate_python(ReposOwnerRepoActionsPermissionsPutBody, json)
3987
+ if self._github.config.rest_api_validate_body:
3988
+ json = type_validate_python(ReposOwnerRepoActionsPermissionsPutBody, json)
3919
3989
  json = model_dump(json) if isinstance(json, BaseModel) else json
3920
3990
 
3921
3991
  return self._github.request(
@@ -3962,13 +4032,15 @@ class ActionsClient:
3962
4032
 
3963
4033
  url = f"/repos/{owner}/{repo}/actions/permissions"
3964
4034
 
3965
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3966
-
3967
- if not kwargs:
3968
- kwargs = UNSET
4035
+ headers = {
4036
+ "Content-Type": "application/json",
4037
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4038
+ **(headers or {}),
4039
+ }
3969
4040
 
3970
4041
  json = kwargs if data is UNSET else data
3971
- json = type_validate_python(ReposOwnerRepoActionsPermissionsPutBody, json)
4042
+ if self._github.config.rest_api_validate_body:
4043
+ json = type_validate_python(ReposOwnerRepoActionsPermissionsPutBody, json)
3972
4044
  json = model_dump(json) if isinstance(json, BaseModel) else json
3973
4045
 
3974
4046
  return await self._github.arequest(
@@ -4058,13 +4130,15 @@ class ActionsClient:
4058
4130
 
4059
4131
  url = f"/repos/{owner}/{repo}/actions/permissions/access"
4060
4132
 
4061
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4062
-
4063
- if not kwargs:
4064
- kwargs = UNSET
4133
+ headers = {
4134
+ "Content-Type": "application/json",
4135
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4136
+ **(headers or {}),
4137
+ }
4065
4138
 
4066
4139
  json = kwargs if data is UNSET else data
4067
- json = type_validate_python(ActionsWorkflowAccessToRepository, json)
4140
+ if self._github.config.rest_api_validate_body:
4141
+ json = type_validate_python(ActionsWorkflowAccessToRepository, json)
4068
4142
  json = model_dump(json) if isinstance(json, BaseModel) else json
4069
4143
 
4070
4144
  return self._github.request(
@@ -4110,13 +4184,15 @@ class ActionsClient:
4110
4184
 
4111
4185
  url = f"/repos/{owner}/{repo}/actions/permissions/access"
4112
4186
 
4113
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4114
-
4115
- if not kwargs:
4116
- kwargs = UNSET
4187
+ headers = {
4188
+ "Content-Type": "application/json",
4189
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4190
+ **(headers or {}),
4191
+ }
4117
4192
 
4118
4193
  json = kwargs if data is UNSET else data
4119
- json = type_validate_python(ActionsWorkflowAccessToRepository, json)
4194
+ if self._github.config.rest_api_validate_body:
4195
+ json = type_validate_python(ActionsWorkflowAccessToRepository, json)
4120
4196
  json = model_dump(json) if isinstance(json, BaseModel) else json
4121
4197
 
4122
4198
  return await self._github.arequest(
@@ -4208,13 +4284,15 @@ class ActionsClient:
4208
4284
 
4209
4285
  url = f"/repos/{owner}/{repo}/actions/permissions/selected-actions"
4210
4286
 
4211
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4212
-
4213
- if not kwargs:
4214
- kwargs = UNSET
4287
+ headers = {
4288
+ "Content-Type": "application/json",
4289
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4290
+ **(headers or {}),
4291
+ }
4215
4292
 
4216
4293
  json = kwargs if data is UNSET else data
4217
- json = type_validate_python(SelectedActions, json)
4294
+ if self._github.config.rest_api_validate_body:
4295
+ json = type_validate_python(SelectedActions, json)
4218
4296
  json = model_dump(json) if isinstance(json, BaseModel) else json
4219
4297
 
4220
4298
  return self._github.request(
@@ -4262,13 +4340,15 @@ class ActionsClient:
4262
4340
 
4263
4341
  url = f"/repos/{owner}/{repo}/actions/permissions/selected-actions"
4264
4342
 
4265
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4266
-
4267
- if not kwargs:
4268
- kwargs = UNSET
4343
+ headers = {
4344
+ "Content-Type": "application/json",
4345
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4346
+ **(headers or {}),
4347
+ }
4269
4348
 
4270
4349
  json = kwargs if data is UNSET else data
4271
- json = type_validate_python(SelectedActions, json)
4350
+ if self._github.config.rest_api_validate_body:
4351
+ json = type_validate_python(SelectedActions, json)
4272
4352
  json = model_dump(json) if isinstance(json, BaseModel) else json
4273
4353
 
4274
4354
  return await self._github.arequest(
@@ -4359,13 +4439,15 @@ class ActionsClient:
4359
4439
 
4360
4440
  url = f"/repos/{owner}/{repo}/actions/permissions/workflow"
4361
4441
 
4362
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4363
-
4364
- if not kwargs:
4365
- kwargs = UNSET
4442
+ headers = {
4443
+ "Content-Type": "application/json",
4444
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4445
+ **(headers or {}),
4446
+ }
4366
4447
 
4367
4448
  json = kwargs if data is UNSET else data
4368
- json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
4449
+ if self._github.config.rest_api_validate_body:
4450
+ json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
4369
4451
  json = model_dump(json) if isinstance(json, BaseModel) else json
4370
4452
 
4371
4453
  return self._github.request(
@@ -4413,13 +4495,15 @@ class ActionsClient:
4413
4495
 
4414
4496
  url = f"/repos/{owner}/{repo}/actions/permissions/workflow"
4415
4497
 
4416
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4417
-
4418
- if not kwargs:
4419
- kwargs = UNSET
4498
+ headers = {
4499
+ "Content-Type": "application/json",
4500
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4501
+ **(headers or {}),
4502
+ }
4420
4503
 
4421
4504
  json = kwargs if data is UNSET else data
4422
- json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
4505
+ if self._github.config.rest_api_validate_body:
4506
+ json = type_validate_python(ActionsSetDefaultWorkflowPermissions, json)
4423
4507
  json = model_dump(json) if isinstance(json, BaseModel) else json
4424
4508
 
4425
4509
  return await self._github.arequest(
@@ -4588,15 +4672,17 @@ class ActionsClient:
4588
4672
 
4589
4673
  url = f"/repos/{owner}/{repo}/actions/runners/generate-jitconfig"
4590
4674
 
4591
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4592
-
4593
- if not kwargs:
4594
- kwargs = UNSET
4675
+ headers = {
4676
+ "Content-Type": "application/json",
4677
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4678
+ **(headers or {}),
4679
+ }
4595
4680
 
4596
4681
  json = kwargs if data is UNSET else data
4597
- json = type_validate_python(
4598
- ReposOwnerRepoActionsRunnersGenerateJitconfigPostBody, json
4599
- )
4682
+ if self._github.config.rest_api_validate_body:
4683
+ json = type_validate_python(
4684
+ ReposOwnerRepoActionsRunnersGenerateJitconfigPostBody, json
4685
+ )
4600
4686
  json = model_dump(json) if isinstance(json, BaseModel) else json
4601
4687
 
4602
4688
  return self._github.request(
@@ -4657,15 +4743,17 @@ class ActionsClient:
4657
4743
 
4658
4744
  url = f"/repos/{owner}/{repo}/actions/runners/generate-jitconfig"
4659
4745
 
4660
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4661
-
4662
- if not kwargs:
4663
- kwargs = UNSET
4746
+ headers = {
4747
+ "Content-Type": "application/json",
4748
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
4749
+ **(headers or {}),
4750
+ }
4664
4751
 
4665
4752
  json = kwargs if data is UNSET else data
4666
- json = type_validate_python(
4667
- ReposOwnerRepoActionsRunnersGenerateJitconfigPostBody, json
4668
- )
4753
+ if self._github.config.rest_api_validate_body:
4754
+ json = type_validate_python(
4755
+ ReposOwnerRepoActionsRunnersGenerateJitconfigPostBody, json
4756
+ )
4669
4757
  json = model_dump(json) if isinstance(json, BaseModel) else json
4670
4758
 
4671
4759
  return await self._github.arequest(
@@ -4956,15 +5044,17 @@ class ActionsClient:
4956
5044
 
4957
5045
  url = f"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
4958
5046
 
4959
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
4960
-
4961
- if not kwargs:
4962
- kwargs = UNSET
5047
+ headers = {
5048
+ "Content-Type": "application/json",
5049
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5050
+ **(headers or {}),
5051
+ }
4963
5052
 
4964
5053
  json = kwargs if data is UNSET else data
4965
- json = type_validate_python(
4966
- ReposOwnerRepoActionsRunnersRunnerIdLabelsPutBody, json
4967
- )
5054
+ if self._github.config.rest_api_validate_body:
5055
+ json = type_validate_python(
5056
+ ReposOwnerRepoActionsRunnersRunnerIdLabelsPutBody, json
5057
+ )
4968
5058
  json = model_dump(json) if isinstance(json, BaseModel) else json
4969
5059
 
4970
5060
  return self._github.request(
@@ -5023,15 +5113,17 @@ class ActionsClient:
5023
5113
 
5024
5114
  url = f"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
5025
5115
 
5026
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5027
-
5028
- if not kwargs:
5029
- kwargs = UNSET
5116
+ headers = {
5117
+ "Content-Type": "application/json",
5118
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5119
+ **(headers or {}),
5120
+ }
5030
5121
 
5031
5122
  json = kwargs if data is UNSET else data
5032
- json = type_validate_python(
5033
- ReposOwnerRepoActionsRunnersRunnerIdLabelsPutBody, json
5034
- )
5123
+ if self._github.config.rest_api_validate_body:
5124
+ json = type_validate_python(
5125
+ ReposOwnerRepoActionsRunnersRunnerIdLabelsPutBody, json
5126
+ )
5035
5127
  json = model_dump(json) if isinstance(json, BaseModel) else json
5036
5128
 
5037
5129
  return await self._github.arequest(
@@ -5090,15 +5182,17 @@ class ActionsClient:
5090
5182
 
5091
5183
  url = f"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
5092
5184
 
5093
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5094
-
5095
- if not kwargs:
5096
- kwargs = UNSET
5185
+ headers = {
5186
+ "Content-Type": "application/json",
5187
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5188
+ **(headers or {}),
5189
+ }
5097
5190
 
5098
5191
  json = kwargs if data is UNSET else data
5099
- json = type_validate_python(
5100
- ReposOwnerRepoActionsRunnersRunnerIdLabelsPostBody, json
5101
- )
5192
+ if self._github.config.rest_api_validate_body:
5193
+ json = type_validate_python(
5194
+ ReposOwnerRepoActionsRunnersRunnerIdLabelsPostBody, json
5195
+ )
5102
5196
  json = model_dump(json) if isinstance(json, BaseModel) else json
5103
5197
 
5104
5198
  return self._github.request(
@@ -5157,15 +5251,17 @@ class ActionsClient:
5157
5251
 
5158
5252
  url = f"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
5159
5253
 
5160
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5161
-
5162
- if not kwargs:
5163
- kwargs = UNSET
5254
+ headers = {
5255
+ "Content-Type": "application/json",
5256
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
5257
+ **(headers or {}),
5258
+ }
5164
5259
 
5165
5260
  json = kwargs if data is UNSET else data
5166
- json = type_validate_python(
5167
- ReposOwnerRepoActionsRunnersRunnerIdLabelsPostBody, json
5168
- )
5261
+ if self._github.config.rest_api_validate_body:
5262
+ json = type_validate_python(
5263
+ ReposOwnerRepoActionsRunnersRunnerIdLabelsPostBody, json
5264
+ )
5169
5265
  json = model_dump(json) if isinstance(json, BaseModel) else json
5170
5266
 
5171
5267
  return await self._github.arequest(
@@ -5995,16 +6091,18 @@ class ActionsClient:
5995
6091
 
5996
6092
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"
5997
6093
 
5998
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
5999
-
6000
- if not kwargs:
6001
- kwargs = UNSET
6094
+ headers = {
6095
+ "Content-Type": "application/json",
6096
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6097
+ **(headers or {}),
6098
+ }
6002
6099
 
6003
6100
  json = kwargs if data is UNSET else data
6004
- json = type_validate_python(
6005
- Union[ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired],
6006
- json,
6007
- )
6101
+ if self._github.config.rest_api_validate_body:
6102
+ json = type_validate_python(
6103
+ Union[ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired],
6104
+ json,
6105
+ )
6008
6106
  json = model_dump(json) if isinstance(json, BaseModel) else json
6009
6107
 
6010
6108
  return self._github.request(
@@ -6079,16 +6177,18 @@ class ActionsClient:
6079
6177
 
6080
6178
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"
6081
6179
 
6082
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6083
-
6084
- if not kwargs:
6085
- kwargs = UNSET
6180
+ headers = {
6181
+ "Content-Type": "application/json",
6182
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6183
+ **(headers or {}),
6184
+ }
6086
6185
 
6087
6186
  json = kwargs if data is UNSET else data
6088
- json = type_validate_python(
6089
- Union[ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired],
6090
- json,
6091
- )
6187
+ if self._github.config.rest_api_validate_body:
6188
+ json = type_validate_python(
6189
+ Union[ReviewCustomGatesCommentRequired, ReviewCustomGatesStateRequired],
6190
+ json,
6191
+ )
6092
6192
  json = model_dump(json) if isinstance(json, BaseModel) else json
6093
6193
 
6094
6194
  return await self._github.arequest(
@@ -6406,15 +6506,17 @@ class ActionsClient:
6406
6506
 
6407
6507
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
6408
6508
 
6409
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6410
-
6411
- if not kwargs:
6412
- kwargs = UNSET
6509
+ headers = {
6510
+ "Content-Type": "application/json",
6511
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6512
+ **(headers or {}),
6513
+ }
6413
6514
 
6414
6515
  json = kwargs if data is UNSET else data
6415
- json = type_validate_python(
6416
- ReposOwnerRepoActionsRunsRunIdPendingDeploymentsPostBody, json
6417
- )
6516
+ if self._github.config.rest_api_validate_body:
6517
+ json = type_validate_python(
6518
+ ReposOwnerRepoActionsRunsRunIdPendingDeploymentsPostBody, json
6519
+ )
6418
6520
  json = model_dump(json) if isinstance(json, BaseModel) else json
6419
6521
 
6420
6522
  return self._github.request(
@@ -6473,15 +6575,17 @@ class ActionsClient:
6473
6575
 
6474
6576
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
6475
6577
 
6476
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6477
-
6478
- if not kwargs:
6479
- kwargs = UNSET
6578
+ headers = {
6579
+ "Content-Type": "application/json",
6580
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6581
+ **(headers or {}),
6582
+ }
6480
6583
 
6481
6584
  json = kwargs if data is UNSET else data
6482
- json = type_validate_python(
6483
- ReposOwnerRepoActionsRunsRunIdPendingDeploymentsPostBody, json
6484
- )
6585
+ if self._github.config.rest_api_validate_body:
6586
+ json = type_validate_python(
6587
+ ReposOwnerRepoActionsRunsRunIdPendingDeploymentsPostBody, json
6588
+ )
6485
6589
  json = model_dump(json) if isinstance(json, BaseModel) else json
6486
6590
 
6487
6591
  return await self._github.arequest(
@@ -6537,15 +6641,17 @@ class ActionsClient:
6537
6641
 
6538
6642
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun"
6539
6643
 
6540
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6541
-
6542
- if not kwargs:
6543
- kwargs = UNSET
6644
+ headers = {
6645
+ "Content-Type": "application/json",
6646
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6647
+ **(headers or {}),
6648
+ }
6544
6649
 
6545
6650
  json = kwargs if data is UNSET else data
6546
- json = type_validate_python(
6547
- Union[ReposOwnerRepoActionsRunsRunIdRerunPostBody, None], json
6548
- )
6651
+ if self._github.config.rest_api_validate_body:
6652
+ json = type_validate_python(
6653
+ Union[ReposOwnerRepoActionsRunsRunIdRerunPostBody, None], json
6654
+ )
6549
6655
  json = model_dump(json) if isinstance(json, BaseModel) else json
6550
6656
 
6551
6657
  return self._github.request(
@@ -6601,15 +6707,17 @@ class ActionsClient:
6601
6707
 
6602
6708
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun"
6603
6709
 
6604
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6605
-
6606
- if not kwargs:
6607
- kwargs = UNSET
6710
+ headers = {
6711
+ "Content-Type": "application/json",
6712
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6713
+ **(headers or {}),
6714
+ }
6608
6715
 
6609
6716
  json = kwargs if data is UNSET else data
6610
- json = type_validate_python(
6611
- Union[ReposOwnerRepoActionsRunsRunIdRerunPostBody, None], json
6612
- )
6717
+ if self._github.config.rest_api_validate_body:
6718
+ json = type_validate_python(
6719
+ Union[ReposOwnerRepoActionsRunsRunIdRerunPostBody, None], json
6720
+ )
6613
6721
  json = model_dump(json) if isinstance(json, BaseModel) else json
6614
6722
 
6615
6723
  return await self._github.arequest(
@@ -6668,15 +6776,17 @@ class ActionsClient:
6668
6776
 
6669
6777
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"
6670
6778
 
6671
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6672
-
6673
- if not kwargs:
6674
- kwargs = UNSET
6779
+ headers = {
6780
+ "Content-Type": "application/json",
6781
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6782
+ **(headers or {}),
6783
+ }
6675
6784
 
6676
6785
  json = kwargs if data is UNSET else data
6677
- json = type_validate_python(
6678
- Union[ReposOwnerRepoActionsRunsRunIdRerunFailedJobsPostBody, None], json
6679
- )
6786
+ if self._github.config.rest_api_validate_body:
6787
+ json = type_validate_python(
6788
+ Union[ReposOwnerRepoActionsRunsRunIdRerunFailedJobsPostBody, None], json
6789
+ )
6680
6790
  json = model_dump(json) if isinstance(json, BaseModel) else json
6681
6791
 
6682
6792
  return self._github.request(
@@ -6735,15 +6845,17 @@ class ActionsClient:
6735
6845
 
6736
6846
  url = f"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"
6737
6847
 
6738
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6739
-
6740
- if not kwargs:
6741
- kwargs = UNSET
6848
+ headers = {
6849
+ "Content-Type": "application/json",
6850
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
6851
+ **(headers or {}),
6852
+ }
6742
6853
 
6743
6854
  json = kwargs if data is UNSET else data
6744
- json = type_validate_python(
6745
- Union[ReposOwnerRepoActionsRunsRunIdRerunFailedJobsPostBody, None], json
6746
- )
6855
+ if self._github.config.rest_api_validate_body:
6856
+ json = type_validate_python(
6857
+ Union[ReposOwnerRepoActionsRunsRunIdRerunFailedJobsPostBody, None], json
6858
+ )
6747
6859
  json = model_dump(json) if isinstance(json, BaseModel) else json
6748
6860
 
6749
6861
  return await self._github.arequest(
@@ -6990,13 +7102,17 @@ class ActionsClient:
6990
7102
 
6991
7103
  url = f"/repos/{owner}/{repo}/actions/secrets/{secret_name}"
6992
7104
 
6993
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
6994
-
6995
- if not kwargs:
6996
- kwargs = UNSET
7105
+ headers = {
7106
+ "Content-Type": "application/json",
7107
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7108
+ **(headers or {}),
7109
+ }
6997
7110
 
6998
7111
  json = kwargs if data is UNSET else data
6999
- json = type_validate_python(ReposOwnerRepoActionsSecretsSecretNamePutBody, json)
7112
+ if self._github.config.rest_api_validate_body:
7113
+ json = type_validate_python(
7114
+ ReposOwnerRepoActionsSecretsSecretNamePutBody, json
7115
+ )
7000
7116
  json = model_dump(json) if isinstance(json, BaseModel) else json
7001
7117
 
7002
7118
  return self._github.request(
@@ -7047,13 +7163,17 @@ class ActionsClient:
7047
7163
 
7048
7164
  url = f"/repos/{owner}/{repo}/actions/secrets/{secret_name}"
7049
7165
 
7050
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7051
-
7052
- if not kwargs:
7053
- kwargs = UNSET
7166
+ headers = {
7167
+ "Content-Type": "application/json",
7168
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7169
+ **(headers or {}),
7170
+ }
7054
7171
 
7055
7172
  json = kwargs if data is UNSET else data
7056
- json = type_validate_python(ReposOwnerRepoActionsSecretsSecretNamePutBody, json)
7173
+ if self._github.config.rest_api_validate_body:
7174
+ json = type_validate_python(
7175
+ ReposOwnerRepoActionsSecretsSecretNamePutBody, json
7176
+ )
7057
7177
  json = model_dump(json) if isinstance(json, BaseModel) else json
7058
7178
 
7059
7179
  return await self._github.arequest(
@@ -7201,13 +7321,15 @@ class ActionsClient:
7201
7321
 
7202
7322
  url = f"/repos/{owner}/{repo}/actions/variables"
7203
7323
 
7204
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7205
-
7206
- if not kwargs:
7207
- kwargs = UNSET
7324
+ headers = {
7325
+ "Content-Type": "application/json",
7326
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7327
+ **(headers or {}),
7328
+ }
7208
7329
 
7209
7330
  json = kwargs if data is UNSET else data
7210
- json = type_validate_python(ReposOwnerRepoActionsVariablesPostBody, json)
7331
+ if self._github.config.rest_api_validate_body:
7332
+ json = type_validate_python(ReposOwnerRepoActionsVariablesPostBody, json)
7211
7333
  json = model_dump(json) if isinstance(json, BaseModel) else json
7212
7334
 
7213
7335
  return self._github.request(
@@ -7255,13 +7377,15 @@ class ActionsClient:
7255
7377
 
7256
7378
  url = f"/repos/{owner}/{repo}/actions/variables"
7257
7379
 
7258
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7259
-
7260
- if not kwargs:
7261
- kwargs = UNSET
7380
+ headers = {
7381
+ "Content-Type": "application/json",
7382
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7383
+ **(headers or {}),
7384
+ }
7262
7385
 
7263
7386
  json = kwargs if data is UNSET else data
7264
- json = type_validate_python(ReposOwnerRepoActionsVariablesPostBody, json)
7387
+ if self._github.config.rest_api_validate_body:
7388
+ json = type_validate_python(ReposOwnerRepoActionsVariablesPostBody, json)
7265
7389
  json = model_dump(json) if isinstance(json, BaseModel) else json
7266
7390
 
7267
7391
  return await self._github.arequest(
@@ -7397,13 +7521,17 @@ class ActionsClient:
7397
7521
 
7398
7522
  url = f"/repos/{owner}/{repo}/actions/variables/{name}"
7399
7523
 
7400
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7401
-
7402
- if not kwargs:
7403
- kwargs = UNSET
7524
+ headers = {
7525
+ "Content-Type": "application/json",
7526
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7527
+ **(headers or {}),
7528
+ }
7404
7529
 
7405
7530
  json = kwargs if data is UNSET else data
7406
- json = type_validate_python(ReposOwnerRepoActionsVariablesNamePatchBody, json)
7531
+ if self._github.config.rest_api_validate_body:
7532
+ json = type_validate_python(
7533
+ ReposOwnerRepoActionsVariablesNamePatchBody, json
7534
+ )
7407
7535
  json = model_dump(json) if isinstance(json, BaseModel) else json
7408
7536
 
7409
7537
  return self._github.request(
@@ -7452,13 +7580,17 @@ class ActionsClient:
7452
7580
 
7453
7581
  url = f"/repos/{owner}/{repo}/actions/variables/{name}"
7454
7582
 
7455
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7456
-
7457
- if not kwargs:
7458
- kwargs = UNSET
7583
+ headers = {
7584
+ "Content-Type": "application/json",
7585
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7586
+ **(headers or {}),
7587
+ }
7459
7588
 
7460
7589
  json = kwargs if data is UNSET else data
7461
- json = type_validate_python(ReposOwnerRepoActionsVariablesNamePatchBody, json)
7590
+ if self._github.config.rest_api_validate_body:
7591
+ json = type_validate_python(
7592
+ ReposOwnerRepoActionsVariablesNamePatchBody, json
7593
+ )
7462
7594
  json = model_dump(json) if isinstance(json, BaseModel) else json
7463
7595
 
7464
7596
  return await self._github.arequest(
@@ -7658,15 +7790,17 @@ class ActionsClient:
7658
7790
 
7659
7791
  url = f"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"
7660
7792
 
7661
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7662
-
7663
- if not kwargs:
7664
- kwargs = UNSET
7793
+ headers = {
7794
+ "Content-Type": "application/json",
7795
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7796
+ **(headers or {}),
7797
+ }
7665
7798
 
7666
7799
  json = kwargs if data is UNSET else data
7667
- json = type_validate_python(
7668
- ReposOwnerRepoActionsWorkflowsWorkflowIdDispatchesPostBody, json
7669
- )
7800
+ if self._github.config.rest_api_validate_body:
7801
+ json = type_validate_python(
7802
+ ReposOwnerRepoActionsWorkflowsWorkflowIdDispatchesPostBody, json
7803
+ )
7670
7804
  json = model_dump(json) if isinstance(json, BaseModel) else json
7671
7805
 
7672
7806
  return self._github.request(
@@ -7720,15 +7854,17 @@ class ActionsClient:
7720
7854
 
7721
7855
  url = f"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"
7722
7856
 
7723
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
7724
-
7725
- if not kwargs:
7726
- kwargs = UNSET
7857
+ headers = {
7858
+ "Content-Type": "application/json",
7859
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
7860
+ **(headers or {}),
7861
+ }
7727
7862
 
7728
7863
  json = kwargs if data is UNSET else data
7729
- json = type_validate_python(
7730
- ReposOwnerRepoActionsWorkflowsWorkflowIdDispatchesPostBody, json
7731
- )
7864
+ if self._github.config.rest_api_validate_body:
7865
+ json = type_validate_python(
7866
+ ReposOwnerRepoActionsWorkflowsWorkflowIdDispatchesPostBody, json
7867
+ )
7732
7868
  json = model_dump(json) if isinstance(json, BaseModel) else json
7733
7869
 
7734
7870
  return await self._github.arequest(
@@ -8164,15 +8300,17 @@ class ActionsClient:
8164
8300
 
8165
8301
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
8166
8302
 
8167
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8168
-
8169
- if not kwargs:
8170
- kwargs = UNSET
8303
+ headers = {
8304
+ "Content-Type": "application/json",
8305
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8306
+ **(headers or {}),
8307
+ }
8171
8308
 
8172
8309
  json = kwargs if data is UNSET else data
8173
- json = type_validate_python(
8174
- ReposOwnerRepoEnvironmentsEnvironmentNameSecretsSecretNamePutBody, json
8175
- )
8310
+ if self._github.config.rest_api_validate_body:
8311
+ json = type_validate_python(
8312
+ ReposOwnerRepoEnvironmentsEnvironmentNameSecretsSecretNamePutBody, json
8313
+ )
8176
8314
  json = model_dump(json) if isinstance(json, BaseModel) else json
8177
8315
 
8178
8316
  return self._github.request(
@@ -8231,15 +8369,17 @@ class ActionsClient:
8231
8369
 
8232
8370
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
8233
8371
 
8234
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8235
-
8236
- if not kwargs:
8237
- kwargs = UNSET
8372
+ headers = {
8373
+ "Content-Type": "application/json",
8374
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8375
+ **(headers or {}),
8376
+ }
8238
8377
 
8239
8378
  json = kwargs if data is UNSET else data
8240
- json = type_validate_python(
8241
- ReposOwnerRepoEnvironmentsEnvironmentNameSecretsSecretNamePutBody, json
8242
- )
8379
+ if self._github.config.rest_api_validate_body:
8380
+ json = type_validate_python(
8381
+ ReposOwnerRepoEnvironmentsEnvironmentNameSecretsSecretNamePutBody, json
8382
+ )
8243
8383
  json = model_dump(json) if isinstance(json, BaseModel) else json
8244
8384
 
8245
8385
  return await self._github.arequest(
@@ -8403,15 +8543,17 @@ class ActionsClient:
8403
8543
 
8404
8544
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/variables"
8405
8545
 
8406
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8407
-
8408
- if not kwargs:
8409
- kwargs = UNSET
8546
+ headers = {
8547
+ "Content-Type": "application/json",
8548
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8549
+ **(headers or {}),
8550
+ }
8410
8551
 
8411
8552
  json = kwargs if data is UNSET else data
8412
- json = type_validate_python(
8413
- ReposOwnerRepoEnvironmentsEnvironmentNameVariablesPostBody, json
8414
- )
8553
+ if self._github.config.rest_api_validate_body:
8554
+ json = type_validate_python(
8555
+ ReposOwnerRepoEnvironmentsEnvironmentNameVariablesPostBody, json
8556
+ )
8415
8557
  json = model_dump(json) if isinstance(json, BaseModel) else json
8416
8558
 
8417
8559
  return self._github.request(
@@ -8467,15 +8609,17 @@ class ActionsClient:
8467
8609
 
8468
8610
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/variables"
8469
8611
 
8470
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8471
-
8472
- if not kwargs:
8473
- kwargs = UNSET
8612
+ headers = {
8613
+ "Content-Type": "application/json",
8614
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8615
+ **(headers or {}),
8616
+ }
8474
8617
 
8475
8618
  json = kwargs if data is UNSET else data
8476
- json = type_validate_python(
8477
- ReposOwnerRepoEnvironmentsEnvironmentNameVariablesPostBody, json
8478
- )
8619
+ if self._github.config.rest_api_validate_body:
8620
+ json = type_validate_python(
8621
+ ReposOwnerRepoEnvironmentsEnvironmentNameVariablesPostBody, json
8622
+ )
8479
8623
  json = model_dump(json) if isinstance(json, BaseModel) else json
8480
8624
 
8481
8625
  return await self._github.arequest(
@@ -8622,15 +8766,17 @@ class ActionsClient:
8622
8766
 
8623
8767
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"
8624
8768
 
8625
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8626
-
8627
- if not kwargs:
8628
- kwargs = UNSET
8769
+ headers = {
8770
+ "Content-Type": "application/json",
8771
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8772
+ **(headers or {}),
8773
+ }
8629
8774
 
8630
8775
  json = kwargs if data is UNSET else data
8631
- json = type_validate_python(
8632
- ReposOwnerRepoEnvironmentsEnvironmentNameVariablesNamePatchBody, json
8633
- )
8776
+ if self._github.config.rest_api_validate_body:
8777
+ json = type_validate_python(
8778
+ ReposOwnerRepoEnvironmentsEnvironmentNameVariablesNamePatchBody, json
8779
+ )
8634
8780
  json = model_dump(json) if isinstance(json, BaseModel) else json
8635
8781
 
8636
8782
  return self._github.request(
@@ -8686,15 +8832,17 @@ class ActionsClient:
8686
8832
 
8687
8833
  url = f"/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"
8688
8834
 
8689
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
8690
-
8691
- if not kwargs:
8692
- kwargs = UNSET
8835
+ headers = {
8836
+ "Content-Type": "application/json",
8837
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
8838
+ **(headers or {}),
8839
+ }
8693
8840
 
8694
8841
  json = kwargs if data is UNSET else data
8695
- json = type_validate_python(
8696
- ReposOwnerRepoEnvironmentsEnvironmentNameVariablesNamePatchBody, json
8697
- )
8842
+ if self._github.config.rest_api_validate_body:
8843
+ json = type_validate_python(
8844
+ ReposOwnerRepoEnvironmentsEnvironmentNameVariablesNamePatchBody, json
8845
+ )
8698
8846
  json = model_dump(json) if isinstance(json, BaseModel) else json
8699
8847
 
8700
8848
  return await self._github.arequest(