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

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

Potentially problematic release.


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

Files changed (66) hide show
  1. githubkit/config.py +3 -0
  2. githubkit/core.py +5 -0
  3. githubkit/github.py +3 -0
  4. githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -1
  5. githubkit/versions/ghec_v2022_11_28/rest/actions.py +652 -472
  6. githubkit/versions/ghec_v2022_11_28/rest/activity.py +60 -44
  7. githubkit/versions/ghec_v2022_11_28/rest/apps.py +102 -74
  8. githubkit/versions/ghec_v2022_11_28/rest/billing.py +40 -32
  9. githubkit/versions/ghec_v2022_11_28/rest/checks.py +84 -64
  10. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +74 -58
  11. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +86 -66
  12. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +218 -154
  13. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +72 -40
  14. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +68 -52
  15. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +14 -10
  16. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +278 -208
  17. githubkit/versions/ghec_v2022_11_28/rest/gists.py +56 -40
  18. githubkit/versions/ghec_v2022_11_28/rest/git.py +84 -60
  19. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +42 -30
  20. githubkit/versions/ghec_v2022_11_28/rest/issues.py +250 -198
  21. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +34 -26
  22. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +92 -60
  23. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +14 -10
  24. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +362 -246
  25. githubkit/versions/ghec_v2022_11_28/rest/projects.py +170 -126
  26. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +234 -170
  27. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +166 -130
  28. githubkit/versions/ghec_v2022_11_28/rest/repos.py +1020 -766
  29. githubkit/versions/ghec_v2022_11_28/rest/scim.py +50 -34
  30. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +36 -28
  31. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +42 -30
  32. githubkit/versions/ghec_v2022_11_28/rest/teams.py +324 -238
  33. githubkit/versions/ghec_v2022_11_28/rest/users.py +154 -118
  34. githubkit/versions/ghec_v2022_11_28/types/group_0088.py +0 -1
  35. githubkit/versions/v2022_11_28/models/group_0060.py +0 -1
  36. githubkit/versions/v2022_11_28/rest/actions.py +534 -386
  37. githubkit/versions/v2022_11_28/rest/activity.py +60 -44
  38. githubkit/versions/v2022_11_28/rest/apps.py +102 -74
  39. githubkit/versions/v2022_11_28/rest/checks.py +84 -64
  40. githubkit/versions/v2022_11_28/rest/code_scanning.py +74 -58
  41. githubkit/versions/v2022_11_28/rest/code_security.py +86 -66
  42. githubkit/versions/v2022_11_28/rest/codespaces.py +218 -154
  43. githubkit/versions/v2022_11_28/rest/copilot.py +72 -40
  44. githubkit/versions/v2022_11_28/rest/dependabot.py +68 -52
  45. githubkit/versions/v2022_11_28/rest/dependency_graph.py +14 -10
  46. githubkit/versions/v2022_11_28/rest/gists.py +56 -40
  47. githubkit/versions/v2022_11_28/rest/git.py +84 -60
  48. githubkit/versions/v2022_11_28/rest/interactions.py +42 -30
  49. githubkit/versions/v2022_11_28/rest/issues.py +250 -198
  50. githubkit/versions/v2022_11_28/rest/markdown.py +34 -26
  51. githubkit/versions/v2022_11_28/rest/migrations.py +92 -60
  52. githubkit/versions/v2022_11_28/rest/oidc.py +14 -10
  53. githubkit/versions/v2022_11_28/rest/orgs.py +240 -168
  54. githubkit/versions/v2022_11_28/rest/projects.py +170 -126
  55. githubkit/versions/v2022_11_28/rest/pulls.py +234 -170
  56. githubkit/versions/v2022_11_28/rest/reactions.py +166 -130
  57. githubkit/versions/v2022_11_28/rest/repos.py +1020 -766
  58. githubkit/versions/v2022_11_28/rest/secret_scanning.py +36 -28
  59. githubkit/versions/v2022_11_28/rest/security_advisories.py +42 -30
  60. githubkit/versions/v2022_11_28/rest/teams.py +274 -204
  61. githubkit/versions/v2022_11_28/rest/users.py +154 -118
  62. githubkit/versions/v2022_11_28/types/group_0060.py +0 -1
  63. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/METADATA +2 -1
  64. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/RECORD +66 -66
  65. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
  66. {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
@@ -73,13 +73,15 @@ class MarkdownClient:
73
73
 
74
74
  url = "/markdown"
75
75
 
76
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
77
-
78
- if not kwargs:
79
- kwargs = UNSET
76
+ headers = {
77
+ "Content-Type": "application/json",
78
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
79
+ **(headers or {}),
80
+ }
80
81
 
81
82
  json = kwargs if data is UNSET else data
82
- json = type_validate_python(MarkdownPostBody, json)
83
+ if self._github.config.rest_api_validate_body:
84
+ json = type_validate_python(MarkdownPostBody, json)
83
85
  json = model_dump(json) if isinstance(json, BaseModel) else json
84
86
 
85
87
  return self._github.request(
@@ -119,13 +121,15 @@ class MarkdownClient:
119
121
 
120
122
  url = "/markdown"
121
123
 
122
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
123
-
124
- if not kwargs:
125
- kwargs = UNSET
124
+ headers = {
125
+ "Content-Type": "application/json",
126
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
127
+ **(headers or {}),
128
+ }
126
129
 
127
130
  json = kwargs if data is UNSET else data
128
- json = type_validate_python(MarkdownPostBody, json)
131
+ if self._github.config.rest_api_validate_body:
132
+ json = type_validate_python(MarkdownPostBody, json)
129
133
  json = model_dump(json) if isinstance(json, BaseModel) else json
130
134
 
131
135
  return await self._github.arequest(
@@ -137,20 +141,22 @@ class MarkdownClient:
137
141
  )
138
142
 
139
143
  def render_raw(
140
- self, *, headers: Optional[Dict[str, str]] = None, data: str, **kwargs
144
+ self,
145
+ *,
146
+ headers: Optional[Dict[str, str]] = None,
147
+ data: str,
141
148
  ) -> Response[str]:
142
149
  """See also: https://docs.github.com/enterprise-cloud@latest//rest/markdown/markdown#render-a-markdown-document-in-raw-mode"""
143
150
 
144
151
  url = "/markdown/raw"
145
152
 
146
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
153
+ headers = {
154
+ "Content-Type": "text/plain",
155
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
156
+ **(headers or {}),
157
+ }
147
158
 
148
- if not kwargs:
149
- kwargs = UNSET
150
-
151
- content = kwargs if data is UNSET else data
152
- content = type_validate_python(str, content)
153
- content = model_dump(content) if isinstance(content, BaseModel) else content
159
+ content = data
154
160
 
155
161
  return self._github.request(
156
162
  "POST",
@@ -161,20 +167,22 @@ class MarkdownClient:
161
167
  )
162
168
 
163
169
  async def async_render_raw(
164
- self, *, headers: Optional[Dict[str, str]] = None, data: str, **kwargs
170
+ self,
171
+ *,
172
+ headers: Optional[Dict[str, str]] = None,
173
+ data: str,
165
174
  ) -> Response[str]:
166
175
  """See also: https://docs.github.com/enterprise-cloud@latest//rest/markdown/markdown#render-a-markdown-document-in-raw-mode"""
167
176
 
168
177
  url = "/markdown/raw"
169
178
 
170
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
171
-
172
- if not kwargs:
173
- kwargs = UNSET
179
+ headers = {
180
+ "Content-Type": "text/plain",
181
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
182
+ **(headers or {}),
183
+ }
174
184
 
175
- content = kwargs if data is UNSET else data
176
- content = type_validate_python(str, content)
177
- content = model_dump(content) if isinstance(content, BaseModel) else content
185
+ content = data
178
186
 
179
187
  return await self._github.arequest(
180
188
  "POST",
@@ -170,13 +170,15 @@ class MigrationsClient:
170
170
 
171
171
  url = f"/orgs/{org}/migrations"
172
172
 
173
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
174
-
175
- if not kwargs:
176
- kwargs = UNSET
173
+ headers = {
174
+ "Content-Type": "application/json",
175
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
176
+ **(headers or {}),
177
+ }
177
178
 
178
179
  json = kwargs if data is UNSET else data
179
- json = type_validate_python(OrgsOrgMigrationsPostBody, json)
180
+ if self._github.config.rest_api_validate_body:
181
+ json = type_validate_python(OrgsOrgMigrationsPostBody, json)
180
182
  json = model_dump(json) if isinstance(json, BaseModel) else json
181
183
 
182
184
  return self._github.request(
@@ -237,13 +239,15 @@ class MigrationsClient:
237
239
 
238
240
  url = f"/orgs/{org}/migrations"
239
241
 
240
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
241
-
242
- if not kwargs:
243
- kwargs = UNSET
242
+ headers = {
243
+ "Content-Type": "application/json",
244
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
245
+ **(headers or {}),
246
+ }
244
247
 
245
248
  json = kwargs if data is UNSET else data
246
- json = type_validate_python(OrgsOrgMigrationsPostBody, json)
249
+ if self._github.config.rest_api_validate_body:
250
+ json = type_validate_python(OrgsOrgMigrationsPostBody, json)
247
251
  json = model_dump(json) if isinstance(json, BaseModel) else json
248
252
 
249
253
  return await self._github.arequest(
@@ -633,13 +637,15 @@ class MigrationsClient:
633
637
 
634
638
  url = f"/repos/{owner}/{repo}/import"
635
639
 
636
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
637
-
638
- if not kwargs:
639
- kwargs = UNSET
640
+ headers = {
641
+ "Content-Type": "application/json",
642
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
643
+ **(headers or {}),
644
+ }
640
645
 
641
646
  json = kwargs if data is UNSET else data
642
- json = type_validate_python(ReposOwnerRepoImportPutBody, json)
647
+ if self._github.config.rest_api_validate_body:
648
+ json = type_validate_python(ReposOwnerRepoImportPutBody, json)
643
649
  json = model_dump(json) if isinstance(json, BaseModel) else json
644
650
 
645
651
  return self._github.request(
@@ -700,13 +706,15 @@ class MigrationsClient:
700
706
 
701
707
  url = f"/repos/{owner}/{repo}/import"
702
708
 
703
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
704
-
705
- if not kwargs:
706
- kwargs = UNSET
709
+ headers = {
710
+ "Content-Type": "application/json",
711
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
712
+ **(headers or {}),
713
+ }
707
714
 
708
715
  json = kwargs if data is UNSET else data
709
- json = type_validate_python(ReposOwnerRepoImportPutBody, json)
716
+ if self._github.config.rest_api_validate_body:
717
+ json = type_validate_python(ReposOwnerRepoImportPutBody, json)
710
718
  json = model_dump(json) if isinstance(json, BaseModel) else json
711
719
 
712
720
  return await self._github.arequest(
@@ -811,13 +819,17 @@ class MigrationsClient:
811
819
 
812
820
  url = f"/repos/{owner}/{repo}/import"
813
821
 
814
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
815
-
816
- if not kwargs:
817
- kwargs = UNSET
822
+ headers = {
823
+ "Content-Type": "application/json",
824
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
825
+ **(headers or {}),
826
+ }
818
827
 
819
828
  json = kwargs if data is UNSET else data
820
- json = type_validate_python(Union[ReposOwnerRepoImportPatchBody, None], json)
829
+ if self._github.config.rest_api_validate_body:
830
+ json = type_validate_python(
831
+ Union[ReposOwnerRepoImportPatchBody, None], json
832
+ )
821
833
  json = model_dump(json) if isinstance(json, BaseModel) else json
822
834
 
823
835
  return self._github.request(
@@ -872,13 +884,17 @@ class MigrationsClient:
872
884
 
873
885
  url = f"/repos/{owner}/{repo}/import"
874
886
 
875
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
876
-
877
- if not kwargs:
878
- kwargs = UNSET
887
+ headers = {
888
+ "Content-Type": "application/json",
889
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
890
+ **(headers or {}),
891
+ }
879
892
 
880
893
  json = kwargs if data is UNSET else data
881
- json = type_validate_python(Union[ReposOwnerRepoImportPatchBody, None], json)
894
+ if self._github.config.rest_api_validate_body:
895
+ json = type_validate_python(
896
+ Union[ReposOwnerRepoImportPatchBody, None], json
897
+ )
882
898
  json = model_dump(json) if isinstance(json, BaseModel) else json
883
899
 
884
900
  return await self._github.arequest(
@@ -1005,13 +1021,17 @@ class MigrationsClient:
1005
1021
 
1006
1022
  url = f"/repos/{owner}/{repo}/import/authors/{author_id}"
1007
1023
 
1008
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1009
-
1010
- if not kwargs:
1011
- kwargs = UNSET
1024
+ headers = {
1025
+ "Content-Type": "application/json",
1026
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1027
+ **(headers or {}),
1028
+ }
1012
1029
 
1013
1030
  json = kwargs if data is UNSET else data
1014
- json = type_validate_python(ReposOwnerRepoImportAuthorsAuthorIdPatchBody, json)
1031
+ if self._github.config.rest_api_validate_body:
1032
+ json = type_validate_python(
1033
+ ReposOwnerRepoImportAuthorsAuthorIdPatchBody, json
1034
+ )
1015
1035
  json = model_dump(json) if isinstance(json, BaseModel) else json
1016
1036
 
1017
1037
  return self._github.request(
@@ -1072,13 +1092,17 @@ class MigrationsClient:
1072
1092
 
1073
1093
  url = f"/repos/{owner}/{repo}/import/authors/{author_id}"
1074
1094
 
1075
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1076
-
1077
- if not kwargs:
1078
- kwargs = UNSET
1095
+ headers = {
1096
+ "Content-Type": "application/json",
1097
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1098
+ **(headers or {}),
1099
+ }
1079
1100
 
1080
1101
  json = kwargs if data is UNSET else data
1081
- json = type_validate_python(ReposOwnerRepoImportAuthorsAuthorIdPatchBody, json)
1102
+ if self._github.config.rest_api_validate_body:
1103
+ json = type_validate_python(
1104
+ ReposOwnerRepoImportAuthorsAuthorIdPatchBody, json
1105
+ )
1082
1106
  json = model_dump(json) if isinstance(json, BaseModel) else json
1083
1107
 
1084
1108
  return await self._github.arequest(
@@ -1189,13 +1213,15 @@ class MigrationsClient:
1189
1213
 
1190
1214
  url = f"/repos/{owner}/{repo}/import/lfs"
1191
1215
 
1192
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1193
-
1194
- if not kwargs:
1195
- kwargs = UNSET
1216
+ headers = {
1217
+ "Content-Type": "application/json",
1218
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1219
+ **(headers or {}),
1220
+ }
1196
1221
 
1197
1222
  json = kwargs if data is UNSET else data
1198
- json = type_validate_python(ReposOwnerRepoImportLfsPatchBody, json)
1223
+ if self._github.config.rest_api_validate_body:
1224
+ json = type_validate_python(ReposOwnerRepoImportLfsPatchBody, json)
1199
1225
  json = model_dump(json) if isinstance(json, BaseModel) else json
1200
1226
 
1201
1227
  return self._github.request(
@@ -1251,13 +1277,15 @@ class MigrationsClient:
1251
1277
 
1252
1278
  url = f"/repos/{owner}/{repo}/import/lfs"
1253
1279
 
1254
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1255
-
1256
- if not kwargs:
1257
- kwargs = UNSET
1280
+ headers = {
1281
+ "Content-Type": "application/json",
1282
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1283
+ **(headers or {}),
1284
+ }
1258
1285
 
1259
1286
  json = kwargs if data is UNSET else data
1260
- json = type_validate_python(ReposOwnerRepoImportLfsPatchBody, json)
1287
+ if self._github.config.rest_api_validate_body:
1288
+ json = type_validate_python(ReposOwnerRepoImportLfsPatchBody, json)
1261
1289
  json = model_dump(json) if isinstance(json, BaseModel) else json
1262
1290
 
1263
1291
  return await self._github.arequest(
@@ -1383,13 +1411,15 @@ class MigrationsClient:
1383
1411
 
1384
1412
  url = "/user/migrations"
1385
1413
 
1386
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1387
-
1388
- if not kwargs:
1389
- kwargs = UNSET
1414
+ headers = {
1415
+ "Content-Type": "application/json",
1416
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1417
+ **(headers or {}),
1418
+ }
1390
1419
 
1391
1420
  json = kwargs if data is UNSET else data
1392
- json = type_validate_python(UserMigrationsPostBody, json)
1421
+ if self._github.config.rest_api_validate_body:
1422
+ json = type_validate_python(UserMigrationsPostBody, json)
1393
1423
  json = model_dump(json) if isinstance(json, BaseModel) else json
1394
1424
 
1395
1425
  return self._github.request(
@@ -1448,13 +1478,15 @@ class MigrationsClient:
1448
1478
 
1449
1479
  url = "/user/migrations"
1450
1480
 
1451
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
1452
-
1453
- if not kwargs:
1454
- kwargs = UNSET
1481
+ headers = {
1482
+ "Content-Type": "application/json",
1483
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
1484
+ **(headers or {}),
1485
+ }
1455
1486
 
1456
1487
  json = kwargs if data is UNSET else data
1457
- json = type_validate_python(UserMigrationsPostBody, json)
1488
+ if self._github.config.rest_api_validate_body:
1489
+ json = type_validate_python(UserMigrationsPostBody, json)
1458
1490
  json = model_dump(json) if isinstance(json, BaseModel) else json
1459
1491
 
1460
1492
  return await self._github.arequest(
@@ -118,13 +118,15 @@ class OidcClient:
118
118
 
119
119
  url = f"/orgs/{org}/actions/oidc/customization/sub"
120
120
 
121
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
122
-
123
- if not kwargs:
124
- kwargs = UNSET
121
+ headers = {
122
+ "Content-Type": "application/json",
123
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
124
+ **(headers or {}),
125
+ }
125
126
 
126
127
  json = kwargs if data is UNSET else data
127
- json = type_validate_python(OidcCustomSub, json)
128
+ if self._github.config.rest_api_validate_body:
129
+ json = type_validate_python(OidcCustomSub, json)
128
130
  json = model_dump(json) if isinstance(json, BaseModel) else json
129
131
 
130
132
  return self._github.request(
@@ -172,13 +174,15 @@ class OidcClient:
172
174
 
173
175
  url = f"/orgs/{org}/actions/oidc/customization/sub"
174
176
 
175
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
176
-
177
- if not kwargs:
178
- kwargs = UNSET
177
+ headers = {
178
+ "Content-Type": "application/json",
179
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
180
+ **(headers or {}),
181
+ }
179
182
 
180
183
  json = kwargs if data is UNSET else data
181
- json = type_validate_python(OidcCustomSub, json)
184
+ if self._github.config.rest_api_validate_body:
185
+ json = type_validate_python(OidcCustomSub, json)
182
186
  json = model_dump(json) if isinstance(json, BaseModel) else json
183
187
 
184
188
  return await self._github.arequest(