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.
- githubkit/config.py +3 -0
- githubkit/core.py +5 -0
- githubkit/github.py +3 -0
- githubkit/versions/ghec_v2022_11_28/models/group_0088.py +0 -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 +84 -64
- 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 +1020 -766
- 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_0088.py +0 -1
- githubkit/versions/v2022_11_28/models/group_0060.py +0 -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 +84 -64
- 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 +1020 -766
- 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_0060.py +0 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/METADATA +2 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/RECORD +66 -66
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/WHEEL +1 -1
- {githubkit-0.11.13.dist-info → githubkit-0.11.14.dist-info}/LICENSE +0 -0
|
@@ -373,13 +373,15 @@ class ActivityClient:
|
|
|
373
373
|
|
|
374
374
|
url = "/notifications"
|
|
375
375
|
|
|
376
|
-
headers = {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
376
|
+
headers = {
|
|
377
|
+
"Content-Type": "application/json",
|
|
378
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
379
|
+
**(headers or {}),
|
|
380
|
+
}
|
|
380
381
|
|
|
381
382
|
json = kwargs if data is UNSET else data
|
|
382
|
-
|
|
383
|
+
if self._github.config.rest_api_validate_body:
|
|
384
|
+
json = type_validate_python(NotificationsPutBody, json)
|
|
383
385
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
384
386
|
|
|
385
387
|
return self._github.request(
|
|
@@ -429,13 +431,15 @@ class ActivityClient:
|
|
|
429
431
|
|
|
430
432
|
url = "/notifications"
|
|
431
433
|
|
|
432
|
-
headers = {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
headers = {
|
|
435
|
+
"Content-Type": "application/json",
|
|
436
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
437
|
+
**(headers or {}),
|
|
438
|
+
}
|
|
436
439
|
|
|
437
440
|
json = kwargs if data is UNSET else data
|
|
438
|
-
|
|
441
|
+
if self._github.config.rest_api_validate_body:
|
|
442
|
+
json = type_validate_python(NotificationsPutBody, json)
|
|
439
443
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
440
444
|
|
|
441
445
|
return await self._github.arequest(
|
|
@@ -669,15 +673,17 @@ class ActivityClient:
|
|
|
669
673
|
|
|
670
674
|
url = f"/notifications/threads/{thread_id}/subscription"
|
|
671
675
|
|
|
672
|
-
headers = {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
+
headers = {
|
|
677
|
+
"Content-Type": "application/json",
|
|
678
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
679
|
+
**(headers or {}),
|
|
680
|
+
}
|
|
676
681
|
|
|
677
682
|
json = kwargs if data is UNSET else data
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
683
|
+
if self._github.config.rest_api_validate_body:
|
|
684
|
+
json = type_validate_python(
|
|
685
|
+
NotificationsThreadsThreadIdSubscriptionPutBody, json
|
|
686
|
+
)
|
|
681
687
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
682
688
|
|
|
683
689
|
return self._github.request(
|
|
@@ -729,15 +735,17 @@ class ActivityClient:
|
|
|
729
735
|
|
|
730
736
|
url = f"/notifications/threads/{thread_id}/subscription"
|
|
731
737
|
|
|
732
|
-
headers = {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
738
|
+
headers = {
|
|
739
|
+
"Content-Type": "application/json",
|
|
740
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
741
|
+
**(headers or {}),
|
|
742
|
+
}
|
|
736
743
|
|
|
737
744
|
json = kwargs if data is UNSET else data
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
745
|
+
if self._github.config.rest_api_validate_body:
|
|
746
|
+
json = type_validate_python(
|
|
747
|
+
NotificationsThreadsThreadIdSubscriptionPutBody, json
|
|
748
|
+
)
|
|
741
749
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
742
750
|
|
|
743
751
|
return await self._github.arequest(
|
|
@@ -1045,13 +1053,15 @@ class ActivityClient:
|
|
|
1045
1053
|
|
|
1046
1054
|
url = f"/repos/{owner}/{repo}/notifications"
|
|
1047
1055
|
|
|
1048
|
-
headers = {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1056
|
+
headers = {
|
|
1057
|
+
"Content-Type": "application/json",
|
|
1058
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1059
|
+
**(headers or {}),
|
|
1060
|
+
}
|
|
1052
1061
|
|
|
1053
1062
|
json = kwargs if data is UNSET else data
|
|
1054
|
-
|
|
1063
|
+
if self._github.config.rest_api_validate_body:
|
|
1064
|
+
json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
|
|
1055
1065
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1056
1066
|
|
|
1057
1067
|
return self._github.request(
|
|
@@ -1101,13 +1111,15 @@ class ActivityClient:
|
|
|
1101
1111
|
|
|
1102
1112
|
url = f"/repos/{owner}/{repo}/notifications"
|
|
1103
1113
|
|
|
1104
|
-
headers = {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1114
|
+
headers = {
|
|
1115
|
+
"Content-Type": "application/json",
|
|
1116
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1117
|
+
**(headers or {}),
|
|
1118
|
+
}
|
|
1108
1119
|
|
|
1109
1120
|
json = kwargs if data is UNSET else data
|
|
1110
|
-
|
|
1121
|
+
if self._github.config.rest_api_validate_body:
|
|
1122
|
+
json = type_validate_python(ReposOwnerRepoNotificationsPutBody, json)
|
|
1111
1123
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1112
1124
|
|
|
1113
1125
|
return await self._github.arequest(
|
|
@@ -1339,13 +1351,15 @@ class ActivityClient:
|
|
|
1339
1351
|
|
|
1340
1352
|
url = f"/repos/{owner}/{repo}/subscription"
|
|
1341
1353
|
|
|
1342
|
-
headers = {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1354
|
+
headers = {
|
|
1355
|
+
"Content-Type": "application/json",
|
|
1356
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1357
|
+
**(headers or {}),
|
|
1358
|
+
}
|
|
1346
1359
|
|
|
1347
1360
|
json = kwargs if data is UNSET else data
|
|
1348
|
-
|
|
1361
|
+
if self._github.config.rest_api_validate_body:
|
|
1362
|
+
json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
|
|
1349
1363
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1350
1364
|
|
|
1351
1365
|
return self._github.request(
|
|
@@ -1393,13 +1407,15 @@ class ActivityClient:
|
|
|
1393
1407
|
|
|
1394
1408
|
url = f"/repos/{owner}/{repo}/subscription"
|
|
1395
1409
|
|
|
1396
|
-
headers = {
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1410
|
+
headers = {
|
|
1411
|
+
"Content-Type": "application/json",
|
|
1412
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1413
|
+
**(headers or {}),
|
|
1414
|
+
}
|
|
1400
1415
|
|
|
1401
1416
|
json = kwargs if data is UNSET else data
|
|
1402
|
-
|
|
1417
|
+
if self._github.config.rest_api_validate_body:
|
|
1418
|
+
json = type_validate_python(ReposOwnerRepoSubscriptionPutBody, json)
|
|
1403
1419
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1404
1420
|
|
|
1405
1421
|
return await self._github.arequest(
|
|
@@ -247,13 +247,15 @@ class AppsClient:
|
|
|
247
247
|
|
|
248
248
|
url = "/app/hook/config"
|
|
249
249
|
|
|
250
|
-
headers = {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
250
|
+
headers = {
|
|
251
|
+
"Content-Type": "application/json",
|
|
252
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
253
|
+
**(headers or {}),
|
|
254
|
+
}
|
|
254
255
|
|
|
255
256
|
json = kwargs if data is UNSET else data
|
|
256
|
-
|
|
257
|
+
if self._github.config.rest_api_validate_body:
|
|
258
|
+
json = type_validate_python(AppHookConfigPatchBody, json)
|
|
257
259
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
258
260
|
|
|
259
261
|
return self._github.request(
|
|
@@ -297,13 +299,15 @@ class AppsClient:
|
|
|
297
299
|
|
|
298
300
|
url = "/app/hook/config"
|
|
299
301
|
|
|
300
|
-
headers = {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
headers = {
|
|
303
|
+
"Content-Type": "application/json",
|
|
304
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
305
|
+
**(headers or {}),
|
|
306
|
+
}
|
|
304
307
|
|
|
305
308
|
json = kwargs if data is UNSET else data
|
|
306
|
-
|
|
309
|
+
if self._github.config.rest_api_validate_body:
|
|
310
|
+
json = type_validate_python(AppHookConfigPatchBody, json)
|
|
307
311
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
308
312
|
|
|
309
313
|
return await self._github.arequest(
|
|
@@ -762,15 +766,17 @@ class AppsClient:
|
|
|
762
766
|
|
|
763
767
|
url = f"/app/installations/{installation_id}/access_tokens"
|
|
764
768
|
|
|
765
|
-
headers = {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
+
headers = {
|
|
770
|
+
"Content-Type": "application/json",
|
|
771
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
772
|
+
**(headers or {}),
|
|
773
|
+
}
|
|
769
774
|
|
|
770
775
|
json = kwargs if data is UNSET else data
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
776
|
+
if self._github.config.rest_api_validate_body:
|
|
777
|
+
json = type_validate_python(
|
|
778
|
+
AppInstallationsInstallationIdAccessTokensPostBody, json
|
|
779
|
+
)
|
|
774
780
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
775
781
|
|
|
776
782
|
return self._github.request(
|
|
@@ -827,15 +833,17 @@ class AppsClient:
|
|
|
827
833
|
|
|
828
834
|
url = f"/app/installations/{installation_id}/access_tokens"
|
|
829
835
|
|
|
830
|
-
headers = {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
836
|
+
headers = {
|
|
837
|
+
"Content-Type": "application/json",
|
|
838
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
839
|
+
**(headers or {}),
|
|
840
|
+
}
|
|
834
841
|
|
|
835
842
|
json = kwargs if data is UNSET else data
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
843
|
+
if self._github.config.rest_api_validate_body:
|
|
844
|
+
json = type_validate_python(
|
|
845
|
+
AppInstallationsInstallationIdAccessTokensPostBody, json
|
|
846
|
+
)
|
|
839
847
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
840
848
|
|
|
841
849
|
return await self._github.arequest(
|
|
@@ -977,13 +985,15 @@ class AppsClient:
|
|
|
977
985
|
|
|
978
986
|
url = f"/applications/{client_id}/grant"
|
|
979
987
|
|
|
980
|
-
headers = {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
988
|
+
headers = {
|
|
989
|
+
"Content-Type": "application/json",
|
|
990
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
991
|
+
**(headers or {}),
|
|
992
|
+
}
|
|
984
993
|
|
|
985
994
|
json = kwargs if data is UNSET else data
|
|
986
|
-
|
|
995
|
+
if self._github.config.rest_api_validate_body:
|
|
996
|
+
json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
|
|
987
997
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
988
998
|
|
|
989
999
|
return self._github.request(
|
|
@@ -1029,13 +1039,15 @@ class AppsClient:
|
|
|
1029
1039
|
|
|
1030
1040
|
url = f"/applications/{client_id}/grant"
|
|
1031
1041
|
|
|
1032
|
-
headers = {
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1042
|
+
headers = {
|
|
1043
|
+
"Content-Type": "application/json",
|
|
1044
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1045
|
+
**(headers or {}),
|
|
1046
|
+
}
|
|
1036
1047
|
|
|
1037
1048
|
json = kwargs if data is UNSET else data
|
|
1038
|
-
|
|
1049
|
+
if self._github.config.rest_api_validate_body:
|
|
1050
|
+
json = type_validate_python(ApplicationsClientIdGrantDeleteBody, json)
|
|
1039
1051
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1040
1052
|
|
|
1041
1053
|
return await self._github.arequest(
|
|
@@ -1086,13 +1098,15 @@ class AppsClient:
|
|
|
1086
1098
|
|
|
1087
1099
|
url = f"/applications/{client_id}/token"
|
|
1088
1100
|
|
|
1089
|
-
headers = {
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1101
|
+
headers = {
|
|
1102
|
+
"Content-Type": "application/json",
|
|
1103
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1104
|
+
**(headers or {}),
|
|
1105
|
+
}
|
|
1093
1106
|
|
|
1094
1107
|
json = kwargs if data is UNSET else data
|
|
1095
|
-
|
|
1108
|
+
if self._github.config.rest_api_validate_body:
|
|
1109
|
+
json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
|
|
1096
1110
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1097
1111
|
|
|
1098
1112
|
return self._github.request(
|
|
@@ -1145,13 +1159,15 @@ class AppsClient:
|
|
|
1145
1159
|
|
|
1146
1160
|
url = f"/applications/{client_id}/token"
|
|
1147
1161
|
|
|
1148
|
-
headers = {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1162
|
+
headers = {
|
|
1163
|
+
"Content-Type": "application/json",
|
|
1164
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1165
|
+
**(headers or {}),
|
|
1166
|
+
}
|
|
1152
1167
|
|
|
1153
1168
|
json = kwargs if data is UNSET else data
|
|
1154
|
-
|
|
1169
|
+
if self._github.config.rest_api_validate_body:
|
|
1170
|
+
json = type_validate_python(ApplicationsClientIdTokenPostBody, json)
|
|
1155
1171
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1156
1172
|
|
|
1157
1173
|
return await self._github.arequest(
|
|
@@ -1199,13 +1215,15 @@ class AppsClient:
|
|
|
1199
1215
|
|
|
1200
1216
|
url = f"/applications/{client_id}/token"
|
|
1201
1217
|
|
|
1202
|
-
headers = {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1218
|
+
headers = {
|
|
1219
|
+
"Content-Type": "application/json",
|
|
1220
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1221
|
+
**(headers or {}),
|
|
1222
|
+
}
|
|
1206
1223
|
|
|
1207
1224
|
json = kwargs if data is UNSET else data
|
|
1208
|
-
|
|
1225
|
+
if self._github.config.rest_api_validate_body:
|
|
1226
|
+
json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
|
|
1209
1227
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1210
1228
|
|
|
1211
1229
|
return self._github.request(
|
|
@@ -1251,13 +1269,15 @@ class AppsClient:
|
|
|
1251
1269
|
|
|
1252
1270
|
url = f"/applications/{client_id}/token"
|
|
1253
1271
|
|
|
1254
|
-
headers = {
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1272
|
+
headers = {
|
|
1273
|
+
"Content-Type": "application/json",
|
|
1274
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1275
|
+
**(headers or {}),
|
|
1276
|
+
}
|
|
1258
1277
|
|
|
1259
1278
|
json = kwargs if data is UNSET else data
|
|
1260
|
-
|
|
1279
|
+
if self._github.config.rest_api_validate_body:
|
|
1280
|
+
json = type_validate_python(ApplicationsClientIdTokenDeleteBody, json)
|
|
1261
1281
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1262
1282
|
|
|
1263
1283
|
return await self._github.arequest(
|
|
@@ -1307,13 +1327,15 @@ class AppsClient:
|
|
|
1307
1327
|
|
|
1308
1328
|
url = f"/applications/{client_id}/token"
|
|
1309
1329
|
|
|
1310
|
-
headers = {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1330
|
+
headers = {
|
|
1331
|
+
"Content-Type": "application/json",
|
|
1332
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1333
|
+
**(headers or {}),
|
|
1334
|
+
}
|
|
1314
1335
|
|
|
1315
1336
|
json = kwargs if data is UNSET else data
|
|
1316
|
-
|
|
1337
|
+
if self._github.config.rest_api_validate_body:
|
|
1338
|
+
json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
|
|
1317
1339
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1318
1340
|
|
|
1319
1341
|
return self._github.request(
|
|
@@ -1364,13 +1386,15 @@ class AppsClient:
|
|
|
1364
1386
|
|
|
1365
1387
|
url = f"/applications/{client_id}/token"
|
|
1366
1388
|
|
|
1367
|
-
headers = {
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1389
|
+
headers = {
|
|
1390
|
+
"Content-Type": "application/json",
|
|
1391
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1392
|
+
**(headers or {}),
|
|
1393
|
+
}
|
|
1371
1394
|
|
|
1372
1395
|
json = kwargs if data is UNSET else data
|
|
1373
|
-
|
|
1396
|
+
if self._github.config.rest_api_validate_body:
|
|
1397
|
+
json = type_validate_python(ApplicationsClientIdTokenPatchBody, json)
|
|
1374
1398
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1375
1399
|
|
|
1376
1400
|
return await self._github.arequest(
|
|
@@ -1427,13 +1451,15 @@ class AppsClient:
|
|
|
1427
1451
|
|
|
1428
1452
|
url = f"/applications/{client_id}/token/scoped"
|
|
1429
1453
|
|
|
1430
|
-
headers = {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1454
|
+
headers = {
|
|
1455
|
+
"Content-Type": "application/json",
|
|
1456
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1457
|
+
**(headers or {}),
|
|
1458
|
+
}
|
|
1434
1459
|
|
|
1435
1460
|
json = kwargs if data is UNSET else data
|
|
1436
|
-
|
|
1461
|
+
if self._github.config.rest_api_validate_body:
|
|
1462
|
+
json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
|
|
1437
1463
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1438
1464
|
|
|
1439
1465
|
return self._github.request(
|
|
@@ -1493,13 +1519,15 @@ class AppsClient:
|
|
|
1493
1519
|
|
|
1494
1520
|
url = f"/applications/{client_id}/token/scoped"
|
|
1495
1521
|
|
|
1496
|
-
headers = {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1522
|
+
headers = {
|
|
1523
|
+
"Content-Type": "application/json",
|
|
1524
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1525
|
+
**(headers or {}),
|
|
1526
|
+
}
|
|
1500
1527
|
|
|
1501
1528
|
json = kwargs if data is UNSET else data
|
|
1502
|
-
|
|
1529
|
+
if self._github.config.rest_api_validate_body:
|
|
1530
|
+
json = type_validate_python(ApplicationsClientIdTokenScopedPostBody, json)
|
|
1503
1531
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1504
1532
|
|
|
1505
1533
|
return await self._github.arequest(
|