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
@@ -168,13 +168,15 @@ class ScimClient:
168
168
 
169
169
  url = f"/scim/v2/organizations/{org}/Users"
170
170
 
171
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
172
-
173
- if not kwargs:
174
- kwargs = UNSET
171
+ headers = {
172
+ "Content-Type": "application/json",
173
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
174
+ **(headers or {}),
175
+ }
175
176
 
176
177
  json = kwargs if data is UNSET else data
177
- json = type_validate_python(ScimV2OrganizationsOrgUsersPostBody, json)
178
+ if self._github.config.rest_api_validate_body:
179
+ json = type_validate_python(ScimV2OrganizationsOrgUsersPostBody, json)
178
180
  json = model_dump(json) if isinstance(json, BaseModel) else json
179
181
 
180
182
  return self._github.request(
@@ -232,13 +234,15 @@ class ScimClient:
232
234
 
233
235
  url = f"/scim/v2/organizations/{org}/Users"
234
236
 
235
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
236
-
237
- if not kwargs:
238
- kwargs = UNSET
237
+ headers = {
238
+ "Content-Type": "application/json",
239
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
240
+ **(headers or {}),
241
+ }
239
242
 
240
243
  json = kwargs if data is UNSET else data
241
- json = type_validate_python(ScimV2OrganizationsOrgUsersPostBody, json)
244
+ if self._github.config.rest_api_validate_body:
245
+ json = type_validate_python(ScimV2OrganizationsOrgUsersPostBody, json)
242
246
  json = model_dump(json) if isinstance(json, BaseModel) else json
243
247
 
244
248
  return await self._github.arequest(
@@ -355,13 +359,17 @@ class ScimClient:
355
359
 
356
360
  url = f"/scim/v2/organizations/{org}/Users/{scim_user_id}"
357
361
 
358
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
359
-
360
- if not kwargs:
361
- kwargs = UNSET
362
+ headers = {
363
+ "Content-Type": "application/json",
364
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
365
+ **(headers or {}),
366
+ }
362
367
 
363
368
  json = kwargs if data is UNSET else data
364
- json = type_validate_python(ScimV2OrganizationsOrgUsersScimUserIdPutBody, json)
369
+ if self._github.config.rest_api_validate_body:
370
+ json = type_validate_python(
371
+ ScimV2OrganizationsOrgUsersScimUserIdPutBody, json
372
+ )
365
373
  json = model_dump(json) if isinstance(json, BaseModel) else json
366
374
 
367
375
  return self._github.request(
@@ -423,13 +431,17 @@ class ScimClient:
423
431
 
424
432
  url = f"/scim/v2/organizations/{org}/Users/{scim_user_id}"
425
433
 
426
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
427
-
428
- if not kwargs:
429
- kwargs = UNSET
434
+ headers = {
435
+ "Content-Type": "application/json",
436
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
437
+ **(headers or {}),
438
+ }
430
439
 
431
440
  json = kwargs if data is UNSET else data
432
- json = type_validate_python(ScimV2OrganizationsOrgUsersScimUserIdPutBody, json)
441
+ if self._github.config.rest_api_validate_body:
442
+ json = type_validate_python(
443
+ ScimV2OrganizationsOrgUsersScimUserIdPutBody, json
444
+ )
433
445
  json = model_dump(json) if isinstance(json, BaseModel) else json
434
446
 
435
447
  return await self._github.arequest(
@@ -538,15 +550,17 @@ class ScimClient:
538
550
 
539
551
  url = f"/scim/v2/organizations/{org}/Users/{scim_user_id}"
540
552
 
541
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
542
-
543
- if not kwargs:
544
- kwargs = UNSET
553
+ headers = {
554
+ "Content-Type": "application/json",
555
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
556
+ **(headers or {}),
557
+ }
545
558
 
546
559
  json = kwargs if data is UNSET else data
547
- json = type_validate_python(
548
- ScimV2OrganizationsOrgUsersScimUserIdPatchBody, json
549
- )
560
+ if self._github.config.rest_api_validate_body:
561
+ json = type_validate_python(
562
+ ScimV2OrganizationsOrgUsersScimUserIdPatchBody, json
563
+ )
550
564
  json = model_dump(json) if isinstance(json, BaseModel) else json
551
565
 
552
566
  return self._github.request(
@@ -607,15 +621,17 @@ class ScimClient:
607
621
 
608
622
  url = f"/scim/v2/organizations/{org}/Users/{scim_user_id}"
609
623
 
610
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
611
-
612
- if not kwargs:
613
- kwargs = UNSET
624
+ headers = {
625
+ "Content-Type": "application/json",
626
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
627
+ **(headers or {}),
628
+ }
614
629
 
615
630
  json = kwargs if data is UNSET else data
616
- json = type_validate_python(
617
- ScimV2OrganizationsOrgUsersScimUserIdPatchBody, json
618
- )
631
+ if self._github.config.rest_api_validate_body:
632
+ json = type_validate_python(
633
+ ScimV2OrganizationsOrgUsersScimUserIdPatchBody, json
634
+ )
619
635
  json = model_dump(json) if isinstance(json, BaseModel) else json
620
636
 
621
637
  return await self._github.arequest(
@@ -486,15 +486,17 @@ class SecretScanningClient:
486
486
 
487
487
  url = f"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
488
488
 
489
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
490
-
491
- if not kwargs:
492
- kwargs = UNSET
489
+ headers = {
490
+ "Content-Type": "application/json",
491
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
492
+ **(headers or {}),
493
+ }
493
494
 
494
495
  json = kwargs if data is UNSET else data
495
- json = type_validate_python(
496
- ReposOwnerRepoSecretScanningAlertsAlertNumberPatchBody, json
497
- )
496
+ if self._github.config.rest_api_validate_body:
497
+ json = type_validate_python(
498
+ ReposOwnerRepoSecretScanningAlertsAlertNumberPatchBody, json
499
+ )
498
500
  json = model_dump(json) if isinstance(json, BaseModel) else json
499
501
 
500
502
  return self._github.request(
@@ -559,15 +561,17 @@ class SecretScanningClient:
559
561
 
560
562
  url = f"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
561
563
 
562
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
563
-
564
- if not kwargs:
565
- kwargs = UNSET
564
+ headers = {
565
+ "Content-Type": "application/json",
566
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
567
+ **(headers or {}),
568
+ }
566
569
 
567
570
  json = kwargs if data is UNSET else data
568
- json = type_validate_python(
569
- ReposOwnerRepoSecretScanningAlertsAlertNumberPatchBody, json
570
- )
571
+ if self._github.config.rest_api_validate_body:
572
+ json = type_validate_python(
573
+ ReposOwnerRepoSecretScanningAlertsAlertNumberPatchBody, json
574
+ )
571
575
  json = model_dump(json) if isinstance(json, BaseModel) else json
572
576
 
573
577
  return await self._github.arequest(
@@ -702,15 +706,17 @@ class SecretScanningClient:
702
706
 
703
707
  url = f"/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"
704
708
 
705
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
706
-
707
- if not kwargs:
708
- kwargs = UNSET
709
+ headers = {
710
+ "Content-Type": "application/json",
711
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
712
+ **(headers or {}),
713
+ }
709
714
 
710
715
  json = kwargs if data is UNSET else data
711
- json = type_validate_python(
712
- ReposOwnerRepoSecretScanningPushProtectionBypassesPostBody, json
713
- )
716
+ if self._github.config.rest_api_validate_body:
717
+ json = type_validate_python(
718
+ ReposOwnerRepoSecretScanningPushProtectionBypassesPostBody, json
719
+ )
714
720
  json = model_dump(json) if isinstance(json, BaseModel) else json
715
721
 
716
722
  return self._github.request(
@@ -767,15 +773,17 @@ class SecretScanningClient:
767
773
 
768
774
  url = f"/repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"
769
775
 
770
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
771
-
772
- if not kwargs:
773
- kwargs = UNSET
776
+ headers = {
777
+ "Content-Type": "application/json",
778
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
779
+ **(headers or {}),
780
+ }
774
781
 
775
782
  json = kwargs if data is UNSET else data
776
- json = type_validate_python(
777
- ReposOwnerRepoSecretScanningPushProtectionBypassesPostBody, json
778
- )
783
+ if self._github.config.rest_api_validate_body:
784
+ json = type_validate_python(
785
+ ReposOwnerRepoSecretScanningPushProtectionBypassesPostBody, json
786
+ )
779
787
  json = model_dump(json) if isinstance(json, BaseModel) else json
780
788
 
781
789
  return await self._github.arequest(
@@ -506,13 +506,15 @@ class SecurityAdvisoriesClient:
506
506
 
507
507
  url = f"/repos/{owner}/{repo}/security-advisories"
508
508
 
509
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
510
-
511
- if not kwargs:
512
- kwargs = UNSET
509
+ headers = {
510
+ "Content-Type": "application/json",
511
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
512
+ **(headers or {}),
513
+ }
513
514
 
514
515
  json = kwargs if data is UNSET else data
515
- json = type_validate_python(RepositoryAdvisoryCreate, json)
516
+ if self._github.config.rest_api_validate_body:
517
+ json = type_validate_python(RepositoryAdvisoryCreate, json)
516
518
  json = model_dump(json) if isinstance(json, BaseModel) else json
517
519
 
518
520
  return self._github.request(
@@ -581,13 +583,15 @@ class SecurityAdvisoriesClient:
581
583
 
582
584
  url = f"/repos/{owner}/{repo}/security-advisories"
583
585
 
584
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
585
-
586
- if not kwargs:
587
- kwargs = UNSET
586
+ headers = {
587
+ "Content-Type": "application/json",
588
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
589
+ **(headers or {}),
590
+ }
588
591
 
589
592
  json = kwargs if data is UNSET else data
590
- json = type_validate_python(RepositoryAdvisoryCreate, json)
593
+ if self._github.config.rest_api_validate_body:
594
+ json = type_validate_python(RepositoryAdvisoryCreate, json)
591
595
  json = model_dump(json) if isinstance(json, BaseModel) else json
592
596
 
593
597
  return await self._github.arequest(
@@ -656,13 +660,15 @@ class SecurityAdvisoriesClient:
656
660
 
657
661
  url = f"/repos/{owner}/{repo}/security-advisories/reports"
658
662
 
659
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
660
-
661
- if not kwargs:
662
- kwargs = UNSET
663
+ headers = {
664
+ "Content-Type": "application/json",
665
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
666
+ **(headers or {}),
667
+ }
663
668
 
664
669
  json = kwargs if data is UNSET else data
665
- json = type_validate_python(PrivateVulnerabilityReportCreate, json)
670
+ if self._github.config.rest_api_validate_body:
671
+ json = type_validate_python(PrivateVulnerabilityReportCreate, json)
666
672
  json = model_dump(json) if isinstance(json, BaseModel) else json
667
673
 
668
674
  return self._github.request(
@@ -731,13 +737,15 @@ class SecurityAdvisoriesClient:
731
737
 
732
738
  url = f"/repos/{owner}/{repo}/security-advisories/reports"
733
739
 
734
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
735
-
736
- if not kwargs:
737
- kwargs = UNSET
740
+ headers = {
741
+ "Content-Type": "application/json",
742
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
743
+ **(headers or {}),
744
+ }
738
745
 
739
746
  json = kwargs if data is UNSET else data
740
- json = type_validate_python(PrivateVulnerabilityReportCreate, json)
747
+ if self._github.config.rest_api_validate_body:
748
+ json = type_validate_python(PrivateVulnerabilityReportCreate, json)
741
749
  json = model_dump(json) if isinstance(json, BaseModel) else json
742
750
 
743
751
  return await self._github.arequest(
@@ -867,13 +875,15 @@ class SecurityAdvisoriesClient:
867
875
 
868
876
  url = f"/repos/{owner}/{repo}/security-advisories/{ghsa_id}"
869
877
 
870
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
871
-
872
- if not kwargs:
873
- kwargs = UNSET
878
+ headers = {
879
+ "Content-Type": "application/json",
880
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
881
+ **(headers or {}),
882
+ }
874
883
 
875
884
  json = kwargs if data is UNSET else data
876
- json = type_validate_python(RepositoryAdvisoryUpdate, json)
885
+ if self._github.config.rest_api_validate_body:
886
+ json = type_validate_python(RepositoryAdvisoryUpdate, json)
877
887
  json = model_dump(json) if isinstance(json, BaseModel) else json
878
888
 
879
889
  return self._github.request(
@@ -949,13 +959,15 @@ class SecurityAdvisoriesClient:
949
959
 
950
960
  url = f"/repos/{owner}/{repo}/security-advisories/{ghsa_id}"
951
961
 
952
- headers = {"X-GitHub-Api-Version": self._REST_API_VERSION, **(headers or {})}
953
-
954
- if not kwargs:
955
- kwargs = UNSET
962
+ headers = {
963
+ "Content-Type": "application/json",
964
+ "X-GitHub-Api-Version": self._REST_API_VERSION,
965
+ **(headers or {}),
966
+ }
956
967
 
957
968
  json = kwargs if data is UNSET else data
958
- json = type_validate_python(RepositoryAdvisoryUpdate, json)
969
+ if self._github.config.rest_api_validate_body:
970
+ json = type_validate_python(RepositoryAdvisoryUpdate, json)
959
971
  json = model_dump(json) if isinstance(json, BaseModel) else json
960
972
 
961
973
  return await self._github.arequest(