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
@@ -585,13 +585,15 @@ class IssuesClient:
585
585
 
586
586
  url = f"/repos/{owner}/{repo}/issues"
587
587
 
588
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
589
-
590
- if not kwargs:
591
- kwargs = UNSET
588
+ headers = {
589
+ "Content-Type": "application/json",
590
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
591
+ **(headers or {}),
592
+ }
592
593
 
593
594
  json = kwargs if data is UNSET else data
594
- json = type_validate_python(ReposOwnerRepoIssuesPostBody, json)
595
+ if self._github.config.rest_api_validate_body:
596
+ json = type_validate_python(ReposOwnerRepoIssuesPostBody, json)
595
597
  json = model_dump(json) if isinstance(json, BaseModel) else json
596
598
 
597
599
  return self._github.request(
@@ -659,13 +661,15 @@ class IssuesClient:
659
661
 
660
662
  url = f"/repos/{owner}/{repo}/issues"
661
663
 
662
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
663
-
664
- if not kwargs:
665
- kwargs = UNSET
664
+ headers = {
665
+ "Content-Type": "application/json",
666
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
667
+ **(headers or {}),
668
+ }
666
669
 
667
670
  json = kwargs if data is UNSET else data
668
- json = type_validate_python(ReposOwnerRepoIssuesPostBody, json)
671
+ if self._github.config.rest_api_validate_body:
672
+ json = type_validate_python(ReposOwnerRepoIssuesPostBody, json)
669
673
  json = model_dump(json) if isinstance(json, BaseModel) else json
670
674
 
671
675
  return await self._github.arequest(
@@ -903,15 +907,17 @@ class IssuesClient:
903
907
 
904
908
  url = f"/repos/{owner}/{repo}/issues/comments/{comment_id}"
905
909
 
906
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
907
-
908
- if not kwargs:
909
- kwargs = UNSET
910
+ headers = {
911
+ "Content-Type": "application/json",
912
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
913
+ **(headers or {}),
914
+ }
910
915
 
911
916
  json = kwargs if data is UNSET else data
912
- json = type_validate_python(
913
- ReposOwnerRepoIssuesCommentsCommentIdPatchBody, json
914
- )
917
+ if self._github.config.rest_api_validate_body:
918
+ json = type_validate_python(
919
+ ReposOwnerRepoIssuesCommentsCommentIdPatchBody, json
920
+ )
915
921
  json = model_dump(json) if isinstance(json, BaseModel) else json
916
922
 
917
923
  return self._github.request(
@@ -968,15 +974,17 @@ class IssuesClient:
968
974
 
969
975
  url = f"/repos/{owner}/{repo}/issues/comments/{comment_id}"
970
976
 
971
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
972
-
973
- if not kwargs:
974
- kwargs = UNSET
977
+ headers = {
978
+ "Content-Type": "application/json",
979
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
980
+ **(headers or {}),
981
+ }
975
982
 
976
983
  json = kwargs if data is UNSET else data
977
- json = type_validate_python(
978
- ReposOwnerRepoIssuesCommentsCommentIdPatchBody, json
979
- )
984
+ if self._github.config.rest_api_validate_body:
985
+ json = type_validate_python(
986
+ ReposOwnerRepoIssuesCommentsCommentIdPatchBody, json
987
+ )
980
988
  json = model_dump(json) if isinstance(json, BaseModel) else json
981
989
 
982
990
  return await self._github.arequest(
@@ -1231,13 +1239,15 @@ class IssuesClient:
1231
1239
 
1232
1240
  url = f"/repos/{owner}/{repo}/issues/{issue_number}"
1233
1241
 
1234
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1235
-
1236
- if not kwargs:
1237
- kwargs = UNSET
1242
+ headers = {
1243
+ "Content-Type": "application/json",
1244
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1245
+ **(headers or {}),
1246
+ }
1238
1247
 
1239
1248
  json = kwargs if data is UNSET else data
1240
- json = type_validate_python(ReposOwnerRepoIssuesIssueNumberPatchBody, json)
1249
+ if self._github.config.rest_api_validate_body:
1250
+ json = type_validate_python(ReposOwnerRepoIssuesIssueNumberPatchBody, json)
1241
1251
  json = model_dump(json) if isinstance(json, BaseModel) else json
1242
1252
 
1243
1253
  return self._github.request(
@@ -1316,13 +1326,15 @@ class IssuesClient:
1316
1326
 
1317
1327
  url = f"/repos/{owner}/{repo}/issues/{issue_number}"
1318
1328
 
1319
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1320
-
1321
- if not kwargs:
1322
- kwargs = UNSET
1329
+ headers = {
1330
+ "Content-Type": "application/json",
1331
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1332
+ **(headers or {}),
1333
+ }
1323
1334
 
1324
1335
  json = kwargs if data is UNSET else data
1325
- json = type_validate_python(ReposOwnerRepoIssuesIssueNumberPatchBody, json)
1336
+ if self._github.config.rest_api_validate_body:
1337
+ json = type_validate_python(ReposOwnerRepoIssuesIssueNumberPatchBody, json)
1326
1338
  json = model_dump(json) if isinstance(json, BaseModel) else json
1327
1339
 
1328
1340
  return await self._github.arequest(
@@ -1379,15 +1391,17 @@ class IssuesClient:
1379
1391
 
1380
1392
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/assignees"
1381
1393
 
1382
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1383
-
1384
- if not kwargs:
1385
- kwargs = UNSET
1394
+ headers = {
1395
+ "Content-Type": "application/json",
1396
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1397
+ **(headers or {}),
1398
+ }
1386
1399
 
1387
1400
  json = kwargs if data is UNSET else data
1388
- json = type_validate_python(
1389
- ReposOwnerRepoIssuesIssueNumberAssigneesPostBody, json
1390
- )
1401
+ if self._github.config.rest_api_validate_body:
1402
+ json = type_validate_python(
1403
+ ReposOwnerRepoIssuesIssueNumberAssigneesPostBody, json
1404
+ )
1391
1405
  json = model_dump(json) if isinstance(json, BaseModel) else json
1392
1406
 
1393
1407
  return self._github.request(
@@ -1437,15 +1451,17 @@ class IssuesClient:
1437
1451
 
1438
1452
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/assignees"
1439
1453
 
1440
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1441
-
1442
- if not kwargs:
1443
- kwargs = UNSET
1454
+ headers = {
1455
+ "Content-Type": "application/json",
1456
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1457
+ **(headers or {}),
1458
+ }
1444
1459
 
1445
1460
  json = kwargs if data is UNSET else data
1446
- json = type_validate_python(
1447
- ReposOwnerRepoIssuesIssueNumberAssigneesPostBody, json
1448
- )
1461
+ if self._github.config.rest_api_validate_body:
1462
+ json = type_validate_python(
1463
+ ReposOwnerRepoIssuesIssueNumberAssigneesPostBody, json
1464
+ )
1449
1465
  json = model_dump(json) if isinstance(json, BaseModel) else json
1450
1466
 
1451
1467
  return await self._github.arequest(
@@ -1495,15 +1511,17 @@ class IssuesClient:
1495
1511
 
1496
1512
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/assignees"
1497
1513
 
1498
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1499
-
1500
- if not kwargs:
1501
- kwargs = UNSET
1514
+ headers = {
1515
+ "Content-Type": "application/json",
1516
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1517
+ **(headers or {}),
1518
+ }
1502
1519
 
1503
1520
  json = kwargs if data is UNSET else data
1504
- json = type_validate_python(
1505
- ReposOwnerRepoIssuesIssueNumberAssigneesDeleteBody, json
1506
- )
1521
+ if self._github.config.rest_api_validate_body:
1522
+ json = type_validate_python(
1523
+ ReposOwnerRepoIssuesIssueNumberAssigneesDeleteBody, json
1524
+ )
1507
1525
  json = model_dump(json) if isinstance(json, BaseModel) else json
1508
1526
 
1509
1527
  return self._github.request(
@@ -1553,15 +1571,17 @@ class IssuesClient:
1553
1571
 
1554
1572
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/assignees"
1555
1573
 
1556
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1557
-
1558
- if not kwargs:
1559
- kwargs = UNSET
1574
+ headers = {
1575
+ "Content-Type": "application/json",
1576
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1577
+ **(headers or {}),
1578
+ }
1560
1579
 
1561
1580
  json = kwargs if data is UNSET else data
1562
- json = type_validate_python(
1563
- ReposOwnerRepoIssuesIssueNumberAssigneesDeleteBody, json
1564
- )
1581
+ if self._github.config.rest_api_validate_body:
1582
+ json = type_validate_python(
1583
+ ReposOwnerRepoIssuesIssueNumberAssigneesDeleteBody, json
1584
+ )
1565
1585
  json = model_dump(json) if isinstance(json, BaseModel) else json
1566
1586
 
1567
1587
  return await self._github.arequest(
@@ -1746,15 +1766,17 @@ class IssuesClient:
1746
1766
 
1747
1767
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/comments"
1748
1768
 
1749
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1750
-
1751
- if not kwargs:
1752
- kwargs = UNSET
1769
+ headers = {
1770
+ "Content-Type": "application/json",
1771
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1772
+ **(headers or {}),
1773
+ }
1753
1774
 
1754
1775
  json = kwargs if data is UNSET else data
1755
- json = type_validate_python(
1756
- ReposOwnerRepoIssuesIssueNumberCommentsPostBody, json
1757
- )
1776
+ if self._github.config.rest_api_validate_body:
1777
+ json = type_validate_python(
1778
+ ReposOwnerRepoIssuesIssueNumberCommentsPostBody, json
1779
+ )
1758
1780
  json = model_dump(json) if isinstance(json, BaseModel) else json
1759
1781
 
1760
1782
  return self._github.request(
@@ -1815,15 +1837,17 @@ class IssuesClient:
1815
1837
 
1816
1838
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/comments"
1817
1839
 
1818
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1819
-
1820
- if not kwargs:
1821
- kwargs = UNSET
1840
+ headers = {
1841
+ "Content-Type": "application/json",
1842
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1843
+ **(headers or {}),
1844
+ }
1822
1845
 
1823
1846
  json = kwargs if data is UNSET else data
1824
- json = type_validate_python(
1825
- ReposOwnerRepoIssuesIssueNumberCommentsPostBody, json
1826
- )
1847
+ if self._github.config.rest_api_validate_body:
1848
+ json = type_validate_python(
1849
+ ReposOwnerRepoIssuesIssueNumberCommentsPostBody, json
1850
+ )
1827
1851
  json = model_dump(json) if isinstance(json, BaseModel) else json
1828
1852
 
1829
1853
  return await self._github.arequest(
@@ -2176,25 +2200,27 @@ class IssuesClient:
2176
2200
 
2177
2201
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/labels"
2178
2202
 
2179
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2180
-
2181
- if not kwargs:
2182
- kwargs = UNSET
2203
+ headers = {
2204
+ "Content-Type": "application/json",
2205
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2206
+ **(headers or {}),
2207
+ }
2183
2208
 
2184
2209
  json = kwargs if data is UNSET else data
2185
- json = type_validate_python(
2186
- Union[
2187
- ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof0,
2188
- Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2189
- ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof2,
2190
- Annotated[
2191
- List[ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof3Items],
2192
- Field(min_length=1 if PYDANTIC_V2 else None),
2210
+ if self._github.config.rest_api_validate_body:
2211
+ json = type_validate_python(
2212
+ Union[
2213
+ ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof0,
2214
+ Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2215
+ ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof2,
2216
+ Annotated[
2217
+ List[ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof3Items],
2218
+ Field(min_length=1 if PYDANTIC_V2 else None),
2219
+ ],
2220
+ str,
2193
2221
  ],
2194
- str,
2195
- ],
2196
- json,
2197
- )
2222
+ json,
2223
+ )
2198
2224
  json = model_dump(json) if isinstance(json, BaseModel) else json
2199
2225
 
2200
2226
  return self._github.request(
@@ -2290,25 +2316,27 @@ class IssuesClient:
2290
2316
 
2291
2317
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/labels"
2292
2318
 
2293
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2294
-
2295
- if not kwargs:
2296
- kwargs = UNSET
2319
+ headers = {
2320
+ "Content-Type": "application/json",
2321
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2322
+ **(headers or {}),
2323
+ }
2297
2324
 
2298
2325
  json = kwargs if data is UNSET else data
2299
- json = type_validate_python(
2300
- Union[
2301
- ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof0,
2302
- Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2303
- ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof2,
2304
- Annotated[
2305
- List[ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof3Items],
2306
- Field(min_length=1 if PYDANTIC_V2 else None),
2326
+ if self._github.config.rest_api_validate_body:
2327
+ json = type_validate_python(
2328
+ Union[
2329
+ ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof0,
2330
+ Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2331
+ ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof2,
2332
+ Annotated[
2333
+ List[ReposOwnerRepoIssuesIssueNumberLabelsPutBodyOneof3Items],
2334
+ Field(min_length=1 if PYDANTIC_V2 else None),
2335
+ ],
2336
+ str,
2307
2337
  ],
2308
- str,
2309
- ],
2310
- json,
2311
- )
2338
+ json,
2339
+ )
2312
2340
  json = model_dump(json) if isinstance(json, BaseModel) else json
2313
2341
 
2314
2342
  return await self._github.arequest(
@@ -2404,25 +2432,27 @@ class IssuesClient:
2404
2432
 
2405
2433
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/labels"
2406
2434
 
2407
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2408
-
2409
- if not kwargs:
2410
- kwargs = UNSET
2435
+ headers = {
2436
+ "Content-Type": "application/json",
2437
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2438
+ **(headers or {}),
2439
+ }
2411
2440
 
2412
2441
  json = kwargs if data is UNSET else data
2413
- json = type_validate_python(
2414
- Union[
2415
- ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof0,
2416
- Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2417
- ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof2,
2418
- Annotated[
2419
- List[ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof3Items],
2420
- Field(min_length=1 if PYDANTIC_V2 else None),
2442
+ if self._github.config.rest_api_validate_body:
2443
+ json = type_validate_python(
2444
+ Union[
2445
+ ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof0,
2446
+ Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2447
+ ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof2,
2448
+ Annotated[
2449
+ List[ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof3Items],
2450
+ Field(min_length=1 if PYDANTIC_V2 else None),
2451
+ ],
2452
+ str,
2421
2453
  ],
2422
- str,
2423
- ],
2424
- json,
2425
- )
2454
+ json,
2455
+ )
2426
2456
  json = model_dump(json) if isinstance(json, BaseModel) else json
2427
2457
 
2428
2458
  return self._github.request(
@@ -2518,25 +2548,27 @@ class IssuesClient:
2518
2548
 
2519
2549
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/labels"
2520
2550
 
2521
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2522
-
2523
- if not kwargs:
2524
- kwargs = UNSET
2551
+ headers = {
2552
+ "Content-Type": "application/json",
2553
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2554
+ **(headers or {}),
2555
+ }
2525
2556
 
2526
2557
  json = kwargs if data is UNSET else data
2527
- json = type_validate_python(
2528
- Union[
2529
- ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof0,
2530
- Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2531
- ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof2,
2532
- Annotated[
2533
- List[ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof3Items],
2534
- Field(min_length=1 if PYDANTIC_V2 else None),
2558
+ if self._github.config.rest_api_validate_body:
2559
+ json = type_validate_python(
2560
+ Union[
2561
+ ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof0,
2562
+ Annotated[List[str], Field(min_length=1 if PYDANTIC_V2 else None)],
2563
+ ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof2,
2564
+ Annotated[
2565
+ List[ReposOwnerRepoIssuesIssueNumberLabelsPostBodyOneof3Items],
2566
+ Field(min_length=1 if PYDANTIC_V2 else None),
2567
+ ],
2568
+ str,
2535
2569
  ],
2536
- str,
2537
- ],
2538
- json,
2539
- )
2570
+ json,
2571
+ )
2540
2572
  json = model_dump(json) if isinstance(json, BaseModel) else json
2541
2573
 
2542
2574
  return await self._github.arequest(
@@ -2715,15 +2747,17 @@ class IssuesClient:
2715
2747
 
2716
2748
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/lock"
2717
2749
 
2718
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2719
-
2720
- if not kwargs:
2721
- kwargs = UNSET
2750
+ headers = {
2751
+ "Content-Type": "application/json",
2752
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2753
+ **(headers or {}),
2754
+ }
2722
2755
 
2723
2756
  json = kwargs if data is UNSET else data
2724
- json = type_validate_python(
2725
- Union[ReposOwnerRepoIssuesIssueNumberLockPutBody, None], json
2726
- )
2757
+ if self._github.config.rest_api_validate_body:
2758
+ json = type_validate_python(
2759
+ Union[ReposOwnerRepoIssuesIssueNumberLockPutBody, None], json
2760
+ )
2727
2761
  json = model_dump(json) if isinstance(json, BaseModel) else json
2728
2762
 
2729
2763
  return self._github.request(
@@ -2790,15 +2824,17 @@ class IssuesClient:
2790
2824
 
2791
2825
  url = f"/repos/{owner}/{repo}/issues/{issue_number}/lock"
2792
2826
 
2793
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
2794
-
2795
- if not kwargs:
2796
- kwargs = UNSET
2827
+ headers = {
2828
+ "Content-Type": "application/json",
2829
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
2830
+ **(headers or {}),
2831
+ }
2797
2832
 
2798
2833
  json = kwargs if data is UNSET else data
2799
- json = type_validate_python(
2800
- Union[ReposOwnerRepoIssuesIssueNumberLockPutBody, None], json
2801
- )
2834
+ if self._github.config.rest_api_validate_body:
2835
+ json = type_validate_python(
2836
+ Union[ReposOwnerRepoIssuesIssueNumberLockPutBody, None], json
2837
+ )
2802
2838
  json = model_dump(json) if isinstance(json, BaseModel) else json
2803
2839
 
2804
2840
  return await self._github.arequest(
@@ -3205,13 +3241,15 @@ class IssuesClient:
3205
3241
 
3206
3242
  url = f"/repos/{owner}/{repo}/labels"
3207
3243
 
3208
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3209
-
3210
- if not kwargs:
3211
- kwargs = UNSET
3244
+ headers = {
3245
+ "Content-Type": "application/json",
3246
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3247
+ **(headers or {}),
3248
+ }
3212
3249
 
3213
3250
  json = kwargs if data is UNSET else data
3214
- json = type_validate_python(ReposOwnerRepoLabelsPostBody, json)
3251
+ if self._github.config.rest_api_validate_body:
3252
+ json = type_validate_python(ReposOwnerRepoLabelsPostBody, json)
3215
3253
  json = model_dump(json) if isinstance(json, BaseModel) else json
3216
3254
 
3217
3255
  return self._github.request(
@@ -3269,13 +3307,15 @@ class IssuesClient:
3269
3307
 
3270
3308
  url = f"/repos/{owner}/{repo}/labels"
3271
3309
 
3272
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3273
-
3274
- if not kwargs:
3275
- kwargs = UNSET
3310
+ headers = {
3311
+ "Content-Type": "application/json",
3312
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3313
+ **(headers or {}),
3314
+ }
3276
3315
 
3277
3316
  json = kwargs if data is UNSET else data
3278
- json = type_validate_python(ReposOwnerRepoLabelsPostBody, json)
3317
+ if self._github.config.rest_api_validate_body:
3318
+ json = type_validate_python(ReposOwnerRepoLabelsPostBody, json)
3279
3319
  json = model_dump(json) if isinstance(json, BaseModel) else json
3280
3320
 
3281
3321
  return await self._github.arequest(
@@ -3423,13 +3463,15 @@ class IssuesClient:
3423
3463
 
3424
3464
  url = f"/repos/{owner}/{repo}/labels/{name}"
3425
3465
 
3426
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3427
-
3428
- if not kwargs:
3429
- kwargs = UNSET
3466
+ headers = {
3467
+ "Content-Type": "application/json",
3468
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3469
+ **(headers or {}),
3470
+ }
3430
3471
 
3431
3472
  json = kwargs if data is UNSET else data
3432
- json = type_validate_python(ReposOwnerRepoLabelsNamePatchBody, json)
3473
+ if self._github.config.rest_api_validate_body:
3474
+ json = type_validate_python(ReposOwnerRepoLabelsNamePatchBody, json)
3433
3475
  json = model_dump(json) if isinstance(json, BaseModel) else json
3434
3476
 
3435
3477
  return self._github.request(
@@ -3481,13 +3523,15 @@ class IssuesClient:
3481
3523
 
3482
3524
  url = f"/repos/{owner}/{repo}/labels/{name}"
3483
3525
 
3484
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3485
-
3486
- if not kwargs:
3487
- kwargs = UNSET
3526
+ headers = {
3527
+ "Content-Type": "application/json",
3528
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3529
+ **(headers or {}),
3530
+ }
3488
3531
 
3489
3532
  json = kwargs if data is UNSET else data
3490
- json = type_validate_python(ReposOwnerRepoLabelsNamePatchBody, json)
3533
+ if self._github.config.rest_api_validate_body:
3534
+ json = type_validate_python(ReposOwnerRepoLabelsNamePatchBody, json)
3491
3535
  json = model_dump(json) if isinstance(json, BaseModel) else json
3492
3536
 
3493
3537
  return await self._github.arequest(
@@ -3624,13 +3668,15 @@ class IssuesClient:
3624
3668
 
3625
3669
  url = f"/repos/{owner}/{repo}/milestones"
3626
3670
 
3627
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3628
-
3629
- if not kwargs:
3630
- kwargs = UNSET
3671
+ headers = {
3672
+ "Content-Type": "application/json",
3673
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3674
+ **(headers or {}),
3675
+ }
3631
3676
 
3632
3677
  json = kwargs if data is UNSET else data
3633
- json = type_validate_python(ReposOwnerRepoMilestonesPostBody, json)
3678
+ if self._github.config.rest_api_validate_body:
3679
+ json = type_validate_python(ReposOwnerRepoMilestonesPostBody, json)
3634
3680
  json = model_dump(json) if isinstance(json, BaseModel) else json
3635
3681
 
3636
3682
  return self._github.request(
@@ -3689,13 +3735,15 @@ class IssuesClient:
3689
3735
 
3690
3736
  url = f"/repos/{owner}/{repo}/milestones"
3691
3737
 
3692
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3693
-
3694
- if not kwargs:
3695
- kwargs = UNSET
3738
+ headers = {
3739
+ "Content-Type": "application/json",
3740
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3741
+ **(headers or {}),
3742
+ }
3696
3743
 
3697
3744
  json = kwargs if data is UNSET else data
3698
- json = type_validate_python(ReposOwnerRepoMilestonesPostBody, json)
3745
+ if self._github.config.rest_api_validate_body:
3746
+ json = type_validate_python(ReposOwnerRepoMilestonesPostBody, json)
3699
3747
  json = model_dump(json) if isinstance(json, BaseModel) else json
3700
3748
 
3701
3749
  return await self._github.arequest(
@@ -3854,15 +3902,17 @@ class IssuesClient:
3854
3902
 
3855
3903
  url = f"/repos/{owner}/{repo}/milestones/{milestone_number}"
3856
3904
 
3857
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3858
-
3859
- if not kwargs:
3860
- kwargs = UNSET
3905
+ headers = {
3906
+ "Content-Type": "application/json",
3907
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3908
+ **(headers or {}),
3909
+ }
3861
3910
 
3862
3911
  json = kwargs if data is UNSET else data
3863
- json = type_validate_python(
3864
- ReposOwnerRepoMilestonesMilestoneNumberPatchBody, json
3865
- )
3912
+ if self._github.config.rest_api_validate_body:
3913
+ json = type_validate_python(
3914
+ ReposOwnerRepoMilestonesMilestoneNumberPatchBody, json
3915
+ )
3866
3916
  json = model_dump(json) if isinstance(json, BaseModel) else json
3867
3917
 
3868
3918
  return self._github.request(
@@ -3915,15 +3965,17 @@ class IssuesClient:
3915
3965
 
3916
3966
  url = f"/repos/{owner}/{repo}/milestones/{milestone_number}"
3917
3967
 
3918
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
3919
-
3920
- if not kwargs:
3921
- kwargs = UNSET
3968
+ headers = {
3969
+ "Content-Type": "application/json",
3970
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
3971
+ **(headers or {}),
3972
+ }
3922
3973
 
3923
3974
  json = kwargs if data is UNSET else data
3924
- json = type_validate_python(
3925
- ReposOwnerRepoMilestonesMilestoneNumberPatchBody, json
3926
- )
3975
+ if self._github.config.rest_api_validate_body:
3976
+ json = type_validate_python(
3977
+ ReposOwnerRepoMilestonesMilestoneNumberPatchBody, json
3978
+ )
3927
3979
  json = model_dump(json) if isinstance(json, BaseModel) else json
3928
3980
 
3929
3981
  return await self._github.arequest(