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
|
|
@@ -124,7 +123,9 @@ class ChecksClient:
|
|
|
124
123
|
head_sha: str,
|
|
125
124
|
details_url: Missing[str] = UNSET,
|
|
126
125
|
external_id: Missing[str] = UNSET,
|
|
127
|
-
status: Missing[
|
|
126
|
+
status: Missing[
|
|
127
|
+
Literal["queued", "in_progress", "waiting", "requested", "pending"]
|
|
128
|
+
] = UNSET,
|
|
128
129
|
started_at: Missing[datetime] = UNSET,
|
|
129
130
|
conclusion: Missing[
|
|
130
131
|
Literal[
|
|
@@ -171,22 +172,21 @@ class ChecksClient:
|
|
|
171
172
|
|
|
172
173
|
url = f"/repos/{owner}/{repo}/check-runs"
|
|
173
174
|
|
|
174
|
-
headers = {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
headers = {
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
178
|
+
**(headers or {}),
|
|
179
|
+
}
|
|
178
180
|
|
|
179
181
|
json = kwargs if data is UNSET else data
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
if self._github.config.rest_api_validate_body:
|
|
183
|
+
json = type_validate_python(
|
|
182
184
|
Union[
|
|
183
185
|
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
184
186
|
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
185
187
|
],
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
json,
|
|
189
|
-
)
|
|
188
|
+
json,
|
|
189
|
+
)
|
|
190
190
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
191
191
|
|
|
192
192
|
return self._github.request(
|
|
@@ -253,7 +253,9 @@ class ChecksClient:
|
|
|
253
253
|
head_sha: str,
|
|
254
254
|
details_url: Missing[str] = UNSET,
|
|
255
255
|
external_id: Missing[str] = UNSET,
|
|
256
|
-
status: Missing[
|
|
256
|
+
status: Missing[
|
|
257
|
+
Literal["queued", "in_progress", "waiting", "requested", "pending"]
|
|
258
|
+
] = UNSET,
|
|
257
259
|
started_at: Missing[datetime] = UNSET,
|
|
258
260
|
conclusion: Missing[
|
|
259
261
|
Literal[
|
|
@@ -300,22 +302,21 @@ class ChecksClient:
|
|
|
300
302
|
|
|
301
303
|
url = f"/repos/{owner}/{repo}/check-runs"
|
|
302
304
|
|
|
303
|
-
headers = {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
headers = {
|
|
306
|
+
"Content-Type": "application/json",
|
|
307
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
308
|
+
**(headers or {}),
|
|
309
|
+
}
|
|
307
310
|
|
|
308
311
|
json = kwargs if data is UNSET else data
|
|
309
|
-
|
|
310
|
-
|
|
312
|
+
if self._github.config.rest_api_validate_body:
|
|
313
|
+
json = type_validate_python(
|
|
311
314
|
Union[
|
|
312
315
|
ReposOwnerRepoCheckRunsPostBodyOneof0,
|
|
313
316
|
ReposOwnerRepoCheckRunsPostBodyOneof1,
|
|
314
317
|
],
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
json,
|
|
318
|
-
)
|
|
318
|
+
json,
|
|
319
|
+
)
|
|
319
320
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
320
321
|
|
|
321
322
|
return await self._github.arequest(
|
|
@@ -481,19 +482,21 @@ class ChecksClient:
|
|
|
481
482
|
|
|
482
483
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
483
484
|
|
|
484
|
-
headers = {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
headers = {
|
|
486
|
+
"Content-Type": "application/json",
|
|
487
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
488
|
+
**(headers or {}),
|
|
489
|
+
}
|
|
488
490
|
|
|
489
491
|
json = kwargs if data is UNSET else data
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
if self._github.config.rest_api_validate_body:
|
|
493
|
+
json = type_validate_python(
|
|
494
|
+
Union[
|
|
495
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
496
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
497
|
+
],
|
|
498
|
+
json,
|
|
499
|
+
)
|
|
497
500
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
498
501
|
|
|
499
502
|
return self._github.request(
|
|
@@ -613,19 +616,21 @@ class ChecksClient:
|
|
|
613
616
|
|
|
614
617
|
url = f"/repos/{owner}/{repo}/check-runs/{check_run_id}"
|
|
615
618
|
|
|
616
|
-
headers = {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
619
|
+
headers = {
|
|
620
|
+
"Content-Type": "application/json",
|
|
621
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
622
|
+
**(headers or {}),
|
|
623
|
+
}
|
|
620
624
|
|
|
621
625
|
json = kwargs if data is UNSET else data
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
626
|
+
if self._github.config.rest_api_validate_body:
|
|
627
|
+
json = type_validate_python(
|
|
628
|
+
Union[
|
|
629
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof0,
|
|
630
|
+
ReposOwnerRepoCheckRunsCheckRunIdPatchBodyAnyof1,
|
|
631
|
+
],
|
|
632
|
+
json,
|
|
633
|
+
)
|
|
629
634
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
630
635
|
|
|
631
636
|
return await self._github.arequest(
|
|
@@ -794,13 +799,15 @@ class ChecksClient:
|
|
|
794
799
|
|
|
795
800
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
796
801
|
|
|
797
|
-
headers = {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
802
|
+
headers = {
|
|
803
|
+
"Content-Type": "application/json",
|
|
804
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
805
|
+
**(headers or {}),
|
|
806
|
+
}
|
|
801
807
|
|
|
802
808
|
json = kwargs if data is UNSET else data
|
|
803
|
-
|
|
809
|
+
if self._github.config.rest_api_validate_body:
|
|
810
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
804
811
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
805
812
|
|
|
806
813
|
return self._github.request(
|
|
@@ -847,13 +854,15 @@ class ChecksClient:
|
|
|
847
854
|
|
|
848
855
|
url = f"/repos/{owner}/{repo}/check-suites"
|
|
849
856
|
|
|
850
|
-
headers = {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
857
|
+
headers = {
|
|
858
|
+
"Content-Type": "application/json",
|
|
859
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
860
|
+
**(headers or {}),
|
|
861
|
+
}
|
|
854
862
|
|
|
855
863
|
json = kwargs if data is UNSET else data
|
|
856
|
-
|
|
864
|
+
if self._github.config.rest_api_validate_body:
|
|
865
|
+
json = type_validate_python(ReposOwnerRepoCheckSuitesPostBody, json)
|
|
857
866
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
858
867
|
|
|
859
868
|
return await self._github.arequest(
|
|
@@ -907,13 +916,17 @@ class ChecksClient:
|
|
|
907
916
|
|
|
908
917
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
909
918
|
|
|
910
|
-
headers = {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
919
|
+
headers = {
|
|
920
|
+
"Content-Type": "application/json",
|
|
921
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
922
|
+
**(headers or {}),
|
|
923
|
+
}
|
|
914
924
|
|
|
915
925
|
json = kwargs if data is UNSET else data
|
|
916
|
-
|
|
926
|
+
if self._github.config.rest_api_validate_body:
|
|
927
|
+
json = type_validate_python(
|
|
928
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
929
|
+
)
|
|
917
930
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
918
931
|
|
|
919
932
|
return self._github.request(
|
|
@@ -967,13 +980,17 @@ class ChecksClient:
|
|
|
967
980
|
|
|
968
981
|
url = f"/repos/{owner}/{repo}/check-suites/preferences"
|
|
969
982
|
|
|
970
|
-
headers = {
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
983
|
+
headers = {
|
|
984
|
+
"Content-Type": "application/json",
|
|
985
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
986
|
+
**(headers or {}),
|
|
987
|
+
}
|
|
974
988
|
|
|
975
989
|
json = kwargs if data is UNSET else data
|
|
976
|
-
|
|
990
|
+
if self._github.config.rest_api_validate_body:
|
|
991
|
+
json = type_validate_python(
|
|
992
|
+
ReposOwnerRepoCheckSuitesPreferencesPatchBody, json
|
|
993
|
+
)
|
|
977
994
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
978
995
|
|
|
979
996
|
return await self._github.arequest(
|
|
@@ -517,15 +517,17 @@ class CodeScanningClient:
|
|
|
517
517
|
|
|
518
518
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
519
519
|
|
|
520
|
-
headers = {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
headers = {
|
|
521
|
+
"Content-Type": "application/json",
|
|
522
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
523
|
+
**(headers or {}),
|
|
524
|
+
}
|
|
524
525
|
|
|
525
526
|
json = kwargs if data is UNSET else data
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
527
|
+
if self._github.config.rest_api_validate_body:
|
|
528
|
+
json = type_validate_python(
|
|
529
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
530
|
+
)
|
|
529
531
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
530
532
|
|
|
531
533
|
return self._github.request(
|
|
@@ -589,15 +591,17 @@ class CodeScanningClient:
|
|
|
589
591
|
|
|
590
592
|
url = f"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
|
|
591
593
|
|
|
592
|
-
headers = {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
headers = {
|
|
595
|
+
"Content-Type": "application/json",
|
|
596
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
597
|
+
**(headers or {}),
|
|
598
|
+
}
|
|
596
599
|
|
|
597
600
|
json = kwargs if data is UNSET else data
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
+
if self._github.config.rest_api_validate_body:
|
|
602
|
+
json = type_validate_python(
|
|
603
|
+
ReposOwnerRepoCodeScanningAlertsAlertNumberPatchBody, json
|
|
604
|
+
)
|
|
601
605
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
602
606
|
|
|
603
607
|
return await self._github.arequest(
|
|
@@ -1182,20 +1186,22 @@ class CodeScanningClient:
|
|
|
1182
1186
|
|
|
1183
1187
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1184
1188
|
|
|
1185
|
-
headers = {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
+
headers = {
|
|
1190
|
+
"Content-Type": "application/json",
|
|
1191
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1192
|
+
**(headers or {}),
|
|
1193
|
+
}
|
|
1189
1194
|
|
|
1190
1195
|
json = kwargs if data is UNSET else data
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1196
|
+
if self._github.config.rest_api_validate_body:
|
|
1197
|
+
json = type_validate_python(
|
|
1198
|
+
Union[
|
|
1199
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1200
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1201
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1202
|
+
],
|
|
1203
|
+
json,
|
|
1204
|
+
)
|
|
1199
1205
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1200
1206
|
|
|
1201
1207
|
return self._github.request(
|
|
@@ -1306,20 +1312,22 @@ class CodeScanningClient:
|
|
|
1306
1312
|
|
|
1307
1313
|
url = f"/repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"
|
|
1308
1314
|
|
|
1309
|
-
headers = {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1315
|
+
headers = {
|
|
1316
|
+
"Content-Type": "application/json",
|
|
1317
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1318
|
+
**(headers or {}),
|
|
1319
|
+
}
|
|
1313
1320
|
|
|
1314
1321
|
json = kwargs if data is UNSET else data
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1322
|
+
if self._github.config.rest_api_validate_body:
|
|
1323
|
+
json = type_validate_python(
|
|
1324
|
+
Union[
|
|
1325
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof0,
|
|
1326
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof1,
|
|
1327
|
+
ReposOwnerRepoCodeScanningCodeqlVariantAnalysesPostBodyOneof2,
|
|
1328
|
+
],
|
|
1329
|
+
json,
|
|
1330
|
+
)
|
|
1323
1331
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1324
1332
|
|
|
1325
1333
|
return await self._github.arequest(
|
|
@@ -1581,13 +1589,15 @@ class CodeScanningClient:
|
|
|
1581
1589
|
|
|
1582
1590
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1583
1591
|
|
|
1584
|
-
headers = {
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1592
|
+
headers = {
|
|
1593
|
+
"Content-Type": "application/json",
|
|
1594
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1595
|
+
**(headers or {}),
|
|
1596
|
+
}
|
|
1588
1597
|
|
|
1589
1598
|
json = kwargs if data is UNSET else data
|
|
1590
|
-
|
|
1599
|
+
if self._github.config.rest_api_validate_body:
|
|
1600
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1591
1601
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1592
1602
|
|
|
1593
1603
|
return self._github.request(
|
|
@@ -1660,13 +1670,15 @@ class CodeScanningClient:
|
|
|
1660
1670
|
|
|
1661
1671
|
url = f"/repos/{owner}/{repo}/code-scanning/default-setup"
|
|
1662
1672
|
|
|
1663
|
-
headers = {
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1673
|
+
headers = {
|
|
1674
|
+
"Content-Type": "application/json",
|
|
1675
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1676
|
+
**(headers or {}),
|
|
1677
|
+
}
|
|
1667
1678
|
|
|
1668
1679
|
json = kwargs if data is UNSET else data
|
|
1669
|
-
|
|
1680
|
+
if self._github.config.rest_api_validate_body:
|
|
1681
|
+
json = type_validate_python(CodeScanningDefaultSetupUpdate, json)
|
|
1670
1682
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1671
1683
|
|
|
1672
1684
|
return await self._github.arequest(
|
|
@@ -1730,13 +1742,15 @@ class CodeScanningClient:
|
|
|
1730
1742
|
|
|
1731
1743
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1732
1744
|
|
|
1733
|
-
headers = {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1745
|
+
headers = {
|
|
1746
|
+
"Content-Type": "application/json",
|
|
1747
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1748
|
+
**(headers or {}),
|
|
1749
|
+
}
|
|
1737
1750
|
|
|
1738
1751
|
json = kwargs if data is UNSET else data
|
|
1739
|
-
|
|
1752
|
+
if self._github.config.rest_api_validate_body:
|
|
1753
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1740
1754
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1741
1755
|
|
|
1742
1756
|
return self._github.request(
|
|
@@ -1799,13 +1813,15 @@ class CodeScanningClient:
|
|
|
1799
1813
|
|
|
1800
1814
|
url = f"/repos/{owner}/{repo}/code-scanning/sarifs"
|
|
1801
1815
|
|
|
1802
|
-
headers = {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1816
|
+
headers = {
|
|
1817
|
+
"Content-Type": "application/json",
|
|
1818
|
+
"X-GitHub-Api-Version": self._REST_API_VERSION,
|
|
1819
|
+
**(headers or {}),
|
|
1820
|
+
}
|
|
1806
1821
|
|
|
1807
1822
|
json = kwargs if data is UNSET else data
|
|
1808
|
-
|
|
1823
|
+
if self._github.config.rest_api_validate_body:
|
|
1824
|
+
json = type_validate_python(ReposOwnerRepoCodeScanningSarifsPostBody, json)
|
|
1809
1825
|
json = model_dump(json) if isinstance(json, BaseModel) else json
|
|
1810
1826
|
|
|
1811
1827
|
return await self._github.arequest(
|