githubkit 0.12.3__py3-none-any.whl → 0.12.5__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.
Files changed (238) hide show
  1. githubkit/auth/app.py +7 -7
  2. githubkit/auth/oauth.py +6 -3
  3. githubkit/config.py +3 -2
  4. githubkit/core.py +14 -14
  5. githubkit/github.py +4 -4
  6. githubkit/graphql/paginator.py +3 -2
  7. githubkit/rest/__init__.py +2 -2
  8. githubkit/typing.py +10 -8
  9. githubkit/versions/ghec_v2022_11_28/models/__init__.py +2 -2
  10. githubkit/versions/ghec_v2022_11_28/models/group_0061.py +1 -0
  11. githubkit/versions/ghec_v2022_11_28/models/group_0135.py +1 -0
  12. githubkit/versions/ghec_v2022_11_28/models/group_0136.py +1 -0
  13. githubkit/versions/ghec_v2022_11_28/models/group_0137.py +1 -0
  14. githubkit/versions/ghec_v2022_11_28/models/group_0232.py +4 -4
  15. githubkit/versions/ghec_v2022_11_28/models/group_0266.py +7 -0
  16. githubkit/versions/ghec_v2022_11_28/models/group_0518.py +13 -3
  17. githubkit/versions/ghec_v2022_11_28/models/group_0519.py +11 -1
  18. githubkit/versions/ghec_v2022_11_28/models/group_0520.py +5 -2
  19. githubkit/versions/ghec_v2022_11_28/models/group_0521.py +14 -2
  20. githubkit/versions/ghec_v2022_11_28/models/group_0522.py +13 -3
  21. githubkit/versions/ghec_v2022_11_28/models/group_0523.py +13 -3
  22. githubkit/versions/ghec_v2022_11_28/models/group_0540.py +6 -6
  23. githubkit/versions/ghec_v2022_11_28/models/group_0545.py +2 -2
  24. githubkit/versions/ghec_v2022_11_28/models/group_0836.py +2 -2
  25. githubkit/versions/ghec_v2022_11_28/models/group_0837.py +2 -2
  26. githubkit/versions/ghec_v2022_11_28/models/group_0838.py +2 -2
  27. githubkit/versions/ghec_v2022_11_28/models/group_1188.py +1 -1
  28. githubkit/versions/ghec_v2022_11_28/rest/actions.py +443 -442
  29. githubkit/versions/ghec_v2022_11_28/rest/activity.py +81 -80
  30. githubkit/versions/ghec_v2022_11_28/rest/apps.py +103 -102
  31. githubkit/versions/ghec_v2022_11_28/rest/billing.py +41 -40
  32. githubkit/versions/ghec_v2022_11_28/rest/checks.py +45 -44
  33. githubkit/versions/ghec_v2022_11_28/rest/classroom.py +13 -12
  34. githubkit/versions/ghec_v2022_11_28/rest/code_scanning.py +69 -68
  35. githubkit/versions/ghec_v2022_11_28/rest/code_security.py +77 -76
  36. githubkit/versions/ghec_v2022_11_28/rest/codes_of_conduct.py +5 -4
  37. githubkit/versions/ghec_v2022_11_28/rest/codespaces.py +151 -150
  38. githubkit/versions/ghec_v2022_11_28/rest/copilot.py +49 -48
  39. githubkit/versions/ghec_v2022_11_28/rest/dependabot.py +61 -60
  40. githubkit/versions/ghec_v2022_11_28/rest/dependency_graph.py +11 -10
  41. githubkit/versions/ghec_v2022_11_28/rest/emojis.py +3 -2
  42. githubkit/versions/ghec_v2022_11_28/rest/enterprise_admin.py +213 -212
  43. githubkit/versions/ghec_v2022_11_28/rest/gists.py +57 -56
  44. githubkit/versions/ghec_v2022_11_28/rest/git.py +51 -50
  45. githubkit/versions/ghec_v2022_11_28/rest/gitignore.py +5 -4
  46. githubkit/versions/ghec_v2022_11_28/rest/interactions.py +31 -30
  47. githubkit/versions/ghec_v2022_11_28/rest/issues.py +157 -156
  48. githubkit/versions/ghec_v2022_11_28/rest/licenses.py +7 -6
  49. githubkit/versions/ghec_v2022_11_28/rest/markdown.py +9 -8
  50. githubkit/versions/ghec_v2022_11_28/rest/meta.py +11 -10
  51. githubkit/versions/ghec_v2022_11_28/rest/migrations.py +69 -68
  52. githubkit/versions/ghec_v2022_11_28/rest/oidc.py +9 -8
  53. githubkit/versions/ghec_v2022_11_28/rest/orgs.py +303 -302
  54. githubkit/versions/ghec_v2022_11_28/rest/packages.py +55 -54
  55. githubkit/versions/ghec_v2022_11_28/rest/private_registries.py +21 -20
  56. githubkit/versions/ghec_v2022_11_28/rest/projects.py +97 -96
  57. githubkit/versions/ghec_v2022_11_28/rest/pulls.py +109 -108
  58. githubkit/versions/ghec_v2022_11_28/rest/rate_limit.py +3 -2
  59. githubkit/versions/ghec_v2022_11_28/rest/reactions.py +87 -86
  60. githubkit/versions/ghec_v2022_11_28/rest/repos.py +677 -670
  61. githubkit/versions/ghec_v2022_11_28/rest/scim.py +25 -24
  62. githubkit/versions/ghec_v2022_11_28/rest/search.py +15 -14
  63. githubkit/versions/ghec_v2022_11_28/rest/secret_scanning.py +25 -24
  64. githubkit/versions/ghec_v2022_11_28/rest/security_advisories.py +33 -32
  65. githubkit/versions/ghec_v2022_11_28/rest/server_statistics.py +3 -2
  66. githubkit/versions/ghec_v2022_11_28/rest/teams.py +221 -220
  67. githubkit/versions/ghec_v2022_11_28/rest/users.py +129 -122
  68. githubkit/versions/ghec_v2022_11_28/types/__init__.py +2 -2
  69. githubkit/versions/ghec_v2022_11_28/types/group_0013.py +14 -14
  70. githubkit/versions/ghec_v2022_11_28/types/group_0041.py +5 -3
  71. githubkit/versions/ghec_v2022_11_28/types/group_0061.py +1 -0
  72. githubkit/versions/ghec_v2022_11_28/types/group_0135.py +5 -3
  73. githubkit/versions/ghec_v2022_11_28/types/group_0136.py +5 -3
  74. githubkit/versions/ghec_v2022_11_28/types/group_0137.py +6 -4
  75. githubkit/versions/ghec_v2022_11_28/types/group_0186.py +17 -12
  76. githubkit/versions/ghec_v2022_11_28/types/group_0187.py +17 -8
  77. githubkit/versions/ghec_v2022_11_28/types/group_0193.py +8 -8
  78. githubkit/versions/ghec_v2022_11_28/types/group_0227.py +5 -4
  79. githubkit/versions/ghec_v2022_11_28/types/group_0232.py +2 -2
  80. githubkit/versions/ghec_v2022_11_28/types/group_0266.py +2 -0
  81. githubkit/versions/ghec_v2022_11_28/types/group_0299.py +7 -7
  82. githubkit/versions/ghec_v2022_11_28/types/group_0301.py +6 -5
  83. githubkit/versions/ghec_v2022_11_28/types/group_0302.py +7 -6
  84. githubkit/versions/ghec_v2022_11_28/types/group_0349.py +6 -6
  85. githubkit/versions/ghec_v2022_11_28/types/group_0447.py +8 -8
  86. githubkit/versions/ghec_v2022_11_28/types/group_0476.py +43 -20
  87. githubkit/versions/ghec_v2022_11_28/types/group_0518.py +3 -1
  88. githubkit/versions/ghec_v2022_11_28/types/group_0519.py +2 -0
  89. githubkit/versions/ghec_v2022_11_28/types/group_0521.py +3 -1
  90. githubkit/versions/ghec_v2022_11_28/types/group_0522.py +3 -1
  91. githubkit/versions/ghec_v2022_11_28/types/group_0523.py +3 -1
  92. githubkit/versions/ghec_v2022_11_28/types/group_0540.py +7 -6
  93. githubkit/versions/ghec_v2022_11_28/types/group_0545.py +7 -4
  94. githubkit/versions/ghec_v2022_11_28/types/group_0635.py +10 -10
  95. githubkit/versions/ghec_v2022_11_28/types/group_0638.py +10 -10
  96. githubkit/versions/ghec_v2022_11_28/types/group_0671.py +8 -5
  97. githubkit/versions/ghec_v2022_11_28/types/group_0674.py +7 -6
  98. githubkit/versions/ghec_v2022_11_28/types/group_0677.py +7 -6
  99. githubkit/versions/ghec_v2022_11_28/types/group_0749.py +8 -8
  100. githubkit/versions/ghec_v2022_11_28/types/group_0752.py +8 -8
  101. githubkit/versions/ghec_v2022_11_28/types/group_0755.py +8 -8
  102. githubkit/versions/ghec_v2022_11_28/types/group_0768.py +7 -7
  103. githubkit/versions/ghec_v2022_11_28/types/group_0821.py +10 -8
  104. githubkit/versions/ghec_v2022_11_28/types/group_0822.py +8 -8
  105. githubkit/versions/ghec_v2022_11_28/types/group_0823.py +8 -8
  106. githubkit/versions/ghec_v2022_11_28/types/group_0824.py +8 -8
  107. githubkit/versions/ghec_v2022_11_28/types/group_0825.py +10 -8
  108. githubkit/versions/ghec_v2022_11_28/types/group_0827.py +5 -4
  109. githubkit/versions/ghec_v2022_11_28/types/group_0836.py +2 -2
  110. githubkit/versions/ghec_v2022_11_28/types/group_0837.py +2 -2
  111. githubkit/versions/ghec_v2022_11_28/types/group_0838.py +2 -2
  112. githubkit/versions/ghec_v2022_11_28/types/group_0849.py +5 -4
  113. githubkit/versions/ghec_v2022_11_28/types/group_0885.py +8 -8
  114. githubkit/versions/ghec_v2022_11_28/types/group_0887.py +14 -13
  115. githubkit/versions/ghec_v2022_11_28/types/group_0922.py +14 -13
  116. githubkit/versions/ghec_v2022_11_28/types/group_0974.py +7 -7
  117. githubkit/versions/ghec_v2022_11_28/types/group_1034.py +10 -9
  118. githubkit/versions/ghec_v2022_11_28/types/group_1036.py +12 -7
  119. githubkit/versions/ghec_v2022_11_28/types/group_1038.py +14 -13
  120. githubkit/versions/ghec_v2022_11_28/types/group_1088.py +5 -4
  121. githubkit/versions/ghec_v2022_11_28/types/group_1091.py +8 -7
  122. githubkit/versions/ghec_v2022_11_28/webhooks/_namespace.py +89 -82
  123. githubkit/versions/latest/models.py +2 -2
  124. githubkit/versions/latest/types.py +2 -2
  125. githubkit/versions/v2022_11_28/models/__init__.py +2 -2
  126. githubkit/versions/v2022_11_28/models/group_0044.py +1 -0
  127. githubkit/versions/v2022_11_28/models/group_0045.py +1 -0
  128. githubkit/versions/v2022_11_28/models/group_0046.py +1 -0
  129. githubkit/versions/v2022_11_28/models/group_0083.py +1 -0
  130. githubkit/versions/v2022_11_28/models/group_0195.py +4 -4
  131. githubkit/versions/v2022_11_28/models/group_0229.py +7 -0
  132. githubkit/versions/v2022_11_28/models/group_0460.py +13 -3
  133. githubkit/versions/v2022_11_28/models/group_0461.py +11 -1
  134. githubkit/versions/v2022_11_28/models/group_0462.py +5 -2
  135. githubkit/versions/v2022_11_28/models/group_0463.py +14 -2
  136. githubkit/versions/v2022_11_28/models/group_0464.py +13 -3
  137. githubkit/versions/v2022_11_28/models/group_0465.py +13 -3
  138. githubkit/versions/v2022_11_28/models/group_0482.py +6 -6
  139. githubkit/versions/v2022_11_28/models/group_0487.py +2 -2
  140. githubkit/versions/v2022_11_28/models/group_0778.py +2 -2
  141. githubkit/versions/v2022_11_28/models/group_0779.py +2 -2
  142. githubkit/versions/v2022_11_28/models/group_0780.py +2 -2
  143. githubkit/versions/v2022_11_28/models/group_1099.py +1 -1
  144. githubkit/versions/v2022_11_28/rest/actions.py +421 -420
  145. githubkit/versions/v2022_11_28/rest/activity.py +81 -80
  146. githubkit/versions/v2022_11_28/rest/apps.py +103 -102
  147. githubkit/versions/v2022_11_28/rest/billing.py +15 -14
  148. githubkit/versions/v2022_11_28/rest/checks.py +45 -44
  149. githubkit/versions/v2022_11_28/rest/classroom.py +13 -12
  150. githubkit/versions/v2022_11_28/rest/code_scanning.py +67 -66
  151. githubkit/versions/v2022_11_28/rest/code_security.py +77 -76
  152. githubkit/versions/v2022_11_28/rest/codes_of_conduct.py +5 -4
  153. githubkit/versions/v2022_11_28/rest/codespaces.py +151 -150
  154. githubkit/versions/v2022_11_28/rest/copilot.py +39 -38
  155. githubkit/versions/v2022_11_28/rest/dependabot.py +61 -60
  156. githubkit/versions/v2022_11_28/rest/dependency_graph.py +11 -10
  157. githubkit/versions/v2022_11_28/rest/emojis.py +3 -2
  158. githubkit/versions/v2022_11_28/rest/gists.py +57 -56
  159. githubkit/versions/v2022_11_28/rest/git.py +51 -50
  160. githubkit/versions/v2022_11_28/rest/gitignore.py +5 -4
  161. githubkit/versions/v2022_11_28/rest/interactions.py +31 -30
  162. githubkit/versions/v2022_11_28/rest/issues.py +157 -156
  163. githubkit/versions/v2022_11_28/rest/licenses.py +7 -6
  164. githubkit/versions/v2022_11_28/rest/markdown.py +9 -8
  165. githubkit/versions/v2022_11_28/rest/meta.py +11 -10
  166. githubkit/versions/v2022_11_28/rest/migrations.py +69 -68
  167. githubkit/versions/v2022_11_28/rest/oidc.py +9 -8
  168. githubkit/versions/v2022_11_28/rest/orgs.py +229 -228
  169. githubkit/versions/v2022_11_28/rest/packages.py +55 -54
  170. githubkit/versions/v2022_11_28/rest/private_registries.py +21 -20
  171. githubkit/versions/v2022_11_28/rest/projects.py +97 -96
  172. githubkit/versions/v2022_11_28/rest/pulls.py +109 -108
  173. githubkit/versions/v2022_11_28/rest/rate_limit.py +3 -2
  174. githubkit/versions/v2022_11_28/rest/reactions.py +87 -86
  175. githubkit/versions/v2022_11_28/rest/repos.py +653 -646
  176. githubkit/versions/v2022_11_28/rest/search.py +15 -14
  177. githubkit/versions/v2022_11_28/rest/secret_scanning.py +25 -24
  178. githubkit/versions/v2022_11_28/rest/security_advisories.py +33 -32
  179. githubkit/versions/v2022_11_28/rest/teams.py +189 -188
  180. githubkit/versions/v2022_11_28/rest/users.py +129 -122
  181. githubkit/versions/v2022_11_28/types/__init__.py +2 -2
  182. githubkit/versions/v2022_11_28/types/group_0013.py +14 -14
  183. githubkit/versions/v2022_11_28/types/group_0044.py +5 -3
  184. githubkit/versions/v2022_11_28/types/group_0045.py +5 -3
  185. githubkit/versions/v2022_11_28/types/group_0046.py +6 -4
  186. githubkit/versions/v2022_11_28/types/group_0083.py +1 -0
  187. githubkit/versions/v2022_11_28/types/group_0103.py +17 -12
  188. githubkit/versions/v2022_11_28/types/group_0104.py +17 -8
  189. githubkit/versions/v2022_11_28/types/group_0112.py +8 -8
  190. githubkit/versions/v2022_11_28/types/group_0190.py +5 -4
  191. githubkit/versions/v2022_11_28/types/group_0195.py +2 -2
  192. githubkit/versions/v2022_11_28/types/group_0229.py +2 -0
  193. githubkit/versions/v2022_11_28/types/group_0262.py +7 -7
  194. githubkit/versions/v2022_11_28/types/group_0264.py +6 -5
  195. githubkit/versions/v2022_11_28/types/group_0265.py +7 -6
  196. githubkit/versions/v2022_11_28/types/group_0312.py +6 -6
  197. githubkit/versions/v2022_11_28/types/group_0396.py +8 -8
  198. githubkit/versions/v2022_11_28/types/group_0423.py +43 -20
  199. githubkit/versions/v2022_11_28/types/group_0460.py +3 -1
  200. githubkit/versions/v2022_11_28/types/group_0461.py +2 -0
  201. githubkit/versions/v2022_11_28/types/group_0463.py +3 -1
  202. githubkit/versions/v2022_11_28/types/group_0464.py +3 -1
  203. githubkit/versions/v2022_11_28/types/group_0465.py +3 -1
  204. githubkit/versions/v2022_11_28/types/group_0482.py +7 -6
  205. githubkit/versions/v2022_11_28/types/group_0487.py +7 -4
  206. githubkit/versions/v2022_11_28/types/group_0577.py +10 -10
  207. githubkit/versions/v2022_11_28/types/group_0580.py +10 -10
  208. githubkit/versions/v2022_11_28/types/group_0613.py +8 -5
  209. githubkit/versions/v2022_11_28/types/group_0616.py +7 -6
  210. githubkit/versions/v2022_11_28/types/group_0619.py +7 -6
  211. githubkit/versions/v2022_11_28/types/group_0691.py +8 -8
  212. githubkit/versions/v2022_11_28/types/group_0694.py +8 -8
  213. githubkit/versions/v2022_11_28/types/group_0697.py +8 -8
  214. githubkit/versions/v2022_11_28/types/group_0710.py +7 -7
  215. githubkit/versions/v2022_11_28/types/group_0763.py +10 -8
  216. githubkit/versions/v2022_11_28/types/group_0764.py +8 -8
  217. githubkit/versions/v2022_11_28/types/group_0765.py +8 -8
  218. githubkit/versions/v2022_11_28/types/group_0766.py +8 -8
  219. githubkit/versions/v2022_11_28/types/group_0767.py +10 -8
  220. githubkit/versions/v2022_11_28/types/group_0769.py +5 -4
  221. githubkit/versions/v2022_11_28/types/group_0778.py +2 -2
  222. githubkit/versions/v2022_11_28/types/group_0779.py +2 -2
  223. githubkit/versions/v2022_11_28/types/group_0780.py +2 -2
  224. githubkit/versions/v2022_11_28/types/group_0791.py +5 -4
  225. githubkit/versions/v2022_11_28/types/group_0798.py +8 -8
  226. githubkit/versions/v2022_11_28/types/group_0800.py +14 -13
  227. githubkit/versions/v2022_11_28/types/group_0837.py +14 -13
  228. githubkit/versions/v2022_11_28/types/group_0887.py +7 -7
  229. githubkit/versions/v2022_11_28/types/group_0945.py +10 -9
  230. githubkit/versions/v2022_11_28/types/group_0947.py +12 -7
  231. githubkit/versions/v2022_11_28/types/group_0949.py +14 -13
  232. githubkit/versions/v2022_11_28/types/group_0999.py +5 -4
  233. githubkit/versions/v2022_11_28/types/group_1002.py +8 -7
  234. githubkit/versions/v2022_11_28/webhooks/_namespace.py +87 -80
  235. {githubkit-0.12.3.dist-info → githubkit-0.12.5.dist-info}/METADATA +3 -3
  236. {githubkit-0.12.3.dist-info → githubkit-0.12.5.dist-info}/RECORD +238 -238
  237. {githubkit-0.12.3.dist-info → githubkit-0.12.5.dist-info}/WHEEL +1 -1
  238. {githubkit-0.12.3.dist-info → githubkit-0.12.5.dist-info}/LICENSE +0 -0
githubkit/auth/app.py CHANGED
@@ -1,4 +1,4 @@
1
- from collections.abc import AsyncGenerator, Generator
1
+ from collections.abc import AsyncGenerator, Generator, Sequence
2
2
  from dataclasses import dataclass
3
3
  from datetime import datetime, timedelta, timezone
4
4
  from typing import TYPE_CHECKING, ClassVar, Optional, Union
@@ -35,8 +35,8 @@ class AppAuth(httpx.Auth):
35
35
  client_id: Optional[str] = None
36
36
  client_secret: Optional[str] = None
37
37
  installation_id: Union[Unset, int] = UNSET
38
- repositories: Union[Unset, list[str]] = UNSET
39
- repository_ids: Union[Unset, list[int]] = UNSET
38
+ repositories: Union[Unset, Sequence[str]] = UNSET
39
+ repository_ids: Union[Unset, Sequence[int]] = UNSET
40
40
  permissions: Union[Unset, "AppPermissionsType"] = UNSET
41
41
 
42
42
  JWT_CACHE_KEY: ClassVar[LiteralString] = "githubkit:auth:app:{issuer}:jwt"
@@ -277,8 +277,8 @@ class AppAuthStrategy(BaseAuthStrategy):
277
277
  def as_installation(
278
278
  self,
279
279
  installation_id: int,
280
- repositories: Union[Unset, list[str]] = UNSET,
281
- repository_ids: Union[Unset, list[int]] = UNSET,
280
+ repositories: Union[Unset, Sequence[str]] = UNSET,
281
+ repository_ids: Union[Unset, Sequence[int]] = UNSET,
282
282
  permissions: Union[Unset, "AppPermissionsType"] = UNSET,
283
283
  ) -> "AppInstallationAuthStrategy":
284
284
  return AppInstallationAuthStrategy(
@@ -318,8 +318,8 @@ class AppInstallationAuthStrategy(BaseAuthStrategy):
318
318
  installation_id: int
319
319
  client_id: Optional[str] = None
320
320
  client_secret: Optional[str] = None
321
- repositories: Union[Unset, list[str]] = UNSET
322
- repository_ids: Union[Unset, list[int]] = UNSET
321
+ repositories: Union[Unset, Sequence[str]] = UNSET
322
+ repository_ids: Union[Unset, Sequence[int]] = UNSET
323
323
  permissions: Union[Unset, "AppPermissionsType"] = UNSET
324
324
 
325
325
  def __post_init__(self):
githubkit/auth/oauth.py CHANGED
@@ -1,4 +1,4 @@
1
- from collections.abc import AsyncGenerator, Coroutine, Generator
1
+ from collections.abc import AsyncGenerator, Coroutine, Generator, Sequence
2
2
  from dataclasses import dataclass, field
3
3
  from datetime import datetime, timedelta, timezone
4
4
  from time import sleep
@@ -29,7 +29,7 @@ if TYPE_CHECKING:
29
29
 
30
30
 
31
31
  def create_device_code(
32
- github: "GitHubCore", client_id: str, scopes: Optional[list[str]] = None
32
+ github: "GitHubCore", client_id: str, scopes: Optional[Sequence[str]] = None
33
33
  ) -> Generator[httpx.Request, httpx.Response, dict[str, Any]]:
34
34
  """Create a device code for OAuth."""
35
35
  base_url = get_oauth_base_url(github.config.base_url)
@@ -567,7 +567,10 @@ class OAuthAppAuthStrategy(BaseAuthStrategy):
567
567
  self, code: str, redirect_uri: Optional[str] = None
568
568
  ) -> "OAuthWebAuthStrategy":
569
569
  return OAuthWebAuthStrategy(
570
- self.client_id, self.client_secret, code, redirect_uri
570
+ client_id=self.client_id,
571
+ client_secret=self.client_secret,
572
+ code=code,
573
+ redirect_uri=redirect_uri,
571
574
  )
572
575
 
573
576
  def get_auth_flow(self, github: "GitHubCore") -> httpx.Auth:
githubkit/config.py CHANGED
@@ -1,3 +1,4 @@
1
+ from collections.abc import Sequence
1
2
  from dataclasses import dataclass, fields
2
3
  from typing import Any, Optional, Union
3
4
  from typing_extensions import Self
@@ -42,7 +43,7 @@ def build_base_url(base_url: Optional[Union[str, httpx.URL]]) -> httpx.URL:
42
43
 
43
44
 
44
45
  def build_accept(
45
- accept_format: Optional[str] = None, previews: Optional[list[str]] = None
46
+ accept_format: Optional[str] = None, previews: Optional[Sequence[str]] = None
46
47
  ) -> str:
47
48
  if accept_format:
48
49
  accept_format = (
@@ -99,7 +100,7 @@ def get_config(
99
100
  *,
100
101
  base_url: Optional[Union[str, httpx.URL]] = None,
101
102
  accept_format: Optional[str] = None,
102
- previews: Optional[list[str]] = None,
103
+ previews: Optional[Sequence[str]] = None,
103
104
  user_agent: Optional[str] = None,
104
105
  follow_redirects: bool = True,
105
106
  timeout: Optional[Union[float, httpx.Timeout]] = None,
githubkit/core.py CHANGED
@@ -1,4 +1,4 @@
1
- from collections.abc import AsyncGenerator, Generator
1
+ from collections.abc import AsyncGenerator, Generator, Mapping, Sequence
2
2
  from contextlib import asynccontextmanager, contextmanager
3
3
  from contextvars import ContextVar
4
4
  from datetime import datetime, timedelta, timezone
@@ -77,7 +77,7 @@ class GitHubCore(Generic[A]):
77
77
  *,
78
78
  base_url: Optional[Union[str, httpx.URL]] = None,
79
79
  accept_format: Optional[str] = None,
80
- previews: Optional[list[str]] = None,
80
+ previews: Optional[Sequence[str]] = None,
81
81
  user_agent: Optional[str] = None,
82
82
  follow_redirects: bool = True,
83
83
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -96,7 +96,7 @@ class GitHubCore(Generic[A]):
96
96
  *,
97
97
  base_url: Optional[Union[str, httpx.URL]] = None,
98
98
  accept_format: Optional[str] = None,
99
- previews: Optional[list[str]] = None,
99
+ previews: Optional[Sequence[str]] = None,
100
100
  user_agent: Optional[str] = None,
101
101
  follow_redirects: bool = True,
102
102
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -115,7 +115,7 @@ class GitHubCore(Generic[A]):
115
115
  *,
116
116
  base_url: Optional[Union[str, httpx.URL]] = None,
117
117
  accept_format: Optional[str] = None,
118
- previews: Optional[list[str]] = None,
118
+ previews: Optional[Sequence[str]] = None,
119
119
  user_agent: Optional[str] = None,
120
120
  follow_redirects: bool = True,
121
121
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -133,7 +133,7 @@ class GitHubCore(Generic[A]):
133
133
  config: Optional[Config] = None,
134
134
  base_url: Optional[Union[str, httpx.URL]] = None,
135
135
  accept_format: Optional[str] = None,
136
- previews: Optional[list[str]] = None,
136
+ previews: Optional[Sequence[str]] = None,
137
137
  user_agent: Optional[str] = None,
138
138
  follow_redirects: bool = True,
139
139
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -338,7 +338,7 @@ class GitHubCore(Generic[A]):
338
338
  self,
339
339
  response: httpx.Response,
340
340
  response_model: type[T],
341
- error_models: Optional[dict[str, type]] = None,
341
+ error_models: Optional[Mapping[str, type]] = None,
342
342
  ) -> Response[T]: ...
343
343
 
344
344
  @overload
@@ -346,14 +346,14 @@ class GitHubCore(Generic[A]):
346
346
  self,
347
347
  response: httpx.Response,
348
348
  response_model: UnsetType = UNSET,
349
- error_models: Optional[dict[str, type]] = None,
349
+ error_models: Optional[Mapping[str, type]] = None,
350
350
  ) -> Response[Any]: ...
351
351
 
352
352
  def _check(
353
353
  self,
354
354
  response: httpx.Response,
355
355
  response_model: Union[type[T], UnsetType] = UNSET,
356
- error_models: Optional[dict[str, type]] = None,
356
+ error_models: Optional[Mapping[str, type]] = None,
357
357
  ) -> Union[Response[T], Response[Any]]:
358
358
  if response.is_error:
359
359
  error_models = error_models or {}
@@ -443,7 +443,7 @@ class GitHubCore(Generic[A]):
443
443
  headers: Optional[HeaderTypes] = None,
444
444
  cookies: Optional[CookieTypes] = None,
445
445
  response_model: type[T],
446
- error_models: Optional[dict[str, type]] = None,
446
+ error_models: Optional[Mapping[str, type]] = None,
447
447
  ) -> Response[T]: ...
448
448
 
449
449
  @overload
@@ -460,7 +460,7 @@ class GitHubCore(Generic[A]):
460
460
  headers: Optional[HeaderTypes] = None,
461
461
  cookies: Optional[CookieTypes] = None,
462
462
  response_model: UnsetType = UNSET,
463
- error_models: Optional[dict[str, type]] = None,
463
+ error_models: Optional[Mapping[str, type]] = None,
464
464
  ) -> Response[Any]: ...
465
465
 
466
466
  def request(
@@ -476,7 +476,7 @@ class GitHubCore(Generic[A]):
476
476
  headers: Optional[HeaderTypes] = None,
477
477
  cookies: Optional[CookieTypes] = None,
478
478
  response_model: Union[type[T], UnsetType] = UNSET,
479
- error_models: Optional[dict[str, type]] = None,
479
+ error_models: Optional[Mapping[str, type]] = None,
480
480
  ) -> Union[Response[T], Response[Any]]:
481
481
  """Send a request.
482
482
 
@@ -525,7 +525,7 @@ class GitHubCore(Generic[A]):
525
525
  headers: Optional[HeaderTypes] = None,
526
526
  cookies: Optional[CookieTypes] = None,
527
527
  response_model: type[T],
528
- error_models: Optional[dict[str, type]] = None,
528
+ error_models: Optional[Mapping[str, type]] = None,
529
529
  ) -> Response[T]: ...
530
530
 
531
531
  @overload
@@ -542,7 +542,7 @@ class GitHubCore(Generic[A]):
542
542
  headers: Optional[HeaderTypes] = None,
543
543
  cookies: Optional[CookieTypes] = None,
544
544
  response_model: UnsetType = UNSET,
545
- error_models: Optional[dict[str, type]] = None,
545
+ error_models: Optional[Mapping[str, type]] = None,
546
546
  ) -> Response[Any]: ...
547
547
 
548
548
  async def arequest(
@@ -558,7 +558,7 @@ class GitHubCore(Generic[A]):
558
558
  headers: Optional[HeaderTypes] = None,
559
559
  cookies: Optional[CookieTypes] = None,
560
560
  response_model: Union[type[T], UnsetType] = UNSET,
561
- error_models: Optional[dict[str, type]] = None,
561
+ error_models: Optional[Mapping[str, type]] = None,
562
562
  ) -> Union[Response[T], Response[Any]]:
563
563
  """Asynchronously send a request.
564
564
 
githubkit/github.py CHANGED
@@ -1,4 +1,4 @@
1
- from collections.abc import Awaitable
1
+ from collections.abc import Awaitable, Sequence
2
2
  from functools import cached_property
3
3
  from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar, Union, overload
4
4
  from typing_extensions import ParamSpec
@@ -70,7 +70,7 @@ class GitHub(GitHubCore[A]):
70
70
  *,
71
71
  base_url: Optional[Union[str, httpx.URL]] = None,
72
72
  accept_format: Optional[str] = None,
73
- previews: Optional[list[str]] = None,
73
+ previews: Optional[Sequence[str]] = None,
74
74
  user_agent: Optional[str] = None,
75
75
  follow_redirects: bool = True,
76
76
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -89,7 +89,7 @@ class GitHub(GitHubCore[A]):
89
89
  *,
90
90
  base_url: Optional[Union[str, httpx.URL]] = None,
91
91
  accept_format: Optional[str] = None,
92
- previews: Optional[list[str]] = None,
92
+ previews: Optional[Sequence[str]] = None,
93
93
  user_agent: Optional[str] = None,
94
94
  follow_redirects: bool = True,
95
95
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -108,7 +108,7 @@ class GitHub(GitHubCore[A]):
108
108
  *,
109
109
  base_url: Optional[Union[str, httpx.URL]] = None,
110
110
  accept_format: Optional[str] = None,
111
- previews: Optional[list[str]] = None,
111
+ previews: Optional[Sequence[str]] = None,
112
112
  user_agent: Optional[str] = None,
113
113
  follow_redirects: bool = True,
114
114
  timeout: Optional[Union[float, httpx.Timeout]] = None,
@@ -1,3 +1,4 @@
1
+ from collections.abc import Mapping
1
2
  from typing import TYPE_CHECKING, Any, Optional, TypedDict
2
3
  from typing_extensions import Self
3
4
  from weakref import ref
@@ -30,13 +31,13 @@ class Paginator:
30
31
  self,
31
32
  graphql: "GraphQLNamespace",
32
33
  query: str,
33
- variables: Optional[dict[str, Any]] = None,
34
+ variables: Optional[Mapping[str, Any]] = None,
34
35
  ) -> None:
35
36
  self._graphql_ref = ref(graphql)
36
37
  self.query = query
37
38
 
38
39
  self._has_next_page: bool = True
39
- self._current_variables = variables.copy() if variables is not None else {}
40
+ self._current_variables = dict(variables) if variables is not None else {}
40
41
 
41
42
  @property
42
43
  def _graphql(self) -> "GraphQLNamespace":
@@ -3750,7 +3750,7 @@ if TYPE_CHECKING:
3750
3750
  WebhookDeploymentCreatedPropDeploymentPropCreator as WebhookDeploymentCreatedPropDeploymentPropCreator,
3751
3751
  )
3752
3752
  from githubkit.versions.v2022_11_28.models import (
3753
- WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0,
3753
+ WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1,
3754
3754
  )
3755
3755
  from githubkit.versions.v2022_11_28.models import (
3756
3756
  WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp as WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp,
@@ -10673,7 +10673,7 @@ else:
10673
10673
  "WebhookDeploymentCreated",
10674
10674
  "WebhookDeploymentCreatedPropDeployment",
10675
10675
  "WebhookDeploymentCreatedPropDeploymentPropCreator",
10676
- "WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0",
10676
+ "WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1",
10677
10677
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp",
10678
10678
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner",
10679
10679
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropPermissions",
githubkit/typing.py CHANGED
@@ -1,4 +1,4 @@
1
- from collections.abc import Hashable
1
+ from collections.abc import Hashable, Mapping, Sequence
2
2
  from datetime import timedelta
3
3
  from typing import (
4
4
  IO,
@@ -27,8 +27,8 @@ URLTypes: TypeAlias = Union[httpx.URL, str]
27
27
  PrimitiveData: TypeAlias = Optional[Union[str, int, float, bool]]
28
28
  QueryParamTypes: TypeAlias = Union[
29
29
  httpx.QueryParams,
30
- dict[str, Union[PrimitiveData, list[PrimitiveData]]],
31
- list[tuple[str, PrimitiveData]],
30
+ Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]],
31
+ Sequence[tuple[str, PrimitiveData]],
32
32
  tuple[tuple[str, PrimitiveData], ...],
33
33
  str,
34
34
  bytes,
@@ -36,10 +36,10 @@ QueryParamTypes: TypeAlias = Union[
36
36
 
37
37
  HeaderTypes: TypeAlias = Union[
38
38
  httpx.Headers,
39
- dict[str, str],
40
- dict[bytes, bytes],
41
- list[tuple[str, str]],
42
- list[tuple[bytes, bytes]],
39
+ Mapping[str, str],
40
+ Mapping[bytes, bytes],
41
+ Sequence[tuple[str, str]],
42
+ Sequence[tuple[bytes, bytes]],
43
43
  ]
44
44
 
45
45
  CookieTypes: TypeAlias = Union[httpx.Cookies, dict[str, str], list[tuple[str, str]]]
@@ -55,7 +55,9 @@ FileTypes: TypeAlias = Union[
55
55
  # (filename, file (or bytes), content_type)
56
56
  tuple[Optional[str], FileContent, Optional[str]],
57
57
  ]
58
- RequestFiles: TypeAlias = Union[dict[str, FileTypes], list[tuple[str, FileTypes]]]
58
+ RequestFiles: TypeAlias = Union[
59
+ Mapping[str, FileTypes], Sequence[tuple[str, FileTypes]]
60
+ ]
59
61
 
60
62
  if PYDANTIC_V2: # pragma: pydantic-v2
61
63
  from pydantic import AfterValidator
@@ -2321,7 +2321,7 @@ if TYPE_CHECKING:
2321
2321
  WebhookDeploymentCreatedPropDeploymentPropCreator as WebhookDeploymentCreatedPropDeploymentPropCreator,
2322
2322
  )
2323
2323
  from .group_0540 import (
2324
- WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0,
2324
+ WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1 as WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1,
2325
2325
  )
2326
2326
  from .group_0540 import (
2327
2327
  WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp as WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp,
@@ -10479,7 +10479,7 @@ else:
10479
10479
  "WebhookDeploymentCreated",
10480
10480
  "WebhookDeploymentCreatedPropDeployment",
10481
10481
  "WebhookDeploymentCreatedPropDeploymentPropCreator",
10482
- "WebhookDeploymentCreatedPropDeploymentPropPayloadOneof0",
10482
+ "WebhookDeploymentCreatedPropDeploymentPropPayloadOneof1",
10483
10483
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubApp",
10484
10484
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropOwner",
10485
10485
  "WebhookDeploymentCreatedPropDeploymentPropPerformedViaGithubAppPropPermissions",
@@ -73,6 +73,7 @@ class EnterpriseTeam(GitHubModel):
73
73
  url: str = Field()
74
74
  sync_to_organizations: str = Field()
75
75
  group_id: Missing[Union[str, None]] = Field(default=UNSET)
76
+ group_name: Missing[Union[str, None]] = Field(default=UNSET)
76
77
  html_url: str = Field()
77
78
  members_url: str = Field()
78
79
  created_at: datetime = Field()
@@ -41,6 +41,7 @@ class BaseGist(GitHubModel):
41
41
  updated_at: datetime = Field()
42
42
  description: Union[str, None] = Field()
43
43
  comments: int = Field()
44
+ comments_enabled: Missing[bool] = Field(default=UNSET)
44
45
  user: Union[None, SimpleUser] = Field()
45
46
  comments_url: str = Field()
46
47
  owner: Missing[SimpleUser] = Field(
@@ -62,6 +62,7 @@ class GistSimplePropForkOf(GitHubModel):
62
62
  updated_at: datetime = Field()
63
63
  description: Union[str, None] = Field()
64
64
  comments: int = Field()
65
+ comments_enabled: Missing[bool] = Field(default=UNSET)
65
66
  user: Union[None, SimpleUser] = Field()
66
67
  comments_url: str = Field()
67
68
  owner: Missing[Union[None, SimpleUser]] = Field(default=UNSET)
@@ -47,6 +47,7 @@ class GistSimple(GitHubModel):
47
47
  updated_at: Missing[str] = Field(default=UNSET)
48
48
  description: Missing[Union[str, None]] = Field(default=UNSET)
49
49
  comments: Missing[int] = Field(default=UNSET)
50
+ comments_enabled: Missing[bool] = Field(default=UNSET)
50
51
  user: Missing[Union[str, None]] = Field(default=UNSET)
51
52
  comments_url: Missing[str] = Field(default=UNSET)
52
53
  owner: Missing[SimpleUser] = Field(
@@ -15,16 +15,16 @@ from githubkit.compat import GitHubModel, model_rebuild
15
15
 
16
16
 
17
17
  class CheckAutomatedSecurityFixes(GitHubModel):
18
- """Check Automated Security Fixes
18
+ """Check Dependabot security updates
19
19
 
20
- Check Automated Security Fixes
20
+ Check Dependabot security updates
21
21
  """
22
22
 
23
23
  enabled: bool = Field(
24
- description="Whether automated security fixes are enabled for the repository."
24
+ description="Whether Dependabot security updates are enabled for the repository."
25
25
  )
26
26
  paused: bool = Field(
27
- description="Whether automated security fixes are paused for the repository."
27
+ description="Whether Dependabot security updates are paused for the repository."
28
28
  )
29
29
 
30
30
 
@@ -46,6 +46,13 @@ class CodeScanningDefaultSetup(GitHubModel):
46
46
  ]
47
47
  ]
48
48
  ] = Field(default=UNSET, description="Languages to be analyzed.")
49
+ runner_type: Missing[Union[None, Literal["standard", "labeled"]]] = Field(
50
+ default=UNSET, description="Runner type to be used."
51
+ )
52
+ runner_label: Missing[Union[str, None]] = Field(
53
+ default=UNSET,
54
+ description="Runner label to be used if the runner type is labeled.",
55
+ )
49
56
  query_suite: Missing[Literal["default", "extended"]] = Field(
50
57
  default=UNSET, description="CodeQL query suite to be used."
51
58
  )
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Literal, Union
13
+ from typing import Annotated, Literal, Union
14
14
 
15
15
  from pydantic import Field
16
16
 
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertAppearedInBranchPropAlert(GitHubModel):
75
75
  dismissed_by: Union[
76
76
  WebhookCodeScanningAlertAppearedInBranchPropAlertPropDismissedBy, None
77
77
  ] = Field(title="User")
78
+ dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
79
+ Field(
80
+ default=UNSET,
81
+ description="The dismissal comment associated with the dismissal of the alert.",
82
+ )
83
+ )
78
84
  dismissed_reason: Union[
79
85
  None, Literal["false positive", "won't fix", "used in tests"]
80
86
  ] = Field(description="The reason for dismissing or closing the alert.")
87
+ fixed_at: Missing[None] = Field(
88
+ default=UNSET,
89
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
90
+ )
81
91
  html_url: str = Field(description="The GitHub URL of the alert resource.")
82
92
  most_recent_instance: Missing[
83
93
  Union[
@@ -87,8 +97,8 @@ class WebhookCodeScanningAlertAppearedInBranchPropAlert(GitHubModel):
87
97
  ] = Field(default=UNSET, title="Alert Instance")
88
98
  number: int = Field(description="The code scanning alert number.")
89
99
  rule: WebhookCodeScanningAlertAppearedInBranchPropAlertPropRule = Field()
90
- state: Literal["open", "dismissed", "fixed"] = Field(
91
- description="State of a code scanning alert."
100
+ state: Union[None, Literal["open", "dismissed", "fixed"]] = Field(
101
+ description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
92
102
  )
93
103
  tool: WebhookCodeScanningAlertAppearedInBranchPropAlertPropTool = Field()
94
104
  url: str = Field()
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Literal, Union
13
+ from typing import Annotated, Literal, Union
14
14
 
15
15
  from pydantic import Field
16
16
 
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertClosedByUserPropAlert(GitHubModel):
75
75
  dismissed_by: Union[
76
76
  WebhookCodeScanningAlertClosedByUserPropAlertPropDismissedBy, None
77
77
  ] = Field(title="User")
78
+ dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
79
+ Field(
80
+ default=UNSET,
81
+ description="The dismissal comment associated with the dismissal of the alert.",
82
+ )
83
+ )
78
84
  dismissed_reason: Union[
79
85
  None, Literal["false positive", "won't fix", "used in tests"]
80
86
  ] = Field(description="The reason for dismissing or closing the alert.")
87
+ fixed_at: Missing[None] = Field(
88
+ default=UNSET,
89
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
90
+ )
81
91
  html_url: str = Field(description="The GitHub URL of the alert resource.")
82
92
  most_recent_instance: Missing[
83
93
  Union[WebhookCodeScanningAlertClosedByUserPropAlertPropMostRecentInstance, None]
@@ -82,7 +82,10 @@ class WebhookCodeScanningAlertCreatedPropAlert(GitHubModel):
82
82
  dismissed_reason: None = Field(
83
83
  description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
84
84
  )
85
- fixed_at: Missing[None] = Field(default=UNSET)
85
+ fixed_at: Missing[None] = Field(
86
+ default=UNSET,
87
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
88
+ )
86
89
  html_url: str = Field(description="The GitHub URL of the alert resource.")
87
90
  instances_url: Missing[str] = Field(default=UNSET)
88
91
  most_recent_instance: Missing[
@@ -91,7 +94,7 @@ class WebhookCodeScanningAlertCreatedPropAlert(GitHubModel):
91
94
  number: int = Field(description="The code scanning alert number.")
92
95
  rule: WebhookCodeScanningAlertCreatedPropAlertPropRule = Field()
93
96
  state: Union[None, Literal["open", "dismissed"]] = Field(
94
- description="State of a code scanning alert."
97
+ description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
95
98
  )
96
99
  tool: Union[WebhookCodeScanningAlertCreatedPropAlertPropTool, None] = Field()
97
100
  updated_at: Missing[Union[str, None]] = Field(default=UNSET)
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Literal, Union
13
+ from typing import Annotated, Literal, Union
14
14
 
15
15
  from pydantic import Field
16
16
 
@@ -75,9 +75,19 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
75
75
  dismissed_by: Union[WebhookCodeScanningAlertFixedPropAlertPropDismissedBy, None] = (
76
76
  Field(title="User")
77
77
  )
78
+ dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
79
+ Field(
80
+ default=UNSET,
81
+ description="The dismissal comment associated with the dismissal of the alert.",
82
+ )
83
+ )
78
84
  dismissed_reason: Union[
79
85
  None, Literal["false positive", "won't fix", "used in tests"]
80
86
  ] = Field(description="The reason for dismissing or closing the alert.")
87
+ fixed_at: Missing[None] = Field(
88
+ default=UNSET,
89
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
90
+ )
81
91
  html_url: str = Field(description="The GitHub URL of the alert resource.")
82
92
  instances_url: Missing[str] = Field(default=UNSET)
83
93
  most_recent_instance: Missing[
@@ -85,7 +95,9 @@ class WebhookCodeScanningAlertFixedPropAlert(GitHubModel):
85
95
  ] = Field(default=UNSET, title="Alert Instance")
86
96
  number: int = Field(description="The code scanning alert number.")
87
97
  rule: WebhookCodeScanningAlertFixedPropAlertPropRule = Field()
88
- state: Literal["fixed"] = Field(description="State of a code scanning alert.")
98
+ state: Union[None, Literal["fixed"]] = Field(
99
+ description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
100
+ )
89
101
  tool: WebhookCodeScanningAlertFixedPropAlertPropTool = Field()
90
102
  url: str = Field()
91
103
 
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Literal, Union
13
+ from typing import Annotated, Literal, Union
14
14
 
15
15
  from pydantic import Field
16
16
 
@@ -75,17 +75,27 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel):
75
75
  dismissed_by: Union[
76
76
  WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None
77
77
  ] = Field()
78
+ dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
79
+ Field(
80
+ default=UNSET,
81
+ description="The dismissal comment associated with the dismissal of the alert.",
82
+ )
83
+ )
78
84
  dismissed_reason: Union[str, None] = Field(
79
85
  description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
80
86
  )
87
+ fixed_at: Missing[None] = Field(
88
+ default=UNSET,
89
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
90
+ )
81
91
  html_url: str = Field(description="The GitHub URL of the alert resource.")
82
92
  most_recent_instance: Missing[
83
93
  Union[WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance, None]
84
94
  ] = Field(default=UNSET, title="Alert Instance")
85
95
  number: int = Field(description="The code scanning alert number.")
86
96
  rule: WebhookCodeScanningAlertReopenedPropAlertPropRule = Field()
87
- state: Literal["open", "dismissed", "fixed"] = Field(
88
- description="State of a code scanning alert."
97
+ state: Union[None, Literal["open", "dismissed", "fixed"]] = Field(
98
+ description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
89
99
  )
90
100
  tool: WebhookCodeScanningAlertReopenedPropAlertPropTool = Field()
91
101
  url: str = Field()
@@ -10,7 +10,7 @@ See https://github.com/github/rest-api-description for more information.
10
10
  from __future__ import annotations
11
11
 
12
12
  from datetime import datetime
13
- from typing import Literal, Union
13
+ from typing import Annotated, Literal, Union
14
14
 
15
15
  from pydantic import Field
16
16
 
@@ -73,9 +73,19 @@ class WebhookCodeScanningAlertReopenedByUserPropAlert(GitHubModel):
73
73
  description="The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`."
74
74
  )
75
75
  dismissed_by: None = Field()
76
+ dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = (
77
+ Field(
78
+ default=UNSET,
79
+ description="The dismissal comment associated with the dismissal of the alert.",
80
+ )
81
+ )
76
82
  dismissed_reason: None = Field(
77
83
  description="The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`."
78
84
  )
85
+ fixed_at: Missing[None] = Field(
86
+ default=UNSET,
87
+ description="The time that the alert was fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.",
88
+ )
79
89
  html_url: str = Field(description="The GitHub URL of the alert resource.")
80
90
  most_recent_instance: Missing[
81
91
  Union[
@@ -84,8 +94,8 @@ class WebhookCodeScanningAlertReopenedByUserPropAlert(GitHubModel):
84
94
  ] = Field(default=UNSET, title="Alert Instance")
85
95
  number: int = Field(description="The code scanning alert number.")
86
96
  rule: WebhookCodeScanningAlertReopenedByUserPropAlertPropRule = Field()
87
- state: Literal["open", "fixed"] = Field(
88
- description="State of a code scanning alert."
97
+ state: Union[None, Literal["open", "fixed"]] = Field(
98
+ description="State of a code scanning alert. Events for alerts found outside the default branch will return a `null` value until they are dismissed or fixed."
89
99
  )
90
100
  tool: WebhookCodeScanningAlertReopenedByUserPropAlertPropTool = Field()
91
101
  url: str = Field()