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.
- githubkit/config.py +3 -0
- githubkit/core.py +5 -0
- githubkit/github.py +3 -0
- githubkit/versions/ghec_v2022_11_28/models/group_0051.py +5 -1
- githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
- githubkit/versions/ghec_v2022_11_28/models/group_0098.py +4 -0
- githubkit/versions/ghec_v2022_11_28/models/group_1010.py +3 -1
- githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
- githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
- githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
- githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
- githubkit/versions/ghec_v2022_11_28/rest/checks.py +83 -66
- githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
- githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
- githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
- githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
- githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
- githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
- githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
- githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
- githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
- githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
- githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
- githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
- githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
- githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
- githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
- githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
- githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
- githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
- githubkit/versions/ghec_v2022_11_28/rest/repos.py +1035 -800
- githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
- githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
- githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
- githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
- githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
- githubkit/versions/ghec_v2022_11_28/types/group_0051.py +2 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
- githubkit/versions/ghec_v2022_11_28/types/group_0098.py +1 -0
- githubkit/versions/ghec_v2022_11_28/types/group_1010.py +3 -1
- githubkit/versions/v2022_11_28/models/group_0030.py +5 -1
- githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
- githubkit/versions/v2022_11_28/models/group_0082.py +4 -0
- githubkit/versions/v2022_11_28/models/group_0936.py +3 -1
- githubkit/versions/v2022_11_28/rest/actions.py +534 -386
- githubkit/versions/v2022_11_28/rest/activity.py +60 -44
- githubkit/versions/v2022_11_28/rest/apps.py +102 -74
- githubkit/versions/v2022_11_28/rest/checks.py +83 -66
- githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
- githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
- githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
- githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
- githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
- githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
- githubkit/versions/v2022_11_28/rest/gists.py +56 -40
- githubkit/versions/v2022_11_28/rest/git.py +84 -60
- githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
- githubkit/versions/v2022_11_28/rest/issues.py +250 -198
- githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
- githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
- githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
- githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
- githubkit/versions/v2022_11_28/rest/projects.py +170 -126
- githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
- githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
- githubkit/versions/v2022_11_28/rest/repos.py +1035 -800
- githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
- githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
- githubkit/versions/v2022_11_28/rest/teams.py +274 -204
- githubkit/versions/v2022_11_28/rest/users.py +154 -118
- githubkit/versions/v2022_11_28/types/group_0030.py +2 -1
- githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
- githubkit/versions/v2022_11_28/types/group_0082.py +1 -0
- githubkit/versions/v2022_11_28/types/group_0936.py +3 -1
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/METADATA +3 -2
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/RECORD +78 -78
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
- {githubkit-0.11.12.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
|
@@ -10,10 +10,9 @@ See https://github.com/github/rest-api-description for more information.
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
12
|
from weakref import ref
|
|
13
|
-
from typing_extensions import Annotated
|
|
14
13
|
from typing import TYPE_CHECKING, Dict, Literal, Optional, overload
|
|
15
14
|
|
|
16
|
-
from pydantic import
|
|
15
|
+
from pydantic import BaseModel
|
|
17
16
|
|
|
18
17
|
from githubkit.typing import Missing, UnsetType
|
|
19
18
|
from githubkit.utils import UNSET, exclude_unset
|
|
@@ -401,13 +400,15 @@ class ReposClient:
|
|
|
401
400
|
|
|
402
401
|
url = f"/orgs/{org}/repos"
|
|
403
402
|
|
|
404
|
-
headers = {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
403
|
+
headers = {
|
|
404
|
+
"Content-Type": "application/json",
|
|
405
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
406
|
+
**(headers or {}),
|
|
407
|
+
}
|
|
408
408
|
|
|
409
409
|
json = kwargs if data is UNSET else data
|
|
410
|
-
|
|
410
|
+
if self._github.config.rest_api_validate_body:
|
|
411
|
+
json = type_validate_python(OrgsOrgReposPostBody, json)
|
|
411
412
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
412
413
|
|
|
413
414
|
return self._github.request(
|
|
@@ -490,13 +491,15 @@ class ReposClient:
|
|
|
490
491
|
|
|
491
492
|
url = f"/orgs/{org}/repos"
|
|
492
493
|
|
|
493
|
-
headers = {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
494
|
+
headers = {
|
|
495
|
+
"Content-Type": "application/json",
|
|
496
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
497
|
+
**(headers or {}),
|
|
498
|
+
}
|
|
497
499
|
|
|
498
500
|
json = kwargs if data is UNSET else data
|
|
499
|
-
|
|
501
|
+
if self._github.config.rest_api_validate_body:
|
|
502
|
+
json = type_validate_python(OrgsOrgReposPostBody, json)
|
|
500
503
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
501
504
|
|
|
502
505
|
return await self._github.arequest(
|
|
@@ -516,6 +519,7 @@ class ReposClient:
|
|
|
516
519
|
org: str,
|
|
517
520
|
per_page: Missing[int] = UNSET,
|
|
518
521
|
page: Missing[int] = UNSET,
|
|
522
|
+
targets: Missing[str] = UNSET,
|
|
519
523
|
*,
|
|
520
524
|
headers: Optional[Dict[str, str]] = None,
|
|
521
525
|
) -> Response[List[RepositoryRuleset]]:
|
|
@@ -530,6 +534,7 @@ class ReposClient:
|
|
|
530
534
|
params = {
|
|
531
535
|
"per_page": per_page,
|
|
532
536
|
"page": page,
|
|
537
|
+
"targets": targets,
|
|
533
538
|
}
|
|
534
539
|
|
|
535
540
|
headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
|
|
@@ -551,6 +556,7 @@ class ReposClient:
|
|
|
551
556
|
org: str,
|
|
552
557
|
per_page: Missing[int] = UNSET,
|
|
553
558
|
page: Missing[int] = UNSET,
|
|
559
|
+
targets: Missing[str] = UNSET,
|
|
554
560
|
*,
|
|
555
561
|
headers: Optional[Dict[str, str]] = None,
|
|
556
562
|
) -> Response[List[RepositoryRuleset]]:
|
|
@@ -565,6 +571,7 @@ class ReposClient:
|
|
|
565
571
|
params = {
|
|
566
572
|
"per_page": per_page,
|
|
567
573
|
"page": page,
|
|
574
|
+
"targets": targets,
|
|
568
575
|
}
|
|
569
576
|
|
|
570
577
|
headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
|
|
@@ -651,13 +658,15 @@ class ReposClient:
|
|
|
651
658
|
|
|
652
659
|
url = f"/orgs/{org}/rulesets"
|
|
653
660
|
|
|
654
|
-
headers = {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
661
|
+
headers = {
|
|
662
|
+
"Content-Type": "application/json",
|
|
663
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
664
|
+
**(headers or {}),
|
|
665
|
+
}
|
|
658
666
|
|
|
659
667
|
json = kwargs if data is UNSET else data
|
|
660
|
-
|
|
668
|
+
if self._github.config.rest_api_validate_body:
|
|
669
|
+
json = type_validate_python(OrgsOrgRulesetsPostBody, json)
|
|
661
670
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
662
671
|
|
|
663
672
|
return self._github.request(
|
|
@@ -742,13 +751,15 @@ class ReposClient:
|
|
|
742
751
|
|
|
743
752
|
url = f"/orgs/{org}/rulesets"
|
|
744
753
|
|
|
745
|
-
headers = {
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
754
|
+
headers = {
|
|
755
|
+
"Content-Type": "application/json",
|
|
756
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
757
|
+
**(headers or {}),
|
|
758
|
+
}
|
|
749
759
|
|
|
750
760
|
json = kwargs if data is UNSET else data
|
|
751
|
-
|
|
761
|
+
if self._github.config.rest_api_validate_body:
|
|
762
|
+
json = type_validate_python(OrgsOrgRulesetsPostBody, json)
|
|
752
763
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
753
764
|
|
|
754
765
|
return await self._github.arequest(
|
|
@@ -1034,13 +1045,15 @@ class ReposClient:
|
|
|
1034
1045
|
|
|
1035
1046
|
url = f"/orgs/{org}/rulesets/{ruleset_id}"
|
|
1036
1047
|
|
|
1037
|
-
headers = {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1048
|
+
headers = {
|
|
1049
|
+
"Content-Type": "application/json",
|
|
1050
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1051
|
+
**(headers or {}),
|
|
1052
|
+
}
|
|
1041
1053
|
|
|
1042
1054
|
json = kwargs if data is UNSET else data
|
|
1043
|
-
|
|
1055
|
+
if self._github.config.rest_api_validate_body:
|
|
1056
|
+
json = type_validate_python(OrgsOrgRulesetsRulesetIdPutBody, json)
|
|
1044
1057
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1045
1058
|
|
|
1046
1059
|
return self._github.request(
|
|
@@ -1132,13 +1145,15 @@ class ReposClient:
|
|
|
1132
1145
|
|
|
1133
1146
|
url = f"/orgs/{org}/rulesets/{ruleset_id}"
|
|
1134
1147
|
|
|
1135
|
-
headers = {
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1148
|
+
headers = {
|
|
1149
|
+
"Content-Type": "application/json",
|
|
1150
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1151
|
+
**(headers or {}),
|
|
1152
|
+
}
|
|
1139
1153
|
|
|
1140
1154
|
json = kwargs if data is UNSET else data
|
|
1141
|
-
|
|
1155
|
+
if self._github.config.rest_api_validate_body:
|
|
1156
|
+
json = type_validate_python(OrgsOrgRulesetsRulesetIdPutBody, json)
|
|
1142
1157
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1143
1158
|
|
|
1144
1159
|
return await self._github.arequest(
|
|
@@ -1376,13 +1391,15 @@ class ReposClient:
|
|
|
1376
1391
|
|
|
1377
1392
|
url = f"/repos/{owner}/{repo}"
|
|
1378
1393
|
|
|
1379
|
-
headers = {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1394
|
+
headers = {
|
|
1395
|
+
"Content-Type": "application/json",
|
|
1396
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1397
|
+
**(headers or {}),
|
|
1398
|
+
}
|
|
1383
1399
|
|
|
1384
1400
|
json = kwargs if data is UNSET else data
|
|
1385
|
-
|
|
1401
|
+
if self._github.config.rest_api_validate_body:
|
|
1402
|
+
json = type_validate_python(ReposOwnerRepoPatchBody, json)
|
|
1386
1403
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1387
1404
|
|
|
1388
1405
|
return self._github.request(
|
|
@@ -1469,13 +1486,15 @@ class ReposClient:
|
|
|
1469
1486
|
|
|
1470
1487
|
url = f"/repos/{owner}/{repo}"
|
|
1471
1488
|
|
|
1472
|
-
headers = {
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1489
|
+
headers = {
|
|
1490
|
+
"Content-Type": "application/json",
|
|
1491
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1492
|
+
**(headers or {}),
|
|
1493
|
+
}
|
|
1476
1494
|
|
|
1477
1495
|
json = kwargs if data is UNSET else data
|
|
1478
|
-
|
|
1496
|
+
if self._github.config.rest_api_validate_body:
|
|
1497
|
+
json = type_validate_python(ReposOwnerRepoPatchBody, json)
|
|
1479
1498
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1480
1499
|
|
|
1481
1500
|
return await self._github.arequest(
|
|
@@ -1648,13 +1667,15 @@ class ReposClient:
|
|
|
1648
1667
|
|
|
1649
1668
|
url = f"/repos/{owner}/{repo}/attestations"
|
|
1650
1669
|
|
|
1651
|
-
headers = {
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1670
|
+
headers = {
|
|
1671
|
+
"Content-Type": "application/json",
|
|
1672
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1673
|
+
**(headers or {}),
|
|
1674
|
+
}
|
|
1655
1675
|
|
|
1656
1676
|
json = kwargs if data is UNSET else data
|
|
1657
|
-
|
|
1677
|
+
if self._github.config.rest_api_validate_body:
|
|
1678
|
+
json = type_validate_python(ReposOwnerRepoAttestationsPostBody, json)
|
|
1658
1679
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1659
1680
|
|
|
1660
1681
|
return self._github.request(
|
|
@@ -1710,13 +1731,15 @@ class ReposClient:
|
|
|
1710
1731
|
|
|
1711
1732
|
url = f"/repos/{owner}/{repo}/attestations"
|
|
1712
1733
|
|
|
1713
|
-
headers = {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1734
|
+
headers = {
|
|
1735
|
+
"Content-Type": "application/json",
|
|
1736
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1737
|
+
**(headers or {}),
|
|
1738
|
+
}
|
|
1717
1739
|
|
|
1718
1740
|
json = kwargs if data is UNSET else data
|
|
1719
|
-
|
|
1741
|
+
if self._github.config.rest_api_validate_body:
|
|
1742
|
+
json = type_validate_python(ReposOwnerRepoAttestationsPostBody, json)
|
|
1720
1743
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1721
1744
|
|
|
1722
1745
|
return await self._github.arequest(
|
|
@@ -1883,13 +1906,15 @@ class ReposClient:
|
|
|
1883
1906
|
|
|
1884
1907
|
url = f"/repos/{owner}/{repo}/autolinks"
|
|
1885
1908
|
|
|
1886
|
-
headers = {
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1909
|
+
headers = {
|
|
1910
|
+
"Content-Type": "application/json",
|
|
1911
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1912
|
+
**(headers or {}),
|
|
1913
|
+
}
|
|
1890
1914
|
|
|
1891
1915
|
json = kwargs if data is UNSET else data
|
|
1892
|
-
|
|
1916
|
+
if self._github.config.rest_api_validate_body:
|
|
1917
|
+
json = type_validate_python(ReposOwnerRepoAutolinksPostBody, json)
|
|
1893
1918
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1894
1919
|
|
|
1895
1920
|
return self._github.request(
|
|
@@ -1941,13 +1966,15 @@ class ReposClient:
|
|
|
1941
1966
|
|
|
1942
1967
|
url = f"/repos/{owner}/{repo}/autolinks"
|
|
1943
1968
|
|
|
1944
|
-
headers = {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1969
|
+
headers = {
|
|
1970
|
+
"Content-Type": "application/json",
|
|
1971
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1972
|
+
**(headers or {}),
|
|
1973
|
+
}
|
|
1948
1974
|
|
|
1949
1975
|
json = kwargs if data is UNSET else data
|
|
1950
|
-
|
|
1976
|
+
if self._github.config.rest_api_validate_body:
|
|
1977
|
+
json = type_validate_python(ReposOwnerRepoAutolinksPostBody, json)
|
|
1951
1978
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1952
1979
|
|
|
1953
1980
|
return await self._github.arequest(
|
|
@@ -2425,13 +2452,17 @@ class ReposClient:
|
|
|
2425
2452
|
|
|
2426
2453
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection"
|
|
2427
2454
|
|
|
2428
|
-
headers = {
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2455
|
+
headers = {
|
|
2456
|
+
"Content-Type": "application/json",
|
|
2457
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
2458
|
+
**(headers or {}),
|
|
2459
|
+
}
|
|
2432
2460
|
|
|
2433
2461
|
json = kwargs if data is UNSET else data
|
|
2434
|
-
|
|
2462
|
+
if self._github.config.rest_api_validate_body:
|
|
2463
|
+
json = type_validate_python(
|
|
2464
|
+
ReposOwnerRepoBranchesBranchProtectionPutBody, json
|
|
2465
|
+
)
|
|
2435
2466
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
2436
2467
|
|
|
2437
2468
|
return self._github.request(
|
|
@@ -2509,13 +2540,17 @@ class ReposClient:
|
|
|
2509
2540
|
|
|
2510
2541
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection"
|
|
2511
2542
|
|
|
2512
|
-
headers = {
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2543
|
+
headers = {
|
|
2544
|
+
"Content-Type": "application/json",
|
|
2545
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
2546
|
+
**(headers or {}),
|
|
2547
|
+
}
|
|
2516
2548
|
|
|
2517
2549
|
json = kwargs if data is UNSET else data
|
|
2518
|
-
|
|
2550
|
+
if self._github.config.rest_api_validate_body:
|
|
2551
|
+
json = type_validate_python(
|
|
2552
|
+
ReposOwnerRepoBranchesBranchProtectionPutBody, json
|
|
2553
|
+
)
|
|
2519
2554
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
2520
2555
|
|
|
2521
2556
|
return await self._github.arequest(
|
|
@@ -2875,16 +2910,18 @@ class ReposClient:
|
|
|
2875
2910
|
|
|
2876
2911
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
|
|
2877
2912
|
|
|
2878
|
-
headers = {
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2913
|
+
headers = {
|
|
2914
|
+
"Content-Type": "application/json",
|
|
2915
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
2916
|
+
**(headers or {}),
|
|
2917
|
+
}
|
|
2882
2918
|
|
|
2883
2919
|
json = kwargs if data is UNSET else data
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2920
|
+
if self._github.config.rest_api_validate_body:
|
|
2921
|
+
json = type_validate_python(
|
|
2922
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredPullRequestReviewsPatchBody,
|
|
2923
|
+
json,
|
|
2924
|
+
)
|
|
2888
2925
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
2889
2926
|
|
|
2890
2927
|
return self._github.request(
|
|
@@ -2954,16 +2991,18 @@ class ReposClient:
|
|
|
2954
2991
|
|
|
2955
2992
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
|
|
2956
2993
|
|
|
2957
|
-
headers = {
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2994
|
+
headers = {
|
|
2995
|
+
"Content-Type": "application/json",
|
|
2996
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
2997
|
+
**(headers or {}),
|
|
2998
|
+
}
|
|
2961
2999
|
|
|
2962
3000
|
json = kwargs if data is UNSET else data
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
3001
|
+
if self._github.config.rest_api_validate_body:
|
|
3002
|
+
json = type_validate_python(
|
|
3003
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredPullRequestReviewsPatchBody,
|
|
3004
|
+
json,
|
|
3005
|
+
)
|
|
2967
3006
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
2968
3007
|
|
|
2969
3008
|
return await self._github.arequest(
|
|
@@ -3287,15 +3326,18 @@ class ReposClient:
|
|
|
3287
3326
|
f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
|
|
3288
3327
|
)
|
|
3289
3328
|
|
|
3290
|
-
headers = {
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3329
|
+
headers = {
|
|
3330
|
+
"Content-Type": "application/json",
|
|
3331
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3332
|
+
**(headers or {}),
|
|
3333
|
+
}
|
|
3294
3334
|
|
|
3295
3335
|
json = kwargs if data is UNSET else data
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3336
|
+
if self._github.config.rest_api_validate_body:
|
|
3337
|
+
json = type_validate_python(
|
|
3338
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksPatchBody,
|
|
3339
|
+
json,
|
|
3340
|
+
)
|
|
3299
3341
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3300
3342
|
|
|
3301
3343
|
return self._github.request(
|
|
@@ -3366,15 +3408,18 @@ class ReposClient:
|
|
|
3366
3408
|
f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
|
|
3367
3409
|
)
|
|
3368
3410
|
|
|
3369
|
-
headers = {
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3411
|
+
headers = {
|
|
3412
|
+
"Content-Type": "application/json",
|
|
3413
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3414
|
+
**(headers or {}),
|
|
3415
|
+
}
|
|
3373
3416
|
|
|
3374
3417
|
json = kwargs if data is UNSET else data
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3418
|
+
if self._github.config.rest_api_validate_body:
|
|
3419
|
+
json = type_validate_python(
|
|
3420
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksPatchBody,
|
|
3421
|
+
json,
|
|
3422
|
+
)
|
|
3378
3423
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3379
3424
|
|
|
3380
3425
|
return await self._github.arequest(
|
|
@@ -3500,19 +3545,21 @@ class ReposClient:
|
|
|
3500
3545
|
|
|
3501
3546
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3502
3547
|
|
|
3503
|
-
headers = {
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3548
|
+
headers = {
|
|
3549
|
+
"Content-Type": "application/json",
|
|
3550
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3551
|
+
**(headers or {}),
|
|
3552
|
+
}
|
|
3507
3553
|
|
|
3508
3554
|
json = kwargs if data is UNSET else data
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3555
|
+
if self._github.config.rest_api_validate_body:
|
|
3556
|
+
json = type_validate_python(
|
|
3557
|
+
Union[
|
|
3558
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsPutBodyOneof0,
|
|
3559
|
+
List[str],
|
|
3560
|
+
],
|
|
3561
|
+
json,
|
|
3562
|
+
)
|
|
3516
3563
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3517
3564
|
|
|
3518
3565
|
return self._github.request(
|
|
@@ -3582,19 +3629,21 @@ class ReposClient:
|
|
|
3582
3629
|
|
|
3583
3630
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3584
3631
|
|
|
3585
|
-
headers = {
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3632
|
+
headers = {
|
|
3633
|
+
"Content-Type": "application/json",
|
|
3634
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3635
|
+
**(headers or {}),
|
|
3636
|
+
}
|
|
3589
3637
|
|
|
3590
3638
|
json = kwargs if data is UNSET else data
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3639
|
+
if self._github.config.rest_api_validate_body:
|
|
3640
|
+
json = type_validate_python(
|
|
3641
|
+
Union[
|
|
3642
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsPutBodyOneof0,
|
|
3643
|
+
List[str],
|
|
3644
|
+
],
|
|
3645
|
+
json,
|
|
3646
|
+
)
|
|
3598
3647
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3599
3648
|
|
|
3600
3649
|
return await self._github.arequest(
|
|
@@ -3664,19 +3713,21 @@ class ReposClient:
|
|
|
3664
3713
|
|
|
3665
3714
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3666
3715
|
|
|
3667
|
-
headers = {
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3716
|
+
headers = {
|
|
3717
|
+
"Content-Type": "application/json",
|
|
3718
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3719
|
+
**(headers or {}),
|
|
3720
|
+
}
|
|
3671
3721
|
|
|
3672
3722
|
json = kwargs if data is UNSET else data
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3723
|
+
if self._github.config.rest_api_validate_body:
|
|
3724
|
+
json = type_validate_python(
|
|
3725
|
+
Union[
|
|
3726
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsPostBodyOneof0,
|
|
3727
|
+
List[str],
|
|
3728
|
+
],
|
|
3729
|
+
json,
|
|
3730
|
+
)
|
|
3680
3731
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3681
3732
|
|
|
3682
3733
|
return self._github.request(
|
|
@@ -3747,19 +3798,21 @@ class ReposClient:
|
|
|
3747
3798
|
|
|
3748
3799
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3749
3800
|
|
|
3750
|
-
headers = {
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3801
|
+
headers = {
|
|
3802
|
+
"Content-Type": "application/json",
|
|
3803
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3804
|
+
**(headers or {}),
|
|
3805
|
+
}
|
|
3754
3806
|
|
|
3755
3807
|
json = kwargs if data is UNSET else data
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3808
|
+
if self._github.config.rest_api_validate_body:
|
|
3809
|
+
json = type_validate_python(
|
|
3810
|
+
Union[
|
|
3811
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsPostBodyOneof0,
|
|
3812
|
+
List[str],
|
|
3813
|
+
],
|
|
3814
|
+
json,
|
|
3815
|
+
)
|
|
3763
3816
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3764
3817
|
|
|
3765
3818
|
return await self._github.arequest(
|
|
@@ -3830,19 +3883,21 @@ class ReposClient:
|
|
|
3830
3883
|
|
|
3831
3884
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3832
3885
|
|
|
3833
|
-
headers = {
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3886
|
+
headers = {
|
|
3887
|
+
"Content-Type": "application/json",
|
|
3888
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3889
|
+
**(headers or {}),
|
|
3890
|
+
}
|
|
3837
3891
|
|
|
3838
3892
|
json = kwargs if data is UNSET else data
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3893
|
+
if self._github.config.rest_api_validate_body:
|
|
3894
|
+
json = type_validate_python(
|
|
3895
|
+
Union[
|
|
3896
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsDeleteBodyOneof0,
|
|
3897
|
+
List[str],
|
|
3898
|
+
],
|
|
3899
|
+
json,
|
|
3900
|
+
)
|
|
3846
3901
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3847
3902
|
|
|
3848
3903
|
return self._github.request(
|
|
@@ -3912,19 +3967,21 @@ class ReposClient:
|
|
|
3912
3967
|
|
|
3913
3968
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
|
|
3914
3969
|
|
|
3915
|
-
headers = {
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3970
|
+
headers = {
|
|
3971
|
+
"Content-Type": "application/json",
|
|
3972
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
3973
|
+
**(headers or {}),
|
|
3974
|
+
}
|
|
3919
3975
|
|
|
3920
3976
|
json = kwargs if data is UNSET else data
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3977
|
+
if self._github.config.rest_api_validate_body:
|
|
3978
|
+
json = type_validate_python(
|
|
3979
|
+
Union[
|
|
3980
|
+
ReposOwnerRepoBranchesBranchProtectionRequiredStatusChecksContextsDeleteBodyOneof0,
|
|
3981
|
+
List[str],
|
|
3982
|
+
],
|
|
3983
|
+
json,
|
|
3984
|
+
)
|
|
3928
3985
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
3929
3986
|
|
|
3930
3987
|
return await self._github.arequest(
|
|
@@ -4134,15 +4191,17 @@ class ReposClient:
|
|
|
4134
4191
|
|
|
4135
4192
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4136
4193
|
|
|
4137
|
-
headers = {
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4194
|
+
headers = {
|
|
4195
|
+
"Content-Type": "application/json",
|
|
4196
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4197
|
+
**(headers or {}),
|
|
4198
|
+
}
|
|
4141
4199
|
|
|
4142
4200
|
json = kwargs if data is UNSET else data
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4201
|
+
if self._github.config.rest_api_validate_body:
|
|
4202
|
+
json = type_validate_python(
|
|
4203
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsPutBody, json
|
|
4204
|
+
)
|
|
4146
4205
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4147
4206
|
|
|
4148
4207
|
return self._github.request(
|
|
@@ -4203,15 +4262,17 @@ class ReposClient:
|
|
|
4203
4262
|
|
|
4204
4263
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4205
4264
|
|
|
4206
|
-
headers = {
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4265
|
+
headers = {
|
|
4266
|
+
"Content-Type": "application/json",
|
|
4267
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4268
|
+
**(headers or {}),
|
|
4269
|
+
}
|
|
4210
4270
|
|
|
4211
4271
|
json = kwargs if data is UNSET else data
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4272
|
+
if self._github.config.rest_api_validate_body:
|
|
4273
|
+
json = type_validate_python(
|
|
4274
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsPutBody, json
|
|
4275
|
+
)
|
|
4215
4276
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4216
4277
|
|
|
4217
4278
|
return await self._github.arequest(
|
|
@@ -4272,15 +4333,17 @@ class ReposClient:
|
|
|
4272
4333
|
|
|
4273
4334
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4274
4335
|
|
|
4275
|
-
headers = {
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4336
|
+
headers = {
|
|
4337
|
+
"Content-Type": "application/json",
|
|
4338
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4339
|
+
**(headers or {}),
|
|
4340
|
+
}
|
|
4279
4341
|
|
|
4280
4342
|
json = kwargs if data is UNSET else data
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4343
|
+
if self._github.config.rest_api_validate_body:
|
|
4344
|
+
json = type_validate_python(
|
|
4345
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsPostBody, json
|
|
4346
|
+
)
|
|
4284
4347
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4285
4348
|
|
|
4286
4349
|
return self._github.request(
|
|
@@ -4341,15 +4404,17 @@ class ReposClient:
|
|
|
4341
4404
|
|
|
4342
4405
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4343
4406
|
|
|
4344
|
-
headers = {
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4407
|
+
headers = {
|
|
4408
|
+
"Content-Type": "application/json",
|
|
4409
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4410
|
+
**(headers or {}),
|
|
4411
|
+
}
|
|
4348
4412
|
|
|
4349
4413
|
json = kwargs if data is UNSET else data
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4414
|
+
if self._github.config.rest_api_validate_body:
|
|
4415
|
+
json = type_validate_python(
|
|
4416
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsPostBody, json
|
|
4417
|
+
)
|
|
4353
4418
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4354
4419
|
|
|
4355
4420
|
return await self._github.arequest(
|
|
@@ -4410,15 +4475,17 @@ class ReposClient:
|
|
|
4410
4475
|
|
|
4411
4476
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4412
4477
|
|
|
4413
|
-
headers = {
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4478
|
+
headers = {
|
|
4479
|
+
"Content-Type": "application/json",
|
|
4480
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4481
|
+
**(headers or {}),
|
|
4482
|
+
}
|
|
4417
4483
|
|
|
4418
4484
|
json = kwargs if data is UNSET else data
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4485
|
+
if self._github.config.rest_api_validate_body:
|
|
4486
|
+
json = type_validate_python(
|
|
4487
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsDeleteBody, json
|
|
4488
|
+
)
|
|
4422
4489
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4423
4490
|
|
|
4424
4491
|
return self._github.request(
|
|
@@ -4479,15 +4546,17 @@ class ReposClient:
|
|
|
4479
4546
|
|
|
4480
4547
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
|
|
4481
4548
|
|
|
4482
|
-
headers = {
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4549
|
+
headers = {
|
|
4550
|
+
"Content-Type": "application/json",
|
|
4551
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4552
|
+
**(headers or {}),
|
|
4553
|
+
}
|
|
4486
4554
|
|
|
4487
4555
|
json = kwargs if data is UNSET else data
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4556
|
+
if self._github.config.rest_api_validate_body:
|
|
4557
|
+
json = type_validate_python(
|
|
4558
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsAppsDeleteBody, json
|
|
4559
|
+
)
|
|
4491
4560
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4492
4561
|
|
|
4493
4562
|
return await self._github.arequest(
|
|
@@ -4612,19 +4681,21 @@ class ReposClient:
|
|
|
4612
4681
|
|
|
4613
4682
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
4614
4683
|
|
|
4615
|
-
headers = {
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4684
|
+
headers = {
|
|
4685
|
+
"Content-Type": "application/json",
|
|
4686
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4687
|
+
**(headers or {}),
|
|
4688
|
+
}
|
|
4619
4689
|
|
|
4620
4690
|
json = kwargs if data is UNSET else data
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4691
|
+
if self._github.config.rest_api_validate_body:
|
|
4692
|
+
json = type_validate_python(
|
|
4693
|
+
Union[
|
|
4694
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsPutBodyOneof0,
|
|
4695
|
+
List[str],
|
|
4696
|
+
],
|
|
4697
|
+
json,
|
|
4698
|
+
)
|
|
4628
4699
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4629
4700
|
|
|
4630
4701
|
return self._github.request(
|
|
@@ -4693,19 +4764,21 @@ class ReposClient:
|
|
|
4693
4764
|
|
|
4694
4765
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
4695
4766
|
|
|
4696
|
-
headers = {
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4767
|
+
headers = {
|
|
4768
|
+
"Content-Type": "application/json",
|
|
4769
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4770
|
+
**(headers or {}),
|
|
4771
|
+
}
|
|
4700
4772
|
|
|
4701
4773
|
json = kwargs if data is UNSET else data
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4774
|
+
if self._github.config.rest_api_validate_body:
|
|
4775
|
+
json = type_validate_python(
|
|
4776
|
+
Union[
|
|
4777
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsPutBodyOneof0,
|
|
4778
|
+
List[str],
|
|
4779
|
+
],
|
|
4780
|
+
json,
|
|
4781
|
+
)
|
|
4709
4782
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4710
4783
|
|
|
4711
4784
|
return await self._github.arequest(
|
|
@@ -4774,19 +4847,21 @@ class ReposClient:
|
|
|
4774
4847
|
|
|
4775
4848
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
4776
4849
|
|
|
4777
|
-
headers = {
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4850
|
+
headers = {
|
|
4851
|
+
"Content-Type": "application/json",
|
|
4852
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4853
|
+
**(headers or {}),
|
|
4854
|
+
}
|
|
4781
4855
|
|
|
4782
4856
|
json = kwargs if data is UNSET else data
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4857
|
+
if self._github.config.rest_api_validate_body:
|
|
4858
|
+
json = type_validate_python(
|
|
4859
|
+
Union[
|
|
4860
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsPostBodyOneof0,
|
|
4861
|
+
List[str],
|
|
4862
|
+
],
|
|
4863
|
+
json,
|
|
4864
|
+
)
|
|
4790
4865
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4791
4866
|
|
|
4792
4867
|
return self._github.request(
|
|
@@ -4855,19 +4930,21 @@ class ReposClient:
|
|
|
4855
4930
|
|
|
4856
4931
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
4857
4932
|
|
|
4858
|
-
headers = {
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4933
|
+
headers = {
|
|
4934
|
+
"Content-Type": "application/json",
|
|
4935
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
4936
|
+
**(headers or {}),
|
|
4937
|
+
}
|
|
4862
4938
|
|
|
4863
4939
|
json = kwargs if data is UNSET else data
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4940
|
+
if self._github.config.rest_api_validate_body:
|
|
4941
|
+
json = type_validate_python(
|
|
4942
|
+
Union[
|
|
4943
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsPostBodyOneof0,
|
|
4944
|
+
List[str],
|
|
4945
|
+
],
|
|
4946
|
+
json,
|
|
4947
|
+
)
|
|
4871
4948
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4872
4949
|
|
|
4873
4950
|
return await self._github.arequest(
|
|
@@ -4936,19 +5013,21 @@ class ReposClient:
|
|
|
4936
5013
|
|
|
4937
5014
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
4938
5015
|
|
|
4939
|
-
headers = {
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
5016
|
+
headers = {
|
|
5017
|
+
"Content-Type": "application/json",
|
|
5018
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5019
|
+
**(headers or {}),
|
|
5020
|
+
}
|
|
4943
5021
|
|
|
4944
5022
|
json = kwargs if data is UNSET else data
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
5023
|
+
if self._github.config.rest_api_validate_body:
|
|
5024
|
+
json = type_validate_python(
|
|
5025
|
+
Union[
|
|
5026
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsDeleteBodyOneof0,
|
|
5027
|
+
List[str],
|
|
5028
|
+
],
|
|
5029
|
+
json,
|
|
5030
|
+
)
|
|
4952
5031
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
4953
5032
|
|
|
4954
5033
|
return self._github.request(
|
|
@@ -5017,19 +5096,21 @@ class ReposClient:
|
|
|
5017
5096
|
|
|
5018
5097
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
|
|
5019
5098
|
|
|
5020
|
-
headers = {
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5099
|
+
headers = {
|
|
5100
|
+
"Content-Type": "application/json",
|
|
5101
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5102
|
+
**(headers or {}),
|
|
5103
|
+
}
|
|
5024
5104
|
|
|
5025
5105
|
json = kwargs if data is UNSET else data
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5106
|
+
if self._github.config.rest_api_validate_body:
|
|
5107
|
+
json = type_validate_python(
|
|
5108
|
+
Union[
|
|
5109
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsTeamsDeleteBodyOneof0,
|
|
5110
|
+
List[str],
|
|
5111
|
+
],
|
|
5112
|
+
json,
|
|
5113
|
+
)
|
|
5033
5114
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5034
5115
|
|
|
5035
5116
|
return await self._github.arequest(
|
|
@@ -5146,15 +5227,17 @@ class ReposClient:
|
|
|
5146
5227
|
|
|
5147
5228
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5148
5229
|
|
|
5149
|
-
headers = {
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5230
|
+
headers = {
|
|
5231
|
+
"Content-Type": "application/json",
|
|
5232
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5233
|
+
**(headers or {}),
|
|
5234
|
+
}
|
|
5153
5235
|
|
|
5154
5236
|
json = kwargs if data is UNSET else data
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5237
|
+
if self._github.config.rest_api_validate_body:
|
|
5238
|
+
json = type_validate_python(
|
|
5239
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersPutBody, json
|
|
5240
|
+
)
|
|
5158
5241
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5159
5242
|
|
|
5160
5243
|
return self._github.request(
|
|
@@ -5215,15 +5298,17 @@ class ReposClient:
|
|
|
5215
5298
|
|
|
5216
5299
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5217
5300
|
|
|
5218
|
-
headers = {
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5301
|
+
headers = {
|
|
5302
|
+
"Content-Type": "application/json",
|
|
5303
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5304
|
+
**(headers or {}),
|
|
5305
|
+
}
|
|
5222
5306
|
|
|
5223
5307
|
json = kwargs if data is UNSET else data
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5308
|
+
if self._github.config.rest_api_validate_body:
|
|
5309
|
+
json = type_validate_python(
|
|
5310
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersPutBody, json
|
|
5311
|
+
)
|
|
5227
5312
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5228
5313
|
|
|
5229
5314
|
return await self._github.arequest(
|
|
@@ -5284,15 +5369,17 @@ class ReposClient:
|
|
|
5284
5369
|
|
|
5285
5370
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5286
5371
|
|
|
5287
|
-
headers = {
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5372
|
+
headers = {
|
|
5373
|
+
"Content-Type": "application/json",
|
|
5374
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5375
|
+
**(headers or {}),
|
|
5376
|
+
}
|
|
5291
5377
|
|
|
5292
5378
|
json = kwargs if data is UNSET else data
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5379
|
+
if self._github.config.rest_api_validate_body:
|
|
5380
|
+
json = type_validate_python(
|
|
5381
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersPostBody, json
|
|
5382
|
+
)
|
|
5296
5383
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5297
5384
|
|
|
5298
5385
|
return self._github.request(
|
|
@@ -5353,15 +5440,17 @@ class ReposClient:
|
|
|
5353
5440
|
|
|
5354
5441
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5355
5442
|
|
|
5356
|
-
headers = {
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5443
|
+
headers = {
|
|
5444
|
+
"Content-Type": "application/json",
|
|
5445
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5446
|
+
**(headers or {}),
|
|
5447
|
+
}
|
|
5360
5448
|
|
|
5361
5449
|
json = kwargs if data is UNSET else data
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5450
|
+
if self._github.config.rest_api_validate_body:
|
|
5451
|
+
json = type_validate_python(
|
|
5452
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersPostBody, json
|
|
5453
|
+
)
|
|
5365
5454
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5366
5455
|
|
|
5367
5456
|
return await self._github.arequest(
|
|
@@ -5422,15 +5511,17 @@ class ReposClient:
|
|
|
5422
5511
|
|
|
5423
5512
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5424
5513
|
|
|
5425
|
-
headers = {
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5514
|
+
headers = {
|
|
5515
|
+
"Content-Type": "application/json",
|
|
5516
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5517
|
+
**(headers or {}),
|
|
5518
|
+
}
|
|
5429
5519
|
|
|
5430
5520
|
json = kwargs if data is UNSET else data
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5521
|
+
if self._github.config.rest_api_validate_body:
|
|
5522
|
+
json = type_validate_python(
|
|
5523
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersDeleteBody, json
|
|
5524
|
+
)
|
|
5434
5525
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5435
5526
|
|
|
5436
5527
|
return self._github.request(
|
|
@@ -5491,15 +5582,17 @@ class ReposClient:
|
|
|
5491
5582
|
|
|
5492
5583
|
url = f"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
|
|
5493
5584
|
|
|
5494
|
-
headers = {
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5585
|
+
headers = {
|
|
5586
|
+
"Content-Type": "application/json",
|
|
5587
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5588
|
+
**(headers or {}),
|
|
5589
|
+
}
|
|
5498
5590
|
|
|
5499
5591
|
json = kwargs if data is UNSET else data
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5592
|
+
if self._github.config.rest_api_validate_body:
|
|
5593
|
+
json = type_validate_python(
|
|
5594
|
+
ReposOwnerRepoBranchesBranchProtectionRestrictionsUsersDeleteBody, json
|
|
5595
|
+
)
|
|
5503
5596
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5504
5597
|
|
|
5505
5598
|
return await self._github.arequest(
|
|
@@ -5557,13 +5650,17 @@ class ReposClient:
|
|
|
5557
5650
|
|
|
5558
5651
|
url = f"/repos/{owner}/{repo}/branches/{branch}/rename"
|
|
5559
5652
|
|
|
5560
|
-
headers = {
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5653
|
+
headers = {
|
|
5654
|
+
"Content-Type": "application/json",
|
|
5655
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5656
|
+
**(headers or {}),
|
|
5657
|
+
}
|
|
5564
5658
|
|
|
5565
5659
|
json = kwargs if data is UNSET else data
|
|
5566
|
-
|
|
5660
|
+
if self._github.config.rest_api_validate_body:
|
|
5661
|
+
json = type_validate_python(
|
|
5662
|
+
ReposOwnerRepoBranchesBranchRenamePostBody, json
|
|
5663
|
+
)
|
|
5567
5664
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5568
5665
|
|
|
5569
5666
|
return self._github.request(
|
|
@@ -5623,13 +5720,17 @@ class ReposClient:
|
|
|
5623
5720
|
|
|
5624
5721
|
url = f"/repos/{owner}/{repo}/branches/{branch}/rename"
|
|
5625
5722
|
|
|
5626
|
-
headers = {
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5723
|
+
headers = {
|
|
5724
|
+
"Content-Type": "application/json",
|
|
5725
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5726
|
+
**(headers or {}),
|
|
5727
|
+
}
|
|
5630
5728
|
|
|
5631
5729
|
json = kwargs if data is UNSET else data
|
|
5632
|
-
|
|
5730
|
+
if self._github.config.rest_api_validate_body:
|
|
5731
|
+
json = type_validate_python(
|
|
5732
|
+
ReposOwnerRepoBranchesBranchRenamePostBody, json
|
|
5733
|
+
)
|
|
5633
5734
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5634
5735
|
|
|
5635
5736
|
return await self._github.arequest(
|
|
@@ -5871,13 +5972,17 @@ class ReposClient:
|
|
|
5871
5972
|
|
|
5872
5973
|
url = f"/repos/{owner}/{repo}/collaborators/{username}"
|
|
5873
5974
|
|
|
5874
|
-
headers = {
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5975
|
+
headers = {
|
|
5976
|
+
"Content-Type": "application/json",
|
|
5977
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
5978
|
+
**(headers or {}),
|
|
5979
|
+
}
|
|
5878
5980
|
|
|
5879
5981
|
json = kwargs if data is UNSET else data
|
|
5880
|
-
|
|
5982
|
+
if self._github.config.rest_api_validate_body:
|
|
5983
|
+
json = type_validate_python(
|
|
5984
|
+
ReposOwnerRepoCollaboratorsUsernamePutBody, json
|
|
5985
|
+
)
|
|
5881
5986
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5882
5987
|
|
|
5883
5988
|
return self._github.request(
|
|
@@ -5936,13 +6041,17 @@ class ReposClient:
|
|
|
5936
6041
|
|
|
5937
6042
|
url = f"/repos/{owner}/{repo}/collaborators/{username}"
|
|
5938
6043
|
|
|
5939
|
-
headers = {
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
6044
|
+
headers = {
|
|
6045
|
+
"Content-Type": "application/json",
|
|
6046
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
6047
|
+
**(headers or {}),
|
|
6048
|
+
}
|
|
5943
6049
|
|
|
5944
6050
|
json = kwargs if data is UNSET else data
|
|
5945
|
-
|
|
6051
|
+
if self._github.config.rest_api_validate_body:
|
|
6052
|
+
json = type_validate_python(
|
|
6053
|
+
ReposOwnerRepoCollaboratorsUsernamePutBody, json
|
|
6054
|
+
)
|
|
5946
6055
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
5947
6056
|
|
|
5948
6057
|
return await self._github.arequest(
|
|
@@ -6270,13 +6379,15 @@ class ReposClient:
|
|
|
6270
6379
|
|
|
6271
6380
|
url = f"/repos/{owner}/{repo}/comments/{comment_id}"
|
|
6272
6381
|
|
|
6273
|
-
headers = {
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6382
|
+
headers = {
|
|
6383
|
+
"Content-Type": "application/json",
|
|
6384
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
6385
|
+
**(headers or {}),
|
|
6386
|
+
}
|
|
6277
6387
|
|
|
6278
6388
|
json = kwargs if data is UNSET else data
|
|
6279
|
-
|
|
6389
|
+
if self._github.config.rest_api_validate_body:
|
|
6390
|
+
json = type_validate_python(ReposOwnerRepoCommentsCommentIdPatchBody, json)
|
|
6280
6391
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
6281
6392
|
|
|
6282
6393
|
return self._github.request(
|
|
@@ -6333,13 +6444,15 @@ class ReposClient:
|
|
|
6333
6444
|
|
|
6334
6445
|
url = f"/repos/{owner}/{repo}/comments/{comment_id}"
|
|
6335
6446
|
|
|
6336
|
-
headers = {
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6447
|
+
headers = {
|
|
6448
|
+
"Content-Type": "application/json",
|
|
6449
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
6450
|
+
**(headers or {}),
|
|
6451
|
+
}
|
|
6340
6452
|
|
|
6341
6453
|
json = kwargs if data is UNSET else data
|
|
6342
|
-
|
|
6454
|
+
if self._github.config.rest_api_validate_body:
|
|
6455
|
+
json = type_validate_python(ReposOwnerRepoCommentsCommentIdPatchBody, json)
|
|
6343
6456
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
6344
6457
|
|
|
6345
6458
|
return await self._github.arequest(
|
|
@@ -6624,15 +6737,17 @@ class ReposClient:
|
|
|
6624
6737
|
|
|
6625
6738
|
url = f"/repos/{owner}/{repo}/commits/{commit_sha}/comments"
|
|
6626
6739
|
|
|
6627
|
-
headers = {
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6740
|
+
headers = {
|
|
6741
|
+
"Content-Type": "application/json",
|
|
6742
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
6743
|
+
**(headers or {}),
|
|
6744
|
+
}
|
|
6631
6745
|
|
|
6632
6746
|
json = kwargs if data is UNSET else data
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6747
|
+
if self._github.config.rest_api_validate_body:
|
|
6748
|
+
json = type_validate_python(
|
|
6749
|
+
ReposOwnerRepoCommitsCommitShaCommentsPostBody, json
|
|
6750
|
+
)
|
|
6636
6751
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
6637
6752
|
|
|
6638
6753
|
return self._github.request(
|
|
@@ -6694,15 +6809,17 @@ class ReposClient:
|
|
|
6694
6809
|
|
|
6695
6810
|
url = f"/repos/{owner}/{repo}/commits/{commit_sha}/comments"
|
|
6696
6811
|
|
|
6697
|
-
headers = {
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6812
|
+
headers = {
|
|
6813
|
+
"Content-Type": "application/json",
|
|
6814
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
6815
|
+
**(headers or {}),
|
|
6816
|
+
}
|
|
6701
6817
|
|
|
6702
6818
|
json = kwargs if data is UNSET else data
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6819
|
+
if self._github.config.rest_api_validate_body:
|
|
6820
|
+
json = type_validate_python(
|
|
6821
|
+
ReposOwnerRepoCommitsCommitShaCommentsPostBody, json
|
|
6822
|
+
)
|
|
6706
6823
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
6707
6824
|
|
|
6708
6825
|
return await self._github.arequest(
|
|
@@ -7142,14 +7259,8 @@ class ReposClient:
|
|
|
7142
7259
|
*,
|
|
7143
7260
|
headers: Optional[Dict[str, str]] = None,
|
|
7144
7261
|
) -> Response[
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
List[ContentDirectoryItems],
|
|
7148
|
-
ContentFile,
|
|
7149
|
-
ContentSymlink,
|
|
7150
|
-
ContentSubmodule,
|
|
7151
|
-
],
|
|
7152
|
-
Field(discriminator="type"),
|
|
7262
|
+
Union[
|
|
7263
|
+
List[ContentDirectoryItems], ContentFile, ContentSymlink, ContentSubmodule
|
|
7153
7264
|
]
|
|
7154
7265
|
]:
|
|
7155
7266
|
"""See also: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#get-repository-content"""
|
|
@@ -7177,14 +7288,11 @@ class ReposClient:
|
|
|
7177
7288
|
url,
|
|
7178
7289
|
params=exclude_unset(params),
|
|
7179
7290
|
headers=exclude_unset(headers),
|
|
7180
|
-
response_model=
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
ContentSubmodule,
|
|
7186
|
-
],
|
|
7187
|
-
Field(discriminator="type"),
|
|
7291
|
+
response_model=Union[
|
|
7292
|
+
List[ContentDirectoryItems],
|
|
7293
|
+
ContentFile,
|
|
7294
|
+
ContentSymlink,
|
|
7295
|
+
ContentSubmodule,
|
|
7188
7296
|
],
|
|
7189
7297
|
error_models={
|
|
7190
7298
|
"404": BasicError,
|
|
@@ -7201,14 +7309,8 @@ class ReposClient:
|
|
|
7201
7309
|
*,
|
|
7202
7310
|
headers: Optional[Dict[str, str]] = None,
|
|
7203
7311
|
) -> Response[
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
List[ContentDirectoryItems],
|
|
7207
|
-
ContentFile,
|
|
7208
|
-
ContentSymlink,
|
|
7209
|
-
ContentSubmodule,
|
|
7210
|
-
],
|
|
7211
|
-
Field(discriminator="type"),
|
|
7312
|
+
Union[
|
|
7313
|
+
List[ContentDirectoryItems], ContentFile, ContentSymlink, ContentSubmodule
|
|
7212
7314
|
]
|
|
7213
7315
|
]:
|
|
7214
7316
|
"""See also: https://docs.github.com/enterprise-cloud@latest//rest/repos/contents#get-repository-content"""
|
|
@@ -7236,14 +7338,11 @@ class ReposClient:
|
|
|
7236
7338
|
url,
|
|
7237
7339
|
params=exclude_unset(params),
|
|
7238
7340
|
headers=exclude_unset(headers),
|
|
7239
|
-
response_model=
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
ContentSubmodule,
|
|
7245
|
-
],
|
|
7246
|
-
Field(discriminator="type"),
|
|
7341
|
+
response_model=Union[
|
|
7342
|
+
List[ContentDirectoryItems],
|
|
7343
|
+
ContentFile,
|
|
7344
|
+
ContentSymlink,
|
|
7345
|
+
ContentSubmodule,
|
|
7247
7346
|
],
|
|
7248
7347
|
error_models={
|
|
7249
7348
|
"404": BasicError,
|
|
@@ -7303,13 +7402,15 @@ class ReposClient:
|
|
|
7303
7402
|
|
|
7304
7403
|
url = f"/repos/{owner}/{repo}/contents/{path}"
|
|
7305
7404
|
|
|
7306
|
-
headers = {
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7405
|
+
headers = {
|
|
7406
|
+
"Content-Type": "application/json",
|
|
7407
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7408
|
+
**(headers or {}),
|
|
7409
|
+
}
|
|
7310
7410
|
|
|
7311
7411
|
json = kwargs if data is UNSET else data
|
|
7312
|
-
|
|
7412
|
+
if self._github.config.rest_api_validate_body:
|
|
7413
|
+
json = type_validate_python(ReposOwnerRepoContentsPathPutBody, json)
|
|
7313
7414
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7314
7415
|
|
|
7315
7416
|
return self._github.request(
|
|
@@ -7377,13 +7478,15 @@ class ReposClient:
|
|
|
7377
7478
|
|
|
7378
7479
|
url = f"/repos/{owner}/{repo}/contents/{path}"
|
|
7379
7480
|
|
|
7380
|
-
headers = {
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7481
|
+
headers = {
|
|
7482
|
+
"Content-Type": "application/json",
|
|
7483
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7484
|
+
**(headers or {}),
|
|
7485
|
+
}
|
|
7384
7486
|
|
|
7385
7487
|
json = kwargs if data is UNSET else data
|
|
7386
|
-
|
|
7488
|
+
if self._github.config.rest_api_validate_body:
|
|
7489
|
+
json = type_validate_python(ReposOwnerRepoContentsPathPutBody, json)
|
|
7387
7490
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7388
7491
|
|
|
7389
7492
|
return await self._github.arequest(
|
|
@@ -7450,13 +7553,15 @@ class ReposClient:
|
|
|
7450
7553
|
|
|
7451
7554
|
url = f"/repos/{owner}/{repo}/contents/{path}"
|
|
7452
7555
|
|
|
7453
|
-
headers = {
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7556
|
+
headers = {
|
|
7557
|
+
"Content-Type": "application/json",
|
|
7558
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7559
|
+
**(headers or {}),
|
|
7560
|
+
}
|
|
7457
7561
|
|
|
7458
7562
|
json = kwargs if data is UNSET else data
|
|
7459
|
-
|
|
7563
|
+
if self._github.config.rest_api_validate_body:
|
|
7564
|
+
json = type_validate_python(ReposOwnerRepoContentsPathDeleteBody, json)
|
|
7460
7565
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7461
7566
|
|
|
7462
7567
|
return self._github.request(
|
|
@@ -7524,13 +7629,15 @@ class ReposClient:
|
|
|
7524
7629
|
|
|
7525
7630
|
url = f"/repos/{owner}/{repo}/contents/{path}"
|
|
7526
7631
|
|
|
7527
|
-
headers = {
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7632
|
+
headers = {
|
|
7633
|
+
"Content-Type": "application/json",
|
|
7634
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7635
|
+
**(headers or {}),
|
|
7636
|
+
}
|
|
7531
7637
|
|
|
7532
7638
|
json = kwargs if data is UNSET else data
|
|
7533
|
-
|
|
7639
|
+
if self._github.config.rest_api_validate_body:
|
|
7640
|
+
json = type_validate_python(ReposOwnerRepoContentsPathDeleteBody, json)
|
|
7534
7641
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7535
7642
|
|
|
7536
7643
|
return await self._github.arequest(
|
|
@@ -7753,13 +7860,15 @@ class ReposClient:
|
|
|
7753
7860
|
|
|
7754
7861
|
url = f"/repos/{owner}/{repo}/deployments"
|
|
7755
7862
|
|
|
7756
|
-
headers = {
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7863
|
+
headers = {
|
|
7864
|
+
"Content-Type": "application/json",
|
|
7865
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7866
|
+
**(headers or {}),
|
|
7867
|
+
}
|
|
7760
7868
|
|
|
7761
7869
|
json = kwargs if data is UNSET else data
|
|
7762
|
-
|
|
7870
|
+
if self._github.config.rest_api_validate_body:
|
|
7871
|
+
json = type_validate_python(ReposOwnerRepoDeploymentsPostBody, json)
|
|
7763
7872
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7764
7873
|
|
|
7765
7874
|
return self._github.request(
|
|
@@ -7823,13 +7932,15 @@ class ReposClient:
|
|
|
7823
7932
|
|
|
7824
7933
|
url = f"/repos/{owner}/{repo}/deployments"
|
|
7825
7934
|
|
|
7826
|
-
headers = {
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7935
|
+
headers = {
|
|
7936
|
+
"Content-Type": "application/json",
|
|
7937
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
7938
|
+
**(headers or {}),
|
|
7939
|
+
}
|
|
7830
7940
|
|
|
7831
7941
|
json = kwargs if data is UNSET else data
|
|
7832
|
-
|
|
7942
|
+
if self._github.config.rest_api_validate_body:
|
|
7943
|
+
json = type_validate_python(ReposOwnerRepoDeploymentsPostBody, json)
|
|
7833
7944
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
7834
7945
|
|
|
7835
7946
|
return await self._github.arequest(
|
|
@@ -8078,15 +8189,17 @@ class ReposClient:
|
|
|
8078
8189
|
|
|
8079
8190
|
url = f"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
|
|
8080
8191
|
|
|
8081
|
-
headers = {
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8192
|
+
headers = {
|
|
8193
|
+
"Content-Type": "application/json",
|
|
8194
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8195
|
+
**(headers or {}),
|
|
8196
|
+
}
|
|
8085
8197
|
|
|
8086
8198
|
json = kwargs if data is UNSET else data
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8199
|
+
if self._github.config.rest_api_validate_body:
|
|
8200
|
+
json = type_validate_python(
|
|
8201
|
+
ReposOwnerRepoDeploymentsDeploymentIdStatusesPostBody, json
|
|
8202
|
+
)
|
|
8090
8203
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8091
8204
|
|
|
8092
8205
|
return self._github.request(
|
|
@@ -8159,15 +8272,17 @@ class ReposClient:
|
|
|
8159
8272
|
|
|
8160
8273
|
url = f"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
|
|
8161
8274
|
|
|
8162
|
-
headers = {
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8275
|
+
headers = {
|
|
8276
|
+
"Content-Type": "application/json",
|
|
8277
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8278
|
+
**(headers or {}),
|
|
8279
|
+
}
|
|
8166
8280
|
|
|
8167
8281
|
json = kwargs if data is UNSET else data
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8282
|
+
if self._github.config.rest_api_validate_body:
|
|
8283
|
+
json = type_validate_python(
|
|
8284
|
+
ReposOwnerRepoDeploymentsDeploymentIdStatusesPostBody, json
|
|
8285
|
+
)
|
|
8171
8286
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8172
8287
|
|
|
8173
8288
|
return await self._github.arequest(
|
|
@@ -8278,13 +8393,15 @@ class ReposClient:
|
|
|
8278
8393
|
|
|
8279
8394
|
url = f"/repos/{owner}/{repo}/dispatches"
|
|
8280
8395
|
|
|
8281
|
-
headers = {
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8396
|
+
headers = {
|
|
8397
|
+
"Content-Type": "application/json",
|
|
8398
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8399
|
+
**(headers or {}),
|
|
8400
|
+
}
|
|
8285
8401
|
|
|
8286
8402
|
json = kwargs if data is UNSET else data
|
|
8287
|
-
|
|
8403
|
+
if self._github.config.rest_api_validate_body:
|
|
8404
|
+
json = type_validate_python(ReposOwnerRepoDispatchesPostBody, json)
|
|
8288
8405
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8289
8406
|
|
|
8290
8407
|
return self._github.request(
|
|
@@ -8341,13 +8458,15 @@ class ReposClient:
|
|
|
8341
8458
|
|
|
8342
8459
|
url = f"/repos/{owner}/{repo}/dispatches"
|
|
8343
8460
|
|
|
8344
|
-
headers = {
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8461
|
+
headers = {
|
|
8462
|
+
"Content-Type": "application/json",
|
|
8463
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8464
|
+
**(headers or {}),
|
|
8465
|
+
}
|
|
8348
8466
|
|
|
8349
8467
|
json = kwargs if data is UNSET else data
|
|
8350
|
-
|
|
8468
|
+
if self._github.config.rest_api_validate_body:
|
|
8469
|
+
json = type_validate_python(ReposOwnerRepoDispatchesPostBody, json)
|
|
8351
8470
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8352
8471
|
|
|
8353
8472
|
return await self._github.arequest(
|
|
@@ -8528,15 +8647,17 @@ class ReposClient:
|
|
|
8528
8647
|
|
|
8529
8648
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}"
|
|
8530
8649
|
|
|
8531
|
-
headers = {
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8650
|
+
headers = {
|
|
8651
|
+
"Content-Type": "application/json",
|
|
8652
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8653
|
+
**(headers or {}),
|
|
8654
|
+
}
|
|
8535
8655
|
|
|
8536
8656
|
json = kwargs if data is UNSET else data
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8657
|
+
if self._github.config.rest_api_validate_body:
|
|
8658
|
+
json = type_validate_python(
|
|
8659
|
+
Union[ReposOwnerRepoEnvironmentsEnvironmentNamePutBody, None], json
|
|
8660
|
+
)
|
|
8540
8661
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8541
8662
|
|
|
8542
8663
|
return self._github.request(
|
|
@@ -8611,15 +8732,17 @@ class ReposClient:
|
|
|
8611
8732
|
|
|
8612
8733
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}"
|
|
8613
8734
|
|
|
8614
|
-
headers = {
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8735
|
+
headers = {
|
|
8736
|
+
"Content-Type": "application/json",
|
|
8737
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8738
|
+
**(headers or {}),
|
|
8739
|
+
}
|
|
8618
8740
|
|
|
8619
8741
|
json = kwargs if data is UNSET else data
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8742
|
+
if self._github.config.rest_api_validate_body:
|
|
8743
|
+
json = type_validate_python(
|
|
8744
|
+
Union[ReposOwnerRepoEnvironmentsEnvironmentNamePutBody, None], json
|
|
8745
|
+
)
|
|
8623
8746
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8624
8747
|
|
|
8625
8748
|
return await self._github.arequest(
|
|
@@ -8786,13 +8909,15 @@ class ReposClient:
|
|
|
8786
8909
|
|
|
8787
8910
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
|
|
8788
8911
|
|
|
8789
|
-
headers = {
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8912
|
+
headers = {
|
|
8913
|
+
"Content-Type": "application/json",
|
|
8914
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8915
|
+
**(headers or {}),
|
|
8916
|
+
}
|
|
8793
8917
|
|
|
8794
8918
|
json = kwargs if data is UNSET else data
|
|
8795
|
-
|
|
8919
|
+
if self._github.config.rest_api_validate_body:
|
|
8920
|
+
json = type_validate_python(DeploymentBranchPolicyNamePatternWithType, json)
|
|
8796
8921
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8797
8922
|
|
|
8798
8923
|
return self._github.request(
|
|
@@ -8847,13 +8972,15 @@ class ReposClient:
|
|
|
8847
8972
|
|
|
8848
8973
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
|
|
8849
8974
|
|
|
8850
|
-
headers = {
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8975
|
+
headers = {
|
|
8976
|
+
"Content-Type": "application/json",
|
|
8977
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
8978
|
+
**(headers or {}),
|
|
8979
|
+
}
|
|
8854
8980
|
|
|
8855
8981
|
json = kwargs if data is UNSET else data
|
|
8856
|
-
|
|
8982
|
+
if self._github.config.rest_api_validate_body:
|
|
8983
|
+
json = type_validate_python(DeploymentBranchPolicyNamePatternWithType, json)
|
|
8857
8984
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8858
8985
|
|
|
8859
8986
|
return await self._github.arequest(
|
|
@@ -8955,13 +9082,15 @@ class ReposClient:
|
|
|
8955
9082
|
|
|
8956
9083
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
|
|
8957
9084
|
|
|
8958
|
-
headers = {
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
9085
|
+
headers = {
|
|
9086
|
+
"Content-Type": "application/json",
|
|
9087
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9088
|
+
**(headers or {}),
|
|
9089
|
+
}
|
|
8962
9090
|
|
|
8963
9091
|
json = kwargs if data is UNSET else data
|
|
8964
|
-
|
|
9092
|
+
if self._github.config.rest_api_validate_body:
|
|
9093
|
+
json = type_validate_python(DeploymentBranchPolicyNamePattern, json)
|
|
8965
9094
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
8966
9095
|
|
|
8967
9096
|
return self._github.request(
|
|
@@ -9014,13 +9143,15 @@ class ReposClient:
|
|
|
9014
9143
|
|
|
9015
9144
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
|
|
9016
9145
|
|
|
9017
|
-
headers = {
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9146
|
+
headers = {
|
|
9147
|
+
"Content-Type": "application/json",
|
|
9148
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9149
|
+
**(headers or {}),
|
|
9150
|
+
}
|
|
9021
9151
|
|
|
9022
9152
|
json = kwargs if data is UNSET else data
|
|
9023
|
-
|
|
9153
|
+
if self._github.config.rest_api_validate_body:
|
|
9154
|
+
json = type_validate_python(DeploymentBranchPolicyNamePattern, json)
|
|
9024
9155
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9025
9156
|
|
|
9026
9157
|
return await self._github.arequest(
|
|
@@ -9171,16 +9302,18 @@ class ReposClient:
|
|
|
9171
9302
|
|
|
9172
9303
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
|
|
9173
9304
|
|
|
9174
|
-
headers = {
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9305
|
+
headers = {
|
|
9306
|
+
"Content-Type": "application/json",
|
|
9307
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9308
|
+
**(headers or {}),
|
|
9309
|
+
}
|
|
9178
9310
|
|
|
9179
9311
|
json = kwargs if data is UNSET else data
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9312
|
+
if self._github.config.rest_api_validate_body:
|
|
9313
|
+
json = type_validate_python(
|
|
9314
|
+
ReposOwnerRepoEnvironmentsEnvironmentNameDeploymentProtectionRulesPostBody,
|
|
9315
|
+
json,
|
|
9316
|
+
)
|
|
9184
9317
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9185
9318
|
|
|
9186
9319
|
return self._github.request(
|
|
@@ -9235,16 +9368,18 @@ class ReposClient:
|
|
|
9235
9368
|
|
|
9236
9369
|
url = f"/repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
|
|
9237
9370
|
|
|
9238
|
-
headers = {
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9371
|
+
headers = {
|
|
9372
|
+
"Content-Type": "application/json",
|
|
9373
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9374
|
+
**(headers or {}),
|
|
9375
|
+
}
|
|
9242
9376
|
|
|
9243
9377
|
json = kwargs if data is UNSET else data
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9378
|
+
if self._github.config.rest_api_validate_body:
|
|
9379
|
+
json = type_validate_python(
|
|
9380
|
+
ReposOwnerRepoEnvironmentsEnvironmentNameDeploymentProtectionRulesPostBody,
|
|
9381
|
+
json,
|
|
9382
|
+
)
|
|
9248
9383
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9249
9384
|
|
|
9250
9385
|
return await self._github.arequest(
|
|
@@ -9534,13 +9669,15 @@ class ReposClient:
|
|
|
9534
9669
|
|
|
9535
9670
|
url = f"/repos/{owner}/{repo}/forks"
|
|
9536
9671
|
|
|
9537
|
-
headers = {
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9672
|
+
headers = {
|
|
9673
|
+
"Content-Type": "application/json",
|
|
9674
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9675
|
+
**(headers or {}),
|
|
9676
|
+
}
|
|
9541
9677
|
|
|
9542
9678
|
json = kwargs if data is UNSET else data
|
|
9543
|
-
|
|
9679
|
+
if self._github.config.rest_api_validate_body:
|
|
9680
|
+
json = type_validate_python(Union[ReposOwnerRepoForksPostBody, None], json)
|
|
9544
9681
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9545
9682
|
|
|
9546
9683
|
return self._github.request(
|
|
@@ -9602,13 +9739,15 @@ class ReposClient:
|
|
|
9602
9739
|
|
|
9603
9740
|
url = f"/repos/{owner}/{repo}/forks"
|
|
9604
9741
|
|
|
9605
|
-
headers = {
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9742
|
+
headers = {
|
|
9743
|
+
"Content-Type": "application/json",
|
|
9744
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9745
|
+
**(headers or {}),
|
|
9746
|
+
}
|
|
9609
9747
|
|
|
9610
9748
|
json = kwargs if data is UNSET else data
|
|
9611
|
-
|
|
9749
|
+
if self._github.config.rest_api_validate_body:
|
|
9750
|
+
json = type_validate_python(Union[ReposOwnerRepoForksPostBody, None], json)
|
|
9612
9751
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9613
9752
|
|
|
9614
9753
|
return await self._github.arequest(
|
|
@@ -9741,13 +9880,15 @@ class ReposClient:
|
|
|
9741
9880
|
|
|
9742
9881
|
url = f"/repos/{owner}/{repo}/hooks"
|
|
9743
9882
|
|
|
9744
|
-
headers = {
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9883
|
+
headers = {
|
|
9884
|
+
"Content-Type": "application/json",
|
|
9885
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9886
|
+
**(headers or {}),
|
|
9887
|
+
}
|
|
9748
9888
|
|
|
9749
9889
|
json = kwargs if data is UNSET else data
|
|
9750
|
-
|
|
9890
|
+
if self._github.config.rest_api_validate_body:
|
|
9891
|
+
json = type_validate_python(Union[ReposOwnerRepoHooksPostBody, None], json)
|
|
9751
9892
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9752
9893
|
|
|
9753
9894
|
return self._github.request(
|
|
@@ -9809,13 +9950,15 @@ class ReposClient:
|
|
|
9809
9950
|
|
|
9810
9951
|
url = f"/repos/{owner}/{repo}/hooks"
|
|
9811
9952
|
|
|
9812
|
-
headers = {
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9953
|
+
headers = {
|
|
9954
|
+
"Content-Type": "application/json",
|
|
9955
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
9956
|
+
**(headers or {}),
|
|
9957
|
+
}
|
|
9816
9958
|
|
|
9817
9959
|
json = kwargs if data is UNSET else data
|
|
9818
|
-
|
|
9960
|
+
if self._github.config.rest_api_validate_body:
|
|
9961
|
+
json = type_validate_python(Union[ReposOwnerRepoHooksPostBody, None], json)
|
|
9819
9962
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9820
9963
|
|
|
9821
9964
|
return await self._github.arequest(
|
|
@@ -9981,13 +10124,15 @@ class ReposClient:
|
|
|
9981
10124
|
|
|
9982
10125
|
url = f"/repos/{owner}/{repo}/hooks/{hook_id}"
|
|
9983
10126
|
|
|
9984
|
-
headers = {
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
10127
|
+
headers = {
|
|
10128
|
+
"Content-Type": "application/json",
|
|
10129
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10130
|
+
**(headers or {}),
|
|
10131
|
+
}
|
|
9988
10132
|
|
|
9989
10133
|
json = kwargs if data is UNSET else data
|
|
9990
|
-
|
|
10134
|
+
if self._github.config.rest_api_validate_body:
|
|
10135
|
+
json = type_validate_python(ReposOwnerRepoHooksHookIdPatchBody, json)
|
|
9991
10136
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
9992
10137
|
|
|
9993
10138
|
return self._github.request(
|
|
@@ -10050,13 +10195,15 @@ class ReposClient:
|
|
|
10050
10195
|
|
|
10051
10196
|
url = f"/repos/{owner}/{repo}/hooks/{hook_id}"
|
|
10052
10197
|
|
|
10053
|
-
headers = {
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10198
|
+
headers = {
|
|
10199
|
+
"Content-Type": "application/json",
|
|
10200
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10201
|
+
**(headers or {}),
|
|
10202
|
+
}
|
|
10057
10203
|
|
|
10058
10204
|
json = kwargs if data is UNSET else data
|
|
10059
|
-
|
|
10205
|
+
if self._github.config.rest_api_validate_body:
|
|
10206
|
+
json = type_validate_python(ReposOwnerRepoHooksHookIdPatchBody, json)
|
|
10060
10207
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10061
10208
|
|
|
10062
10209
|
return await self._github.arequest(
|
|
@@ -10159,13 +10306,15 @@ class ReposClient:
|
|
|
10159
10306
|
|
|
10160
10307
|
url = f"/repos/{owner}/{repo}/hooks/{hook_id}/config"
|
|
10161
10308
|
|
|
10162
|
-
headers = {
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10309
|
+
headers = {
|
|
10310
|
+
"Content-Type": "application/json",
|
|
10311
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10312
|
+
**(headers or {}),
|
|
10313
|
+
}
|
|
10166
10314
|
|
|
10167
10315
|
json = kwargs if data is UNSET else data
|
|
10168
|
-
|
|
10316
|
+
if self._github.config.rest_api_validate_body:
|
|
10317
|
+
json = type_validate_python(ReposOwnerRepoHooksHookIdConfigPatchBody, json)
|
|
10169
10318
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10170
10319
|
|
|
10171
10320
|
return self._github.request(
|
|
@@ -10218,13 +10367,15 @@ class ReposClient:
|
|
|
10218
10367
|
|
|
10219
10368
|
url = f"/repos/{owner}/{repo}/hooks/{hook_id}/config"
|
|
10220
10369
|
|
|
10221
|
-
headers = {
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10370
|
+
headers = {
|
|
10371
|
+
"Content-Type": "application/json",
|
|
10372
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10373
|
+
**(headers or {}),
|
|
10374
|
+
}
|
|
10225
10375
|
|
|
10226
10376
|
json = kwargs if data is UNSET else data
|
|
10227
|
-
|
|
10377
|
+
if self._github.config.rest_api_validate_body:
|
|
10378
|
+
json = type_validate_python(ReposOwnerRepoHooksHookIdConfigPatchBody, json)
|
|
10228
10379
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10229
10380
|
|
|
10230
10381
|
return await self._github.arequest(
|
|
@@ -10681,15 +10832,17 @@ class ReposClient:
|
|
|
10681
10832
|
|
|
10682
10833
|
url = f"/repos/{owner}/{repo}/invitations/{invitation_id}"
|
|
10683
10834
|
|
|
10684
|
-
headers = {
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10835
|
+
headers = {
|
|
10836
|
+
"Content-Type": "application/json",
|
|
10837
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10838
|
+
**(headers or {}),
|
|
10839
|
+
}
|
|
10688
10840
|
|
|
10689
10841
|
json = kwargs if data is UNSET else data
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10842
|
+
if self._github.config.rest_api_validate_body:
|
|
10843
|
+
json = type_validate_python(
|
|
10844
|
+
ReposOwnerRepoInvitationsInvitationIdPatchBody, json
|
|
10845
|
+
)
|
|
10693
10846
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10694
10847
|
|
|
10695
10848
|
return self._github.request(
|
|
@@ -10744,15 +10897,17 @@ class ReposClient:
|
|
|
10744
10897
|
|
|
10745
10898
|
url = f"/repos/{owner}/{repo}/invitations/{invitation_id}"
|
|
10746
10899
|
|
|
10747
|
-
headers = {
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10900
|
+
headers = {
|
|
10901
|
+
"Content-Type": "application/json",
|
|
10902
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
10903
|
+
**(headers or {}),
|
|
10904
|
+
}
|
|
10751
10905
|
|
|
10752
10906
|
json = kwargs if data is UNSET else data
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10907
|
+
if self._github.config.rest_api_validate_body:
|
|
10908
|
+
json = type_validate_python(
|
|
10909
|
+
ReposOwnerRepoInvitationsInvitationIdPatchBody, json
|
|
10910
|
+
)
|
|
10756
10911
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10757
10912
|
|
|
10758
10913
|
return await self._github.arequest(
|
|
@@ -10865,13 +11020,15 @@ class ReposClient:
|
|
|
10865
11020
|
|
|
10866
11021
|
url = f"/repos/{owner}/{repo}/keys"
|
|
10867
11022
|
|
|
10868
|
-
headers = {
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
11023
|
+
headers = {
|
|
11024
|
+
"Content-Type": "application/json",
|
|
11025
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11026
|
+
**(headers or {}),
|
|
11027
|
+
}
|
|
10872
11028
|
|
|
10873
11029
|
json = kwargs if data is UNSET else data
|
|
10874
|
-
|
|
11030
|
+
if self._github.config.rest_api_validate_body:
|
|
11031
|
+
json = type_validate_python(ReposOwnerRepoKeysPostBody, json)
|
|
10875
11032
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10876
11033
|
|
|
10877
11034
|
return self._github.request(
|
|
@@ -10923,13 +11080,15 @@ class ReposClient:
|
|
|
10923
11080
|
|
|
10924
11081
|
url = f"/repos/{owner}/{repo}/keys"
|
|
10925
11082
|
|
|
10926
|
-
headers = {
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
11083
|
+
headers = {
|
|
11084
|
+
"Content-Type": "application/json",
|
|
11085
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11086
|
+
**(headers or {}),
|
|
11087
|
+
}
|
|
10930
11088
|
|
|
10931
11089
|
json = kwargs if data is UNSET else data
|
|
10932
|
-
|
|
11090
|
+
if self._github.config.rest_api_validate_body:
|
|
11091
|
+
json = type_validate_python(ReposOwnerRepoKeysPostBody, json)
|
|
10933
11092
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
10934
11093
|
|
|
10935
11094
|
return await self._github.arequest(
|
|
@@ -11199,13 +11358,15 @@ class ReposClient:
|
|
|
11199
11358
|
|
|
11200
11359
|
url = f"/repos/{owner}/{repo}/merge-upstream"
|
|
11201
11360
|
|
|
11202
|
-
headers = {
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11361
|
+
headers = {
|
|
11362
|
+
"Content-Type": "application/json",
|
|
11363
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11364
|
+
**(headers or {}),
|
|
11365
|
+
}
|
|
11206
11366
|
|
|
11207
11367
|
json = kwargs if data is UNSET else data
|
|
11208
|
-
|
|
11368
|
+
if self._github.config.rest_api_validate_body:
|
|
11369
|
+
json = type_validate_python(ReposOwnerRepoMergeUpstreamPostBody, json)
|
|
11209
11370
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11210
11371
|
|
|
11211
11372
|
return self._github.request(
|
|
@@ -11253,13 +11414,15 @@ class ReposClient:
|
|
|
11253
11414
|
|
|
11254
11415
|
url = f"/repos/{owner}/{repo}/merge-upstream"
|
|
11255
11416
|
|
|
11256
|
-
headers = {
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11417
|
+
headers = {
|
|
11418
|
+
"Content-Type": "application/json",
|
|
11419
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11420
|
+
**(headers or {}),
|
|
11421
|
+
}
|
|
11260
11422
|
|
|
11261
11423
|
json = kwargs if data is UNSET else data
|
|
11262
|
-
|
|
11424
|
+
if self._github.config.rest_api_validate_body:
|
|
11425
|
+
json = type_validate_python(ReposOwnerRepoMergeUpstreamPostBody, json)
|
|
11263
11426
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11264
11427
|
|
|
11265
11428
|
return await self._github.arequest(
|
|
@@ -11314,13 +11477,15 @@ class ReposClient:
|
|
|
11314
11477
|
|
|
11315
11478
|
url = f"/repos/{owner}/{repo}/merges"
|
|
11316
11479
|
|
|
11317
|
-
headers = {
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11480
|
+
headers = {
|
|
11481
|
+
"Content-Type": "application/json",
|
|
11482
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11483
|
+
**(headers or {}),
|
|
11484
|
+
}
|
|
11321
11485
|
|
|
11322
11486
|
json = kwargs if data is UNSET else data
|
|
11323
|
-
|
|
11487
|
+
if self._github.config.rest_api_validate_body:
|
|
11488
|
+
json = type_validate_python(ReposOwnerRepoMergesPostBody, json)
|
|
11324
11489
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11325
11490
|
|
|
11326
11491
|
return self._github.request(
|
|
@@ -11378,13 +11543,15 @@ class ReposClient:
|
|
|
11378
11543
|
|
|
11379
11544
|
url = f"/repos/{owner}/{repo}/merges"
|
|
11380
11545
|
|
|
11381
|
-
headers = {
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11546
|
+
headers = {
|
|
11547
|
+
"Content-Type": "application/json",
|
|
11548
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11549
|
+
**(headers or {}),
|
|
11550
|
+
}
|
|
11385
11551
|
|
|
11386
11552
|
json = kwargs if data is UNSET else data
|
|
11387
|
-
|
|
11553
|
+
if self._github.config.rest_api_validate_body:
|
|
11554
|
+
json = type_validate_python(ReposOwnerRepoMergesPostBody, json)
|
|
11388
11555
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11389
11556
|
|
|
11390
11557
|
return await self._github.arequest(
|
|
@@ -11596,22 +11763,24 @@ class ReposClient:
|
|
|
11596
11763
|
|
|
11597
11764
|
url = f"/repos/{owner}/{repo}/pages"
|
|
11598
11765
|
|
|
11599
|
-
headers = {
|
|
11600
|
-
|
|
11601
|
-
|
|
11602
|
-
|
|
11766
|
+
headers = {
|
|
11767
|
+
"Content-Type": "application/json",
|
|
11768
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11769
|
+
**(headers or {}),
|
|
11770
|
+
}
|
|
11603
11771
|
|
|
11604
11772
|
json = kwargs if data is UNSET else data
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
|
|
11773
|
+
if self._github.config.rest_api_validate_body:
|
|
11774
|
+
json = type_validate_python(
|
|
11775
|
+
Union[
|
|
11776
|
+
ReposOwnerRepoPagesPutBodyAnyof0,
|
|
11777
|
+
ReposOwnerRepoPagesPutBodyAnyof1,
|
|
11778
|
+
ReposOwnerRepoPagesPutBodyAnyof2,
|
|
11779
|
+
ReposOwnerRepoPagesPutBodyAnyof3,
|
|
11780
|
+
ReposOwnerRepoPagesPutBodyAnyof4,
|
|
11781
|
+
],
|
|
11782
|
+
json,
|
|
11783
|
+
)
|
|
11615
11784
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11616
11785
|
|
|
11617
11786
|
return self._github.request(
|
|
@@ -11773,22 +11942,24 @@ class ReposClient:
|
|
|
11773
11942
|
|
|
11774
11943
|
url = f"/repos/{owner}/{repo}/pages"
|
|
11775
11944
|
|
|
11776
|
-
headers = {
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11945
|
+
headers = {
|
|
11946
|
+
"Content-Type": "application/json",
|
|
11947
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
11948
|
+
**(headers or {}),
|
|
11949
|
+
}
|
|
11780
11950
|
|
|
11781
11951
|
json = kwargs if data is UNSET else data
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11952
|
+
if self._github.config.rest_api_validate_body:
|
|
11953
|
+
json = type_validate_python(
|
|
11954
|
+
Union[
|
|
11955
|
+
ReposOwnerRepoPagesPutBodyAnyof0,
|
|
11956
|
+
ReposOwnerRepoPagesPutBodyAnyof1,
|
|
11957
|
+
ReposOwnerRepoPagesPutBodyAnyof2,
|
|
11958
|
+
ReposOwnerRepoPagesPutBodyAnyof3,
|
|
11959
|
+
ReposOwnerRepoPagesPutBodyAnyof4,
|
|
11960
|
+
],
|
|
11961
|
+
json,
|
|
11962
|
+
)
|
|
11792
11963
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11793
11964
|
|
|
11794
11965
|
return await self._github.arequest(
|
|
@@ -11872,21 +12043,23 @@ class ReposClient:
|
|
|
11872
12043
|
|
|
11873
12044
|
url = f"/repos/{owner}/{repo}/pages"
|
|
11874
12045
|
|
|
11875
|
-
headers = {
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
12046
|
+
headers = {
|
|
12047
|
+
"Content-Type": "application/json",
|
|
12048
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
12049
|
+
**(headers or {}),
|
|
12050
|
+
}
|
|
11879
12051
|
|
|
11880
12052
|
json = kwargs if data is UNSET else data
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
12053
|
+
if self._github.config.rest_api_validate_body:
|
|
12054
|
+
json = type_validate_python(
|
|
12055
|
+
Union[
|
|
12056
|
+
ReposOwnerRepoPagesPostBodyAnyof0,
|
|
12057
|
+
None,
|
|
12058
|
+
ReposOwnerRepoPagesPostBodyAnyof1,
|
|
12059
|
+
None,
|
|
12060
|
+
],
|
|
12061
|
+
json,
|
|
12062
|
+
)
|
|
11890
12063
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11891
12064
|
|
|
11892
12065
|
return self._github.request(
|
|
@@ -11970,21 +12143,23 @@ class ReposClient:
|
|
|
11970
12143
|
|
|
11971
12144
|
url = f"/repos/{owner}/{repo}/pages"
|
|
11972
12145
|
|
|
11973
|
-
headers = {
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
12146
|
+
headers = {
|
|
12147
|
+
"Content-Type": "application/json",
|
|
12148
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
12149
|
+
**(headers or {}),
|
|
12150
|
+
}
|
|
11977
12151
|
|
|
11978
12152
|
json = kwargs if data is UNSET else data
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
12153
|
+
if self._github.config.rest_api_validate_body:
|
|
12154
|
+
json = type_validate_python(
|
|
12155
|
+
Union[
|
|
12156
|
+
ReposOwnerRepoPagesPostBodyAnyof0,
|
|
12157
|
+
None,
|
|
12158
|
+
ReposOwnerRepoPagesPostBodyAnyof1,
|
|
12159
|
+
None,
|
|
12160
|
+
],
|
|
12161
|
+
json,
|
|
12162
|
+
)
|
|
11988
12163
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
11989
12164
|
|
|
11990
12165
|
return await self._github.arequest(
|
|
@@ -12294,13 +12469,15 @@ class ReposClient:
|
|
|
12294
12469
|
|
|
12295
12470
|
url = f"/repos/{owner}/{repo}/pages/deployments"
|
|
12296
12471
|
|
|
12297
|
-
headers = {
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12472
|
+
headers = {
|
|
12473
|
+
"Content-Type": "application/json",
|
|
12474
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
12475
|
+
**(headers or {}),
|
|
12476
|
+
}
|
|
12301
12477
|
|
|
12302
12478
|
json = kwargs if data is UNSET else data
|
|
12303
|
-
|
|
12479
|
+
if self._github.config.rest_api_validate_body:
|
|
12480
|
+
json = type_validate_python(ReposOwnerRepoPagesDeploymentsPostBody, json)
|
|
12304
12481
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
12305
12482
|
|
|
12306
12483
|
return self._github.request(
|
|
@@ -12361,13 +12538,15 @@ class ReposClient:
|
|
|
12361
12538
|
|
|
12362
12539
|
url = f"/repos/{owner}/{repo}/pages/deployments"
|
|
12363
12540
|
|
|
12364
|
-
headers = {
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12541
|
+
headers = {
|
|
12542
|
+
"Content-Type": "application/json",
|
|
12543
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
12544
|
+
**(headers or {}),
|
|
12545
|
+
}
|
|
12368
12546
|
|
|
12369
12547
|
json = kwargs if data is UNSET else data
|
|
12370
|
-
|
|
12548
|
+
if self._github.config.rest_api_validate_body:
|
|
12549
|
+
json = type_validate_python(ReposOwnerRepoPagesDeploymentsPostBody, json)
|
|
12371
12550
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
12372
12551
|
|
|
12373
12552
|
return await self._github.arequest(
|
|
@@ -12783,13 +12962,15 @@ class ReposClient:
|
|
|
12783
12962
|
|
|
12784
12963
|
url = f"/repos/{owner}/{repo}/properties/values"
|
|
12785
12964
|
|
|
12786
|
-
headers = {
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12965
|
+
headers = {
|
|
12966
|
+
"Content-Type": "application/json",
|
|
12967
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
12968
|
+
**(headers or {}),
|
|
12969
|
+
}
|
|
12790
12970
|
|
|
12791
12971
|
json = kwargs if data is UNSET else data
|
|
12792
|
-
|
|
12972
|
+
if self._github.config.rest_api_validate_body:
|
|
12973
|
+
json = type_validate_python(ReposOwnerRepoPropertiesValuesPatchBody, json)
|
|
12793
12974
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
12794
12975
|
|
|
12795
12976
|
return self._github.request(
|
|
@@ -12844,13 +13025,15 @@ class ReposClient:
|
|
|
12844
13025
|
|
|
12845
13026
|
url = f"/repos/{owner}/{repo}/properties/values"
|
|
12846
13027
|
|
|
12847
|
-
headers = {
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
13028
|
+
headers = {
|
|
13029
|
+
"Content-Type": "application/json",
|
|
13030
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13031
|
+
**(headers or {}),
|
|
13032
|
+
}
|
|
12851
13033
|
|
|
12852
13034
|
json = kwargs if data is UNSET else data
|
|
12853
|
-
|
|
13035
|
+
if self._github.config.rest_api_validate_body:
|
|
13036
|
+
json = type_validate_python(ReposOwnerRepoPropertiesValuesPatchBody, json)
|
|
12854
13037
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
12855
13038
|
|
|
12856
13039
|
return await self._github.arequest(
|
|
@@ -13114,13 +13297,15 @@ class ReposClient:
|
|
|
13114
13297
|
|
|
13115
13298
|
url = f"/repos/{owner}/{repo}/releases"
|
|
13116
13299
|
|
|
13117
|
-
headers = {
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13300
|
+
headers = {
|
|
13301
|
+
"Content-Type": "application/json",
|
|
13302
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13303
|
+
**(headers or {}),
|
|
13304
|
+
}
|
|
13121
13305
|
|
|
13122
13306
|
json = kwargs if data is UNSET else data
|
|
13123
|
-
|
|
13307
|
+
if self._github.config.rest_api_validate_body:
|
|
13308
|
+
json = type_validate_python(ReposOwnerRepoReleasesPostBody, json)
|
|
13124
13309
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13125
13310
|
|
|
13126
13311
|
return self._github.request(
|
|
@@ -13184,13 +13369,15 @@ class ReposClient:
|
|
|
13184
13369
|
|
|
13185
13370
|
url = f"/repos/{owner}/{repo}/releases"
|
|
13186
13371
|
|
|
13187
|
-
headers = {
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13372
|
+
headers = {
|
|
13373
|
+
"Content-Type": "application/json",
|
|
13374
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13375
|
+
**(headers or {}),
|
|
13376
|
+
}
|
|
13191
13377
|
|
|
13192
13378
|
json = kwargs if data is UNSET else data
|
|
13193
|
-
|
|
13379
|
+
if self._github.config.rest_api_validate_body:
|
|
13380
|
+
json = type_validate_python(ReposOwnerRepoReleasesPostBody, json)
|
|
13194
13381
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13195
13382
|
|
|
13196
13383
|
return await self._github.arequest(
|
|
@@ -13338,13 +13525,17 @@ class ReposClient:
|
|
|
13338
13525
|
|
|
13339
13526
|
url = f"/repos/{owner}/{repo}/releases/assets/{asset_id}"
|
|
13340
13527
|
|
|
13341
|
-
headers = {
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13528
|
+
headers = {
|
|
13529
|
+
"Content-Type": "application/json",
|
|
13530
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13531
|
+
**(headers or {}),
|
|
13532
|
+
}
|
|
13345
13533
|
|
|
13346
13534
|
json = kwargs if data is UNSET else data
|
|
13347
|
-
|
|
13535
|
+
if self._github.config.rest_api_validate_body:
|
|
13536
|
+
json = type_validate_python(
|
|
13537
|
+
ReposOwnerRepoReleasesAssetsAssetIdPatchBody, json
|
|
13538
|
+
)
|
|
13348
13539
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13349
13540
|
|
|
13350
13541
|
return self._github.request(
|
|
@@ -13396,13 +13587,17 @@ class ReposClient:
|
|
|
13396
13587
|
|
|
13397
13588
|
url = f"/repos/{owner}/{repo}/releases/assets/{asset_id}"
|
|
13398
13589
|
|
|
13399
|
-
headers = {
|
|
13400
|
-
|
|
13401
|
-
|
|
13402
|
-
|
|
13590
|
+
headers = {
|
|
13591
|
+
"Content-Type": "application/json",
|
|
13592
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13593
|
+
**(headers or {}),
|
|
13594
|
+
}
|
|
13403
13595
|
|
|
13404
13596
|
json = kwargs if data is UNSET else data
|
|
13405
|
-
|
|
13597
|
+
if self._github.config.rest_api_validate_body:
|
|
13598
|
+
json = type_validate_python(
|
|
13599
|
+
ReposOwnerRepoReleasesAssetsAssetIdPatchBody, json
|
|
13600
|
+
)
|
|
13406
13601
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13407
13602
|
|
|
13408
13603
|
return await self._github.arequest(
|
|
@@ -13456,13 +13651,17 @@ class ReposClient:
|
|
|
13456
13651
|
|
|
13457
13652
|
url = f"/repos/{owner}/{repo}/releases/generate-notes"
|
|
13458
13653
|
|
|
13459
|
-
headers = {
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13654
|
+
headers = {
|
|
13655
|
+
"Content-Type": "application/json",
|
|
13656
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13657
|
+
**(headers or {}),
|
|
13658
|
+
}
|
|
13463
13659
|
|
|
13464
13660
|
json = kwargs if data is UNSET else data
|
|
13465
|
-
|
|
13661
|
+
if self._github.config.rest_api_validate_body:
|
|
13662
|
+
json = type_validate_python(
|
|
13663
|
+
ReposOwnerRepoReleasesGenerateNotesPostBody, json
|
|
13664
|
+
)
|
|
13466
13665
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13467
13666
|
|
|
13468
13667
|
return self._github.request(
|
|
@@ -13519,13 +13718,17 @@ class ReposClient:
|
|
|
13519
13718
|
|
|
13520
13719
|
url = f"/repos/{owner}/{repo}/releases/generate-notes"
|
|
13521
13720
|
|
|
13522
|
-
headers = {
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13721
|
+
headers = {
|
|
13722
|
+
"Content-Type": "application/json",
|
|
13723
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13724
|
+
**(headers or {}),
|
|
13725
|
+
}
|
|
13526
13726
|
|
|
13527
13727
|
json = kwargs if data is UNSET else data
|
|
13528
|
-
|
|
13728
|
+
if self._github.config.rest_api_validate_body:
|
|
13729
|
+
json = type_validate_python(
|
|
13730
|
+
ReposOwnerRepoReleasesGenerateNotesPostBody, json
|
|
13731
|
+
)
|
|
13529
13732
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13530
13733
|
|
|
13531
13734
|
return await self._github.arequest(
|
|
@@ -13773,13 +13976,15 @@ class ReposClient:
|
|
|
13773
13976
|
|
|
13774
13977
|
url = f"/repos/{owner}/{repo}/releases/{release_id}"
|
|
13775
13978
|
|
|
13776
|
-
headers = {
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13979
|
+
headers = {
|
|
13980
|
+
"Content-Type": "application/json",
|
|
13981
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
13982
|
+
**(headers or {}),
|
|
13983
|
+
}
|
|
13780
13984
|
|
|
13781
13985
|
json = kwargs if data is UNSET else data
|
|
13782
|
-
|
|
13986
|
+
if self._github.config.rest_api_validate_body:
|
|
13987
|
+
json = type_validate_python(ReposOwnerRepoReleasesReleaseIdPatchBody, json)
|
|
13783
13988
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13784
13989
|
|
|
13785
13990
|
return self._github.request(
|
|
@@ -13843,13 +14048,15 @@ class ReposClient:
|
|
|
13843
14048
|
|
|
13844
14049
|
url = f"/repos/{owner}/{repo}/releases/{release_id}"
|
|
13845
14050
|
|
|
13846
|
-
headers = {
|
|
13847
|
-
|
|
13848
|
-
|
|
13849
|
-
|
|
14051
|
+
headers = {
|
|
14052
|
+
"Content-Type": "application/json",
|
|
14053
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14054
|
+
**(headers or {}),
|
|
14055
|
+
}
|
|
13850
14056
|
|
|
13851
14057
|
json = kwargs if data is UNSET else data
|
|
13852
|
-
|
|
14058
|
+
if self._github.config.rest_api_validate_body:
|
|
14059
|
+
json = type_validate_python(ReposOwnerRepoReleasesReleaseIdPatchBody, json)
|
|
13853
14060
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
13854
14061
|
|
|
13855
14062
|
return await self._github.arequest(
|
|
@@ -13939,12 +14146,9 @@ class ReposClient:
|
|
|
13939
14146
|
*,
|
|
13940
14147
|
headers: Optional[Dict[str, str]] = None,
|
|
13941
14148
|
data: FileTypes,
|
|
13942
|
-
**kwargs,
|
|
13943
14149
|
) -> Response[ReleaseAsset]:
|
|
13944
14150
|
"""See also: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#upload-a-release-asset"""
|
|
13945
14151
|
|
|
13946
|
-
from githubkit.typing import FileTypes
|
|
13947
|
-
|
|
13948
14152
|
from ..models import ReleaseAsset
|
|
13949
14153
|
|
|
13950
14154
|
url = f"/repos/{owner}/{repo}/releases/{release_id}/assets"
|
|
@@ -13954,14 +14158,13 @@ class ReposClient:
|
|
|
13954
14158
|
"label": label,
|
|
13955
14159
|
}
|
|
13956
14160
|
|
|
13957
|
-
headers = {
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
14161
|
+
headers = {
|
|
14162
|
+
"Content-Type": "application/octet-stream",
|
|
14163
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14164
|
+
**(headers or {}),
|
|
14165
|
+
}
|
|
13961
14166
|
|
|
13962
|
-
content =
|
|
13963
|
-
content = type_validate_python(FileTypes, content)
|
|
13964
|
-
content = model_dump(content) if isinstance(content, BaseModel) else content
|
|
14167
|
+
content = data
|
|
13965
14168
|
|
|
13966
14169
|
return self._github.request(
|
|
13967
14170
|
"POST",
|
|
@@ -13983,12 +14186,9 @@ class ReposClient:
|
|
|
13983
14186
|
*,
|
|
13984
14187
|
headers: Optional[Dict[str, str]] = None,
|
|
13985
14188
|
data: FileTypes,
|
|
13986
|
-
**kwargs,
|
|
13987
14189
|
) -> Response[ReleaseAsset]:
|
|
13988
14190
|
"""See also: https://docs.github.com/enterprise-cloud@latest//rest/releases/assets#upload-a-release-asset"""
|
|
13989
14191
|
|
|
13990
|
-
from githubkit.typing import FileTypes
|
|
13991
|
-
|
|
13992
14192
|
from ..models import ReleaseAsset
|
|
13993
14193
|
|
|
13994
14194
|
url = f"/repos/{owner}/{repo}/releases/{release_id}/assets"
|
|
@@ -13998,14 +14198,13 @@ class ReposClient:
|
|
|
13998
14198
|
"label": label,
|
|
13999
14199
|
}
|
|
14000
14200
|
|
|
14001
|
-
headers = {
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14201
|
+
headers = {
|
|
14202
|
+
"Content-Type": "application/octet-stream",
|
|
14203
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14204
|
+
**(headers or {}),
|
|
14205
|
+
}
|
|
14005
14206
|
|
|
14006
|
-
content =
|
|
14007
|
-
content = type_validate_python(FileTypes, content)
|
|
14008
|
-
content = model_dump(content) if isinstance(content, BaseModel) else content
|
|
14207
|
+
content = data
|
|
14009
14208
|
|
|
14010
14209
|
return await self._github.arequest(
|
|
14011
14210
|
"POST",
|
|
@@ -14210,6 +14409,7 @@ class ReposClient:
|
|
|
14210
14409
|
per_page: Missing[int] = UNSET,
|
|
14211
14410
|
page: Missing[int] = UNSET,
|
|
14212
14411
|
includes_parents: Missing[bool] = UNSET,
|
|
14412
|
+
targets: Missing[str] = UNSET,
|
|
14213
14413
|
*,
|
|
14214
14414
|
headers: Optional[Dict[str, str]] = None,
|
|
14215
14415
|
) -> Response[List[RepositoryRuleset]]:
|
|
@@ -14225,6 +14425,7 @@ class ReposClient:
|
|
|
14225
14425
|
"per_page": per_page,
|
|
14226
14426
|
"page": page,
|
|
14227
14427
|
"includes_parents": includes_parents,
|
|
14428
|
+
"targets": targets,
|
|
14228
14429
|
}
|
|
14229
14430
|
|
|
14230
14431
|
headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
|
|
@@ -14248,6 +14449,7 @@ class ReposClient:
|
|
|
14248
14449
|
per_page: Missing[int] = UNSET,
|
|
14249
14450
|
page: Missing[int] = UNSET,
|
|
14250
14451
|
includes_parents: Missing[bool] = UNSET,
|
|
14452
|
+
targets: Missing[str] = UNSET,
|
|
14251
14453
|
*,
|
|
14252
14454
|
headers: Optional[Dict[str, str]] = None,
|
|
14253
14455
|
) -> Response[List[RepositoryRuleset]]:
|
|
@@ -14263,6 +14465,7 @@ class ReposClient:
|
|
|
14263
14465
|
"per_page": per_page,
|
|
14264
14466
|
"page": page,
|
|
14265
14467
|
"includes_parents": includes_parents,
|
|
14468
|
+
"targets": targets,
|
|
14266
14469
|
}
|
|
14267
14470
|
|
|
14268
14471
|
headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
|
|
@@ -14350,13 +14553,15 @@ class ReposClient:
|
|
|
14350
14553
|
|
|
14351
14554
|
url = f"/repos/{owner}/{repo}/rulesets"
|
|
14352
14555
|
|
|
14353
|
-
headers = {
|
|
14354
|
-
|
|
14355
|
-
|
|
14356
|
-
|
|
14556
|
+
headers = {
|
|
14557
|
+
"Content-Type": "application/json",
|
|
14558
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14559
|
+
**(headers or {}),
|
|
14560
|
+
}
|
|
14357
14561
|
|
|
14358
14562
|
json = kwargs if data is UNSET else data
|
|
14359
|
-
|
|
14563
|
+
if self._github.config.rest_api_validate_body:
|
|
14564
|
+
json = type_validate_python(ReposOwnerRepoRulesetsPostBody, json)
|
|
14360
14565
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
14361
14566
|
|
|
14362
14567
|
return self._github.request(
|
|
@@ -14442,13 +14647,15 @@ class ReposClient:
|
|
|
14442
14647
|
|
|
14443
14648
|
url = f"/repos/{owner}/{repo}/rulesets"
|
|
14444
14649
|
|
|
14445
|
-
headers = {
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14650
|
+
headers = {
|
|
14651
|
+
"Content-Type": "application/json",
|
|
14652
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14653
|
+
**(headers or {}),
|
|
14654
|
+
}
|
|
14449
14655
|
|
|
14450
14656
|
json = kwargs if data is UNSET else data
|
|
14451
|
-
|
|
14657
|
+
if self._github.config.rest_api_validate_body:
|
|
14658
|
+
json = type_validate_python(ReposOwnerRepoRulesetsPostBody, json)
|
|
14452
14659
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
14453
14660
|
|
|
14454
14661
|
return await self._github.arequest(
|
|
@@ -14745,13 +14952,15 @@ class ReposClient:
|
|
|
14745
14952
|
|
|
14746
14953
|
url = f"/repos/{owner}/{repo}/rulesets/{ruleset_id}"
|
|
14747
14954
|
|
|
14748
|
-
headers = {
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14955
|
+
headers = {
|
|
14956
|
+
"Content-Type": "application/json",
|
|
14957
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
14958
|
+
**(headers or {}),
|
|
14959
|
+
}
|
|
14752
14960
|
|
|
14753
14961
|
json = kwargs if data is UNSET else data
|
|
14754
|
-
|
|
14962
|
+
if self._github.config.rest_api_validate_body:
|
|
14963
|
+
json = type_validate_python(ReposOwnerRepoRulesetsRulesetIdPutBody, json)
|
|
14755
14964
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
14756
14965
|
|
|
14757
14966
|
return self._github.request(
|
|
@@ -14840,13 +15049,15 @@ class ReposClient:
|
|
|
14840
15049
|
|
|
14841
15050
|
url = f"/repos/{owner}/{repo}/rulesets/{ruleset_id}"
|
|
14842
15051
|
|
|
14843
|
-
headers = {
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
15052
|
+
headers = {
|
|
15053
|
+
"Content-Type": "application/json",
|
|
15054
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
15055
|
+
**(headers or {}),
|
|
15056
|
+
}
|
|
14847
15057
|
|
|
14848
15058
|
json = kwargs if data is UNSET else data
|
|
14849
|
-
|
|
15059
|
+
if self._github.config.rest_api_validate_body:
|
|
15060
|
+
json = type_validate_python(ReposOwnerRepoRulesetsRulesetIdPutBody, json)
|
|
14850
15061
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
14851
15062
|
|
|
14852
15063
|
return await self._github.arequest(
|
|
@@ -15191,13 +15402,15 @@ class ReposClient:
|
|
|
15191
15402
|
|
|
15192
15403
|
url = f"/repos/{owner}/{repo}/statuses/{sha}"
|
|
15193
15404
|
|
|
15194
|
-
headers = {
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15405
|
+
headers = {
|
|
15406
|
+
"Content-Type": "application/json",
|
|
15407
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
15408
|
+
**(headers or {}),
|
|
15409
|
+
}
|
|
15198
15410
|
|
|
15199
15411
|
json = kwargs if data is UNSET else data
|
|
15200
|
-
|
|
15412
|
+
if self._github.config.rest_api_validate_body:
|
|
15413
|
+
json = type_validate_python(ReposOwnerRepoStatusesShaPostBody, json)
|
|
15201
15414
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15202
15415
|
|
|
15203
15416
|
return self._github.request(
|
|
@@ -15250,13 +15463,15 @@ class ReposClient:
|
|
|
15250
15463
|
|
|
15251
15464
|
url = f"/repos/{owner}/{repo}/statuses/{sha}"
|
|
15252
15465
|
|
|
15253
|
-
headers = {
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15466
|
+
headers = {
|
|
15467
|
+
"Content-Type": "application/json",
|
|
15468
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
15469
|
+
**(headers or {}),
|
|
15470
|
+
}
|
|
15257
15471
|
|
|
15258
15472
|
json = kwargs if data is UNSET else data
|
|
15259
|
-
|
|
15473
|
+
if self._github.config.rest_api_validate_body:
|
|
15474
|
+
json = type_validate_python(ReposOwnerRepoStatusesShaPostBody, json)
|
|
15260
15475
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15261
15476
|
|
|
15262
15477
|
return await self._github.arequest(
|
|
@@ -15427,13 +15642,15 @@ class ReposClient:
|
|
|
15427
15642
|
|
|
15428
15643
|
url = f"/repos/{owner}/{repo}/tags/protection"
|
|
15429
15644
|
|
|
15430
|
-
headers = {
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15645
|
+
headers = {
|
|
15646
|
+
"Content-Type": "application/json",
|
|
15647
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
15648
|
+
**(headers or {}),
|
|
15649
|
+
}
|
|
15434
15650
|
|
|
15435
15651
|
json = kwargs if data is UNSET else data
|
|
15436
|
-
|
|
15652
|
+
if self._github.config.rest_api_validate_body:
|
|
15653
|
+
json = type_validate_python(ReposOwnerRepoTagsProtectionPostBody, json)
|
|
15437
15654
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15438
15655
|
|
|
15439
15656
|
return self._github.request(
|
|
@@ -15488,13 +15705,15 @@ class ReposClient:
|
|
|
15488
15705
|
|
|
15489
15706
|
url = f"/repos/{owner}/{repo}/tags/protection"
|
|
15490
15707
|
|
|
15491
|
-
headers = {
|
|
15492
|
-
|
|
15493
|
-
|
|
15494
|
-
|
|
15708
|
+
headers = {
|
|
15709
|
+
"Content-Type": "application/json",
|
|
15710
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
15711
|
+
**(headers or {}),
|
|
15712
|
+
}
|
|
15495
15713
|
|
|
15496
15714
|
json = kwargs if data is UNSET else data
|
|
15497
|
-
|
|
15715
|
+
if self._github.config.rest_api_validate_body:
|
|
15716
|
+
json = type_validate_python(ReposOwnerRepoTagsProtectionPostBody, json)
|
|
15498
15717
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15499
15718
|
|
|
15500
15719
|
return await self._github.arequest(
|
|
@@ -15778,13 +15997,15 @@ class ReposClient:
|
|
|
15778
15997
|
|
|
15779
15998
|
url = f"/repos/{owner}/{repo}/topics"
|
|
15780
15999
|
|
|
15781
|
-
headers = {
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
16000
|
+
headers = {
|
|
16001
|
+
"Content-Type": "application/json",
|
|
16002
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16003
|
+
**(headers or {}),
|
|
16004
|
+
}
|
|
15785
16005
|
|
|
15786
16006
|
json = kwargs if data is UNSET else data
|
|
15787
|
-
|
|
16007
|
+
if self._github.config.rest_api_validate_body:
|
|
16008
|
+
json = type_validate_python(ReposOwnerRepoTopicsPutBody, json)
|
|
15788
16009
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15789
16010
|
|
|
15790
16011
|
return self._github.request(
|
|
@@ -15840,13 +16061,15 @@ class ReposClient:
|
|
|
15840
16061
|
|
|
15841
16062
|
url = f"/repos/{owner}/{repo}/topics"
|
|
15842
16063
|
|
|
15843
|
-
headers = {
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
16064
|
+
headers = {
|
|
16065
|
+
"Content-Type": "application/json",
|
|
16066
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16067
|
+
**(headers or {}),
|
|
16068
|
+
}
|
|
15847
16069
|
|
|
15848
16070
|
json = kwargs if data is UNSET else data
|
|
15849
|
-
|
|
16071
|
+
if self._github.config.rest_api_validate_body:
|
|
16072
|
+
json = type_validate_python(ReposOwnerRepoTopicsPutBody, json)
|
|
15850
16073
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
15851
16074
|
|
|
15852
16075
|
return await self._github.arequest(
|
|
@@ -16131,13 +16354,15 @@ class ReposClient:
|
|
|
16131
16354
|
|
|
16132
16355
|
url = f"/repos/{owner}/{repo}/transfer"
|
|
16133
16356
|
|
|
16134
|
-
headers = {
|
|
16135
|
-
|
|
16136
|
-
|
|
16137
|
-
|
|
16357
|
+
headers = {
|
|
16358
|
+
"Content-Type": "application/json",
|
|
16359
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16360
|
+
**(headers or {}),
|
|
16361
|
+
}
|
|
16138
16362
|
|
|
16139
16363
|
json = kwargs if data is UNSET else data
|
|
16140
|
-
|
|
16364
|
+
if self._github.config.rest_api_validate_body:
|
|
16365
|
+
json = type_validate_python(ReposOwnerRepoTransferPostBody, json)
|
|
16141
16366
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16142
16367
|
|
|
16143
16368
|
return self._github.request(
|
|
@@ -16186,13 +16411,15 @@ class ReposClient:
|
|
|
16186
16411
|
|
|
16187
16412
|
url = f"/repos/{owner}/{repo}/transfer"
|
|
16188
16413
|
|
|
16189
|
-
headers = {
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16414
|
+
headers = {
|
|
16415
|
+
"Content-Type": "application/json",
|
|
16416
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16417
|
+
**(headers or {}),
|
|
16418
|
+
}
|
|
16193
16419
|
|
|
16194
16420
|
json = kwargs if data is UNSET else data
|
|
16195
|
-
|
|
16421
|
+
if self._github.config.rest_api_validate_body:
|
|
16422
|
+
json = type_validate_python(ReposOwnerRepoTransferPostBody, json)
|
|
16196
16423
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16197
16424
|
|
|
16198
16425
|
return await self._github.arequest(
|
|
@@ -16402,15 +16629,17 @@ class ReposClient:
|
|
|
16402
16629
|
|
|
16403
16630
|
url = f"/repos/{template_owner}/{template_repo}/generate"
|
|
16404
16631
|
|
|
16405
|
-
headers = {
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16632
|
+
headers = {
|
|
16633
|
+
"Content-Type": "application/json",
|
|
16634
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16635
|
+
**(headers or {}),
|
|
16636
|
+
}
|
|
16409
16637
|
|
|
16410
16638
|
json = kwargs if data is UNSET else data
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16639
|
+
if self._github.config.rest_api_validate_body:
|
|
16640
|
+
json = type_validate_python(
|
|
16641
|
+
ReposTemplateOwnerTemplateRepoGeneratePostBody, json
|
|
16642
|
+
)
|
|
16414
16643
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16415
16644
|
|
|
16416
16645
|
return self._github.request(
|
|
@@ -16464,15 +16693,17 @@ class ReposClient:
|
|
|
16464
16693
|
|
|
16465
16694
|
url = f"/repos/{template_owner}/{template_repo}/generate"
|
|
16466
16695
|
|
|
16467
|
-
headers = {
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
|
|
16696
|
+
headers = {
|
|
16697
|
+
"Content-Type": "application/json",
|
|
16698
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16699
|
+
**(headers or {}),
|
|
16700
|
+
}
|
|
16471
16701
|
|
|
16472
16702
|
json = kwargs if data is UNSET else data
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16703
|
+
if self._github.config.rest_api_validate_body:
|
|
16704
|
+
json = type_validate_python(
|
|
16705
|
+
ReposTemplateOwnerTemplateRepoGeneratePostBody, json
|
|
16706
|
+
)
|
|
16476
16707
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16477
16708
|
|
|
16478
16709
|
return await self._github.arequest(
|
|
@@ -16701,13 +16932,15 @@ class ReposClient:
|
|
|
16701
16932
|
|
|
16702
16933
|
url = "/user/repos"
|
|
16703
16934
|
|
|
16704
|
-
headers = {
|
|
16705
|
-
|
|
16706
|
-
|
|
16707
|
-
|
|
16935
|
+
headers = {
|
|
16936
|
+
"Content-Type": "application/json",
|
|
16937
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
16938
|
+
**(headers or {}),
|
|
16939
|
+
}
|
|
16708
16940
|
|
|
16709
16941
|
json = kwargs if data is UNSET else data
|
|
16710
|
-
|
|
16942
|
+
if self._github.config.rest_api_validate_body:
|
|
16943
|
+
json = type_validate_python(UserReposPostBody, json)
|
|
16711
16944
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16712
16945
|
|
|
16713
16946
|
return self._github.request(
|
|
@@ -16783,13 +17016,15 @@ class ReposClient:
|
|
|
16783
17016
|
|
|
16784
17017
|
url = "/user/repos"
|
|
16785
17018
|
|
|
16786
|
-
headers = {
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
17019
|
+
headers = {
|
|
17020
|
+
"Content-Type": "application/json",
|
|
17021
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
17022
|
+
**(headers or {}),
|
|
17023
|
+
}
|
|
16790
17024
|
|
|
16791
17025
|
json = kwargs if data is UNSET else data
|
|
16792
|
-
|
|
17026
|
+
if self._github.config.rest_api_validate_body:
|
|
17027
|
+
json = type_validate_python(UserReposPostBody, json)
|
|
16793
17028
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
16794
17029
|
|
|
16795
17030
|
return await self._github.arequest(
|