PyGithub-asyncio 3.0.0b1__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 (188) hide show
  1. githubasyncio/AccessToken.py +159 -0
  2. githubasyncio/AdvisoryBase.py +163 -0
  3. githubasyncio/AdvisoryCredit.py +131 -0
  4. githubasyncio/AdvisoryCreditDetailed.py +110 -0
  5. githubasyncio/AdvisoryVulnerability.py +191 -0
  6. githubasyncio/AdvisoryVulnerabilityPackage.py +93 -0
  7. githubasyncio/AppAuthentication.py +58 -0
  8. githubasyncio/ApplicationOAuth.py +200 -0
  9. githubasyncio/Artifact.py +183 -0
  10. githubasyncio/Auth.py +560 -0
  11. githubasyncio/AuthenticatedUser.py +1251 -0
  12. githubasyncio/Authorization.py +192 -0
  13. githubasyncio/AuthorizationApplication.py +73 -0
  14. githubasyncio/Autolink.py +104 -0
  15. githubasyncio/Branch.py +689 -0
  16. githubasyncio/BranchProtection.py +224 -0
  17. githubasyncio/CVSS.py +83 -0
  18. githubasyncio/CWE.py +75 -0
  19. githubasyncio/CheckRun.py +315 -0
  20. githubasyncio/CheckRunAnnotation.py +134 -0
  21. githubasyncio/CheckRunOutput.py +108 -0
  22. githubasyncio/CheckSuite.py +319 -0
  23. githubasyncio/Clones.py +97 -0
  24. githubasyncio/CodeScanAlert.py +215 -0
  25. githubasyncio/CodeScanAlertInstance.py +134 -0
  26. githubasyncio/CodeScanAlertInstanceLocation.py +102 -0
  27. githubasyncio/CodeScanRule.py +134 -0
  28. githubasyncio/CodeScanTool.py +94 -0
  29. githubasyncio/CodeSecurityConfig.py +301 -0
  30. githubasyncio/CodeSecurityConfigRepository.py +70 -0
  31. githubasyncio/Commit.py +442 -0
  32. githubasyncio/CommitCombinedStatus.py +126 -0
  33. githubasyncio/CommitComment.py +270 -0
  34. githubasyncio/CommitStats.py +78 -0
  35. githubasyncio/CommitStatus.py +169 -0
  36. githubasyncio/Comparison.py +219 -0
  37. githubasyncio/Consts.py +197 -0
  38. githubasyncio/ContentFile.py +304 -0
  39. githubasyncio/Copilot.py +97 -0
  40. githubasyncio/CopilotSeat.py +132 -0
  41. githubasyncio/DefaultCodeSecurityConfig.py +93 -0
  42. githubasyncio/DependabotAlert.py +184 -0
  43. githubasyncio/DependabotAlertAdvisory.py +82 -0
  44. githubasyncio/DependabotAlertDependency.py +100 -0
  45. githubasyncio/DependabotAlertVulnerability.py +85 -0
  46. githubasyncio/Deployment.py +314 -0
  47. githubasyncio/DeploymentBranchPolicy.py +102 -0
  48. githubasyncio/DeploymentStatus.py +201 -0
  49. githubasyncio/DiscussionBase.py +140 -0
  50. githubasyncio/DiscussionCommentBase.py +140 -0
  51. githubasyncio/Download.py +256 -0
  52. githubasyncio/Enterprise.py +175 -0
  53. githubasyncio/EnterpriseConsumedLicenses.py +138 -0
  54. githubasyncio/Environment.py +354 -0
  55. githubasyncio/EnvironmentDeploymentBranchPolicy.py +87 -0
  56. githubasyncio/EnvironmentProtectionRule.py +117 -0
  57. githubasyncio/EnvironmentProtectionRuleReviewer.py +110 -0
  58. githubasyncio/Event.py +134 -0
  59. githubasyncio/File.py +142 -0
  60. githubasyncio/GeneratedReleaseNotes.py +68 -0
  61. githubasyncio/Gist.py +373 -0
  62. githubasyncio/GistComment.py +162 -0
  63. githubasyncio/GistFile.py +106 -0
  64. githubasyncio/GistHistoryState.py +245 -0
  65. githubasyncio/GitAuthor.py +94 -0
  66. githubasyncio/GitBlob.py +123 -0
  67. githubasyncio/GitCommit.py +208 -0
  68. githubasyncio/GitCommitVerification.py +103 -0
  69. githubasyncio/GitObject.py +84 -0
  70. githubasyncio/GitRef.py +122 -0
  71. githubasyncio/GitRelease.py +476 -0
  72. githubasyncio/GitReleaseAsset.py +232 -0
  73. githubasyncio/GitTag.py +143 -0
  74. githubasyncio/GitTree.py +113 -0
  75. githubasyncio/GitTreeElement.py +104 -0
  76. githubasyncio/GithubApp.py +236 -0
  77. githubasyncio/GithubException.py +226 -0
  78. githubasyncio/GithubIntegration.py +365 -0
  79. githubasyncio/GithubObject.py +910 -0
  80. githubasyncio/GithubRetry.py +253 -0
  81. githubasyncio/GitignoreTemplate.py +88 -0
  82. githubasyncio/GlobalAdvisory.py +141 -0
  83. githubasyncio/Hook.py +238 -0
  84. githubasyncio/HookDelivery.py +243 -0
  85. githubasyncio/HookDescription.py +85 -0
  86. githubasyncio/HookResponse.py +83 -0
  87. githubasyncio/InputFileContent.py +63 -0
  88. githubasyncio/InputGitAuthor.py +71 -0
  89. githubasyncio/InputGitTreeElement.py +79 -0
  90. githubasyncio/Installation.py +298 -0
  91. githubasyncio/InstallationAuthorization.py +138 -0
  92. githubasyncio/Invitation.py +171 -0
  93. githubasyncio/Issue.py +955 -0
  94. githubasyncio/IssueComment.py +309 -0
  95. githubasyncio/IssueDependenciesSummary.py +77 -0
  96. githubasyncio/IssueEvent.py +296 -0
  97. githubasyncio/IssuePullRequest.py +97 -0
  98. githubasyncio/IssueType.py +123 -0
  99. githubasyncio/Label.py +186 -0
  100. githubasyncio/License.py +169 -0
  101. githubasyncio/MainClass.py +1142 -0
  102. githubasyncio/Membership.py +154 -0
  103. githubasyncio/MergedUpstream.py +71 -0
  104. githubasyncio/Migration.py +281 -0
  105. githubasyncio/Milestone.py +255 -0
  106. githubasyncio/NamedEnterpriseUser.py +207 -0
  107. githubasyncio/NamedUser.py +841 -0
  108. githubasyncio/Notification.py +182 -0
  109. githubasyncio/NotificationSubject.py +96 -0
  110. githubasyncio/Organization.py +2462 -0
  111. githubasyncio/OrganizationCodeScanAlert.py +65 -0
  112. githubasyncio/OrganizationCustomProperty.py +215 -0
  113. githubasyncio/OrganizationDependabotAlert.py +75 -0
  114. githubasyncio/OrganizationSecret.py +191 -0
  115. githubasyncio/OrganizationSecretScanAlert.py +112 -0
  116. githubasyncio/OrganizationVariable.py +141 -0
  117. githubasyncio/PaginatedList.py +652 -0
  118. githubasyncio/Path.py +102 -0
  119. githubasyncio/Permissions.py +113 -0
  120. githubasyncio/Plan.py +108 -0
  121. githubasyncio/Project.py +286 -0
  122. githubasyncio/ProjectCard.py +257 -0
  123. githubasyncio/ProjectColumn.py +227 -0
  124. githubasyncio/PublicKey.py +138 -0
  125. githubasyncio/PullRequest.py +1202 -0
  126. githubasyncio/PullRequestComment.py +401 -0
  127. githubasyncio/PullRequestMergeStatus.py +89 -0
  128. githubasyncio/PullRequestPart.py +110 -0
  129. githubasyncio/PullRequestReview.py +214 -0
  130. githubasyncio/Rate.py +123 -0
  131. githubasyncio/RateLimit.py +210 -0
  132. githubasyncio/RateLimitOverview.py +104 -0
  133. githubasyncio/Reaction.py +128 -0
  134. githubasyncio/Referrer.py +94 -0
  135. githubasyncio/RepoCodeSecurityConfig.py +93 -0
  136. githubasyncio/Repository.py +5211 -0
  137. githubasyncio/RepositoryAdvisory.py +431 -0
  138. githubasyncio/RepositoryDiscussion.py +221 -0
  139. githubasyncio/RepositoryDiscussionCategory.py +150 -0
  140. githubasyncio/RepositoryDiscussionComment.py +159 -0
  141. githubasyncio/RepositoryKey.py +166 -0
  142. githubasyncio/RepositoryPreferences.py +82 -0
  143. githubasyncio/RepositoryRulesetBypassActor.py +75 -0
  144. githubasyncio/Requester.py +1518 -0
  145. githubasyncio/RequiredPullRequestReviews.py +269 -0
  146. githubasyncio/RequiredStatusChecks.py +153 -0
  147. githubasyncio/Rule.py +134 -0
  148. githubasyncio/Ruleset.py +292 -0
  149. githubasyncio/Secret.py +139 -0
  150. githubasyncio/SecretScanAlert.py +317 -0
  151. githubasyncio/SecretScanAlertInstance.py +128 -0
  152. githubasyncio/SecurityAndAnalysis.py +188 -0
  153. githubasyncio/SecurityAndAnalysisFeature.py +79 -0
  154. githubasyncio/SelfHostedActionsRunner.py +129 -0
  155. githubasyncio/SelfHostedActionsRunnerApplication.py +92 -0
  156. githubasyncio/SelfHostedActionsRunnerJitConfig.py +74 -0
  157. githubasyncio/SelfHostedActionsRunnerToken.py +118 -0
  158. githubasyncio/SourceImport.py +260 -0
  159. githubasyncio/Stargazer.py +88 -0
  160. githubasyncio/StatsCodeFrequency.py +81 -0
  161. githubasyncio/StatsCommitActivity.py +86 -0
  162. githubasyncio/StatsContributor.py +138 -0
  163. githubasyncio/StatsParticipation.py +78 -0
  164. githubasyncio/StatsPunchCard.py +76 -0
  165. githubasyncio/SubIssueSummary.py +70 -0
  166. githubasyncio/Tag.py +108 -0
  167. githubasyncio/Team.py +618 -0
  168. githubasyncio/TeamDiscussion.py +137 -0
  169. githubasyncio/TimelineEvent.py +164 -0
  170. githubasyncio/TimelineEventSource.py +81 -0
  171. githubasyncio/Topic.py +177 -0
  172. githubasyncio/Traffic.py +95 -0
  173. githubasyncio/UserKey.py +141 -0
  174. githubasyncio/Variable.py +155 -0
  175. githubasyncio/View.py +97 -0
  176. githubasyncio/Workflow.py +335 -0
  177. githubasyncio/WorkflowJob.py +253 -0
  178. githubasyncio/WorkflowRun.py +480 -0
  179. githubasyncio/WorkflowStep.py +118 -0
  180. githubasyncio/__init__.py +38 -0
  181. githubasyncio/compat/__init__.py +52 -0
  182. githubasyncio/requestlib/__init__.py +29 -0
  183. pygithub_asyncio-3.0.0b1.dist-info/METADATA +102 -0
  184. pygithub_asyncio-3.0.0b1.dist-info/RECORD +188 -0
  185. pygithub_asyncio-3.0.0b1.dist-info/WHEEL +5 -0
  186. pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING +674 -0
  187. pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING.LESSER +165 -0
  188. pygithub_asyncio-3.0.0b1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,480 @@
1
+ # FILE AUTO GENERATED DO NOT TOUCH
2
+ ############################ Copyrights and license ############################
3
+ # #
4
+ # Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
5
+ # Copyright 2020 Yannick Jadoul <yannick.jadoul@belgacom.net> #
6
+ # Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
7
+ # Copyright 2022 Aleksei Fedotov <lexa@cfotr.com> #
8
+ # Copyright 2022 Gabriele Oliaro <ict@gabrieleoliaro.it> #
9
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
10
+ # Copyright 2023 Jeppe Fihl-Pearson <tenzer@tenzer.dk> #
11
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
12
+ # Copyright 2023 Sasha Chung <50770626+nuang-ee@users.noreply.github.com> #
13
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
14
+ # Copyright 2024 Chris Gavin <chris@chrisgavin.me> #
15
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
16
+ # Copyright 2024 Geoffrey <geoffrey@moveparallel.com> #
17
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
18
+ # Copyright 2025 Alejandro Perez Gancedo <37455131+LifeLex@users.noreply.github.com>#
19
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
20
+ # Copyright 2026 Chinedum Echeta <60179183+cecheta@users.noreply.github.com> #
21
+ # Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
22
+ # #
23
+ # This file is part of PyGithub. #
24
+ # http://pygithub.readthedocs.io/ #
25
+ # #
26
+ # PyGithub is free software: you can redistribute it and/or modify it under #
27
+ # the terms of the GNU Lesser General Public License as published by the Free #
28
+ # Software Foundation, either version 3 of the License, or (at your option) #
29
+ # any later version. #
30
+ # #
31
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
32
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
33
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
34
+ # details. #
35
+ # #
36
+ # You should have received a copy of the GNU Lesser General Public License #
37
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
38
+ # #
39
+ ################################################################################
40
+
41
+ from __future__ import annotations
42
+
43
+ from datetime import datetime
44
+ from typing import TYPE_CHECKING, Any, NamedTuple
45
+
46
+ import githubasyncio.Artifact
47
+ import githubasyncio.GitCommit
48
+ import githubasyncio.NamedUser
49
+ import githubasyncio.PullRequest
50
+ import githubasyncio.Repository
51
+ import githubasyncio.WorkflowJob
52
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet, Opt, is_optional
53
+ from githubasyncio.PaginatedList import PaginatedList
54
+
55
+ if TYPE_CHECKING:
56
+ from githubasyncio.Artifact import Artifact
57
+ from githubasyncio.GitCommit import GitCommit
58
+ from githubasyncio.NamedUser import NamedUser
59
+ from githubasyncio.PullRequest import PullRequest
60
+ from githubasyncio.Repository import Repository
61
+ from githubasyncio.WorkflowJob import WorkflowJob
62
+
63
+
64
+ class TimingData(NamedTuple):
65
+ """
66
+ This class represents workflow run usage.
67
+
68
+ The reference can be found here
69
+ https://docs.github.com/en/rest/actions/workflows#get-workflow-usage
70
+
71
+ The OpenAPI schema can be found at
72
+
73
+ - /components/schemas/workflow-run-usage
74
+
75
+ """
76
+
77
+ billable: dict[str, dict[str, int]]
78
+ run_duration_ms: int | None
79
+
80
+
81
+ class WorkflowRun(CompletableGithubObject):
82
+ """
83
+ This class represents Workflow Runs.
84
+
85
+ The reference can be found here
86
+ https://docs.github.com/en/rest/reference/actions#workflow-runs
87
+
88
+ The OpenAPI schema can be found at
89
+
90
+ - /components/schemas/artifact/properties/workflow_run
91
+ - /components/schemas/workflow-run
92
+
93
+ """
94
+
95
+ def _initAttributes(self) -> None:
96
+ self._actor: Attribute[NamedUser] = NotSet
97
+ self._artifacts_url: Attribute[str] = NotSet
98
+ self._cancel_url: Attribute[str] = NotSet
99
+ self._check_suite_id: Attribute[int] = NotSet
100
+ self._check_suite_node_id: Attribute[str] = NotSet
101
+ self._check_suite_url: Attribute[str] = NotSet
102
+ self._conclusion: Attribute[str] = NotSet
103
+ self._created_at: Attribute[datetime] = NotSet
104
+ self._display_title: Attribute[str] = NotSet
105
+ self._event: Attribute[str] = NotSet
106
+ self._head_branch: Attribute[str] = NotSet
107
+ self._head_commit: Attribute[GitCommit] = NotSet
108
+ self._head_repository: Attribute[Repository] = NotSet
109
+ self._head_repository_id: Attribute[int] = NotSet
110
+ self._head_sha: Attribute[str] = NotSet
111
+ self._html_url: Attribute[str] = NotSet
112
+ self._id: Attribute[int] = NotSet
113
+ self._jobs_url: Attribute[str] = NotSet
114
+ self._logs_url: Attribute[str] = NotSet
115
+ self._name: Attribute[str] = NotSet
116
+ self._node_id: Attribute[str] = NotSet
117
+ self._path: Attribute[str] = NotSet
118
+ self._previous_attempt_url: Attribute[str] = NotSet
119
+ self._pull_requests: Attribute[list[PullRequest]] = NotSet
120
+ self._referenced_workflows: Attribute[list[dict[str, Any]]] = NotSet
121
+ self._repository: Attribute[Repository] = NotSet
122
+ self._repository_id: Attribute[int] = NotSet
123
+ self._rerun_url: Attribute[str] = NotSet
124
+ self._run_attempt: Attribute[int] = NotSet
125
+ self._run_number: Attribute[int] = NotSet
126
+ self._run_started_at: Attribute[datetime] = NotSet
127
+ self._status: Attribute[str] = NotSet
128
+ self._triggering_actor: Attribute[NamedUser] = NotSet
129
+ self._updated_at: Attribute[datetime] = NotSet
130
+ self._url: Attribute[str] = NotSet
131
+ self._workflow_id: Attribute[int] = NotSet
132
+ self._workflow_url: Attribute[str] = NotSet
133
+
134
+ def __repr__(self) -> str:
135
+ return self.get__repr__({"id": self._id.value, "url": self._url.value})
136
+
137
+ @property
138
+ async def actor(self) -> NamedUser:
139
+ await self._completeIfNotSet(self._actor)
140
+ return self._actor.value
141
+
142
+ @property
143
+ async def artifacts_url(self) -> str:
144
+ await self._completeIfNotSet(self._artifacts_url)
145
+ return self._artifacts_url.value
146
+
147
+ @property
148
+ async def cancel_url(self) -> str:
149
+ await self._completeIfNotSet(self._cancel_url)
150
+ return self._cancel_url.value
151
+
152
+ @property
153
+ async def check_suite_id(self) -> int:
154
+ await self._completeIfNotSet(self._check_suite_id)
155
+ return self._check_suite_id.value
156
+
157
+ @property
158
+ async def check_suite_node_id(self) -> str:
159
+ await self._completeIfNotSet(self._check_suite_node_id)
160
+ return self._check_suite_node_id.value
161
+
162
+ @property
163
+ async def check_suite_url(self) -> str:
164
+ await self._completeIfNotSet(self._check_suite_url)
165
+ return self._check_suite_url.value
166
+
167
+ @property
168
+ async def conclusion(self) -> str:
169
+ await self._completeIfNotSet(self._conclusion)
170
+ return self._conclusion.value
171
+
172
+ @property
173
+ async def created_at(self) -> datetime:
174
+ await self._completeIfNotSet(self._created_at)
175
+ return self._created_at.value
176
+
177
+ @property
178
+ async def display_title(self) -> str:
179
+ await self._completeIfNotSet(self._display_title)
180
+ return self._display_title.value
181
+
182
+ @property
183
+ async def event(self) -> str:
184
+ await self._completeIfNotSet(self._event)
185
+ return self._event.value
186
+
187
+ @property
188
+ async def head_branch(self) -> str:
189
+ await self._completeIfNotSet(self._head_branch)
190
+ return self._head_branch.value
191
+
192
+ @property
193
+ async def head_commit(self) -> GitCommit:
194
+ await self._completeIfNotSet(self._head_commit)
195
+ return self._head_commit.value
196
+
197
+ @property
198
+ async def head_repository(self) -> Repository:
199
+ await self._completeIfNotSet(self._head_repository)
200
+ return self._head_repository.value
201
+
202
+ @property
203
+ async def head_repository_id(self) -> int:
204
+ await self._completeIfNotSet(self._head_repository_id)
205
+ return self._head_repository_id.value
206
+
207
+ @property
208
+ async def head_sha(self) -> str:
209
+ await self._completeIfNotSet(self._head_sha)
210
+ return self._head_sha.value
211
+
212
+ @property
213
+ async def html_url(self) -> str:
214
+ await self._completeIfNotSet(self._html_url)
215
+ return self._html_url.value
216
+
217
+ @property
218
+ async def id(self) -> int:
219
+ await self._completeIfNotSet(self._id)
220
+ return self._id.value
221
+
222
+ @property
223
+ async def jobs_url(self) -> str:
224
+ await self._completeIfNotSet(self._jobs_url)
225
+ return self._jobs_url.value
226
+
227
+ @property
228
+ async def logs_url(self) -> str:
229
+ await self._completeIfNotSet(self._logs_url)
230
+ return self._logs_url.value
231
+
232
+ @property
233
+ async def name(self) -> str:
234
+ await self._completeIfNotSet(self._name)
235
+ return self._name.value
236
+
237
+ @property
238
+ async def node_id(self) -> str:
239
+ await self._completeIfNotSet(self._node_id)
240
+ return self._node_id.value
241
+
242
+ @property
243
+ async def path(self) -> str:
244
+ await self._completeIfNotSet(self._path)
245
+ return self._path.value
246
+
247
+ @property
248
+ async def previous_attempt_url(self) -> str:
249
+ await self._completeIfNotSet(self._previous_attempt_url)
250
+ return self._previous_attempt_url.value
251
+
252
+ @property
253
+ async def pull_requests(self) -> list[PullRequest]:
254
+ await self._completeIfNotSet(self._pull_requests)
255
+ return self._pull_requests.value
256
+
257
+ @property
258
+ async def referenced_workflows(self) -> list[dict[str, Any]]:
259
+ await self._completeIfNotSet(self._referenced_workflows)
260
+ return self._referenced_workflows.value
261
+
262
+ @property
263
+ async def repository(self) -> Repository:
264
+ await self._completeIfNotSet(self._repository)
265
+ return self._repository.value
266
+
267
+ @property
268
+ async def repository_id(self) -> int:
269
+ await self._completeIfNotSet(self._repository_id)
270
+ return self._repository_id.value
271
+
272
+ @property
273
+ async def rerun_url(self) -> str:
274
+ await self._completeIfNotSet(self._rerun_url)
275
+ return self._rerun_url.value
276
+
277
+ @property
278
+ async def run_attempt(self) -> int:
279
+ await self._completeIfNotSet(self._run_attempt)
280
+ return self._run_attempt.value
281
+
282
+ @property
283
+ async def run_number(self) -> int:
284
+ await self._completeIfNotSet(self._run_number)
285
+ return self._run_number.value
286
+
287
+ @property
288
+ async def run_started_at(self) -> datetime:
289
+ await self._completeIfNotSet(self._run_started_at)
290
+ return self._run_started_at.value
291
+
292
+ @property
293
+ async def status(self) -> str:
294
+ await self._completeIfNotSet(self._status)
295
+ return self._status.value
296
+
297
+ @property
298
+ async def triggering_actor(self) -> NamedUser:
299
+ await self._completeIfNotSet(self._triggering_actor)
300
+ return self._triggering_actor.value
301
+
302
+ @property
303
+ async def updated_at(self) -> datetime:
304
+ await self._completeIfNotSet(self._updated_at)
305
+ return self._updated_at.value
306
+
307
+ @property
308
+ async def url(self) -> str:
309
+ await self._completeIfNotSet(self._url)
310
+ return self._url.value
311
+
312
+ @property
313
+ async def workflow_id(self) -> int:
314
+ await self._completeIfNotSet(self._workflow_id)
315
+ return self._workflow_id.value
316
+
317
+ @property
318
+ async def workflow_url(self) -> str:
319
+ await self._completeIfNotSet(self._workflow_url)
320
+ return self._workflow_url.value
321
+
322
+ async def get_attempt(self, attempt_number: int) -> WorkflowRun:
323
+ """
324
+ :calls: `GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number} <https://docs.github.com/en/rest/actions/workflow-runs#get-a-workflow-run-attempt>`_
325
+ :param attempt_number: int
326
+ :rtype: :class:`WorkflowRun`
327
+ """
328
+ assert isinstance(attempt_number, int)
329
+ url = f"{await self.url}/attempts/{attempt_number}"
330
+ return WorkflowRun(self._requester, url=url)
331
+
332
+ async def get_artifacts(self) -> PaginatedList[Artifact]:
333
+ return PaginatedList(
334
+ githubasyncio.Artifact.Artifact,
335
+ self._requester,
336
+ await self.artifacts_url,
337
+ None,
338
+ list_item="artifacts",
339
+ )
340
+
341
+ async def cancel(self) -> bool:
342
+ """
343
+ :calls: `POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel <https://docs.github.com/en/rest/reference/actions#workflow-runs>`_
344
+ """
345
+ status, _, _ = await self._requester.requestJson("POST", await self.cancel_url)
346
+ return status == 202
347
+
348
+ async def rerun(self) -> bool:
349
+ """
350
+ :calls: `POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun <https://docs.github.com/en/rest/reference/actions#workflow-runs>`_
351
+ """
352
+ status, _, _ = await self._requester.requestJson("POST", await self.rerun_url)
353
+ return status == 201
354
+
355
+ async def rerun_failed_jobs(self) -> bool:
356
+ """
357
+ :calls: `POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs <https://docs.github.com/en/rest/reference/actions#workflow-runs>`_
358
+ """
359
+ status, _, _ = await self._requester.requestJson("POST", f"{await self.url}/rerun-failed-jobs")
360
+ return status == 201
361
+
362
+ async def timing(self) -> TimingData:
363
+ """
364
+ :calls: `GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing <https://docs.github.com/en/rest/reference/actions#workflow-runs>`_
365
+ """
366
+ headers, data = await self._requester.requestJsonAndCheck("GET", f"{await self.url}/timing")
367
+ return TimingData(billable=data["billable"], run_duration_ms=data.get("run_duration_ms"))
368
+
369
+ async def delete(self) -> bool:
370
+ """
371
+ :calls: `DELETE /repos/{owner}/{repo}/actions/runs/{run_id} <https://docs.github.com/en/rest/reference/actions#workflow-runs>`_
372
+ """
373
+ status, _, _ = await self._requester.requestJson("DELETE", await self.url)
374
+ return status == 204
375
+
376
+ async def jobs(self, _filter: Opt[str] = NotSet) -> PaginatedList[WorkflowJob]:
377
+ """
378
+ :calls "`GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs <https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run>`_
379
+ :param _filter: string `latest`, or `all`
380
+ """
381
+ assert is_optional(_filter, str), _filter
382
+
383
+ url_parameters = NotSet.remove_unset_items({"filter": _filter})
384
+
385
+ return PaginatedList(
386
+ githubasyncio.WorkflowJob.WorkflowJob,
387
+ self._requester,
388
+ await self.jobs_url,
389
+ url_parameters,
390
+ list_item="jobs",
391
+ )
392
+
393
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
394
+ if "actor" in attributes: # pragma no branch
395
+ self._actor = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["actor"])
396
+ if "artifacts_url" in attributes: # pragma no branch
397
+ self._artifacts_url = self._makeStringAttribute(attributes["artifacts_url"])
398
+ if "cancel_url" in attributes: # pragma no branch
399
+ self._cancel_url = self._makeStringAttribute(attributes["cancel_url"])
400
+ if "check_suite_id" in attributes: # pragma no branch
401
+ self._check_suite_id = self._makeIntAttribute(attributes["check_suite_id"])
402
+ if "check_suite_node_id" in attributes: # pragma no branch
403
+ self._check_suite_node_id = self._makeStringAttribute(attributes["check_suite_node_id"])
404
+ if "check_suite_url" in attributes: # pragma no branch
405
+ self._check_suite_url = self._makeStringAttribute(attributes["check_suite_url"])
406
+ if "conclusion" in attributes: # pragma no branch
407
+ self._conclusion = self._makeStringAttribute(attributes["conclusion"])
408
+ if "created_at" in attributes: # pragma no branch
409
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
410
+ if "display_title" in attributes: # pragma no branch
411
+ self._display_title = self._makeStringAttribute(attributes["display_title"])
412
+ if "event" in attributes: # pragma no branch
413
+ self._event = self._makeStringAttribute(attributes["event"])
414
+ if "head_branch" in attributes: # pragma no branch
415
+ self._head_branch = self._makeStringAttribute(attributes["head_branch"])
416
+ if "head_commit" in attributes: # pragma no branch
417
+ self._head_commit = self._makeClassAttribute(githubasyncio.GitCommit.GitCommit, attributes["head_commit"])
418
+ if "head_repository" in attributes: # pragma no branch
419
+ self._head_repository = self._makeClassAttribute(
420
+ githubasyncio.Repository.Repository, attributes["head_repository"]
421
+ )
422
+ if "head_repository_id" in attributes: # pragma no branch
423
+ self._head_repository_id = self._makeIntAttribute(attributes["head_repository_id"])
424
+ if "head_sha" in attributes: # pragma no branch
425
+ self._head_sha = self._makeStringAttribute(attributes["head_sha"])
426
+ if "html_url" in attributes: # pragma no branch
427
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
428
+ if "id" in attributes: # pragma no branch
429
+ self._id = self._makeIntAttribute(attributes["id"])
430
+ elif "url" in attributes and attributes["url"]:
431
+ id = attributes["url"].split("/")[-1]
432
+ if id.isnumeric():
433
+ self._id = self._makeIntAttribute(int(id))
434
+ if "jobs_url" in attributes: # pragma no branch
435
+ self._jobs_url = self._makeStringAttribute(attributes["jobs_url"])
436
+ if "logs_url" in attributes: # pragma no branch
437
+ self._logs_url = self._makeStringAttribute(attributes["logs_url"])
438
+ if "name" in attributes: # pragma no branch
439
+ self._name = self._makeStringAttribute(attributes["name"])
440
+ if "node_id" in attributes: # pragma no branch
441
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
442
+ if "path" in attributes: # pragma no branch
443
+ self._path = self._makeStringAttribute(attributes["path"])
444
+ if "previous_attempt_url" in attributes: # pragma no branch
445
+ self._previous_attempt_url = self._makeStringAttribute(attributes["previous_attempt_url"])
446
+ if "pull_requests" in attributes: # pragma no branch
447
+ self._pull_requests = self._makeListOfClassesAttribute(
448
+ githubasyncio.PullRequest.PullRequest, attributes["pull_requests"]
449
+ )
450
+ if "referenced_workflows" in attributes: # pragma no branch
451
+ self._referenced_workflows = self._makeListOfDictsAttribute(attributes["referenced_workflows"])
452
+ if "repository" in attributes: # pragma no branch
453
+ self._repository = self._makeClassAttribute(githubasyncio.Repository.Repository, attributes["repository"])
454
+ if "repository_id" in attributes: # pragma no branch
455
+ self._repository_id = self._makeIntAttribute(attributes["repository_id"])
456
+ if "rerun_url" in attributes: # pragma no branch
457
+ self._rerun_url = self._makeStringAttribute(attributes["rerun_url"])
458
+ if "run_attempt" in attributes: # pragma no branch
459
+ self._run_attempt = self._makeIntAttribute(attributes["run_attempt"])
460
+ if "run_number" in attributes: # pragma no branch
461
+ self._run_number = self._makeIntAttribute(attributes["run_number"])
462
+ if "run_started_at" in attributes: # pragma no branch
463
+ assert attributes["run_started_at"] is None or isinstance(attributes["run_started_at"], str), attributes[
464
+ "run_started_at"
465
+ ]
466
+ self._run_started_at = self._makeDatetimeAttribute(attributes["run_started_at"])
467
+ if "status" in attributes: # pragma no branch
468
+ self._status = self._makeStringAttribute(attributes["status"])
469
+ if "triggering_actor" in attributes: # pragma no branch
470
+ self._triggering_actor = self._makeClassAttribute(
471
+ githubasyncio.NamedUser.NamedUser, attributes["triggering_actor"]
472
+ )
473
+ if "updated_at" in attributes: # pragma no branch
474
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
475
+ if "url" in attributes: # pragma no branch
476
+ self._url = self._makeStringAttribute(attributes["url"])
477
+ if "workflow_id" in attributes: # pragma no branch
478
+ self._workflow_id = self._makeIntAttribute(attributes["workflow_id"])
479
+ if "workflow_url" in attributes: # pragma no branch
480
+ self._workflow_url = self._makeStringAttribute(attributes["workflow_url"])
@@ -0,0 +1,118 @@
1
+ # FILE AUTO GENERATED DO NOT TOUCH
2
+ ############################ Copyrights and license ############################
3
+ # #
4
+ # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
5
+ # Copyright 2012 Zearin <zearin@gonk.net> #
6
+ # Copyright 2013 AKFish <akfish@gmail.com> #
7
+ # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
8
+ # Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
9
+ # Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
10
+ # Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
11
+ # Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
12
+ # Copyright 2018 sfdye <tsfdye@gmail.com> #
13
+ # Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
14
+ # Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
15
+ # Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
16
+ # Copyright 2020 Victor Zeng <zacker150@users.noreply.github.com> #
17
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
18
+ # Copyright 2023 Jeppe Fihl-Pearson <tenzer@tenzer.dk> #
19
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
20
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
21
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
22
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
23
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
24
+ # Copyright 2026 Chinedum Echeta <60179183+cecheta@users.noreply.github.com> #
25
+ # #
26
+ # This file is part of PyGithub. #
27
+ # http://pygithub.readthedocs.io/ #
28
+ # #
29
+ # PyGithub is free software: you can redistribute it and/or modify it under #
30
+ # the terms of the GNU Lesser General Public License as published by the Free #
31
+ # Software Foundation, either version 3 of the License, or (at your option) #
32
+ # any later version. #
33
+ # #
34
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
35
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
36
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
37
+ # details. #
38
+ # #
39
+ # You should have received a copy of the GNU Lesser General Public License #
40
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
41
+ # #
42
+ ################################################################################
43
+
44
+ from __future__ import annotations
45
+
46
+ from datetime import datetime
47
+ from typing import Any
48
+
49
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
50
+
51
+
52
+ class WorkflowStep(CompletableGithubObject):
53
+ """
54
+ This class represents steps in a Workflow Job.
55
+
56
+ The reference can be found here
57
+ https://docs.github.com/en/rest/reference/actions#workflow-jobs
58
+
59
+ The OpenAPI schema can be found at
60
+
61
+ - /components/schemas/job/properties/steps/items
62
+
63
+ """
64
+
65
+ def _initAttributes(self) -> None:
66
+ self._completed_at: Attribute[datetime] = NotSet
67
+ self._conclusion: Attribute[str] = NotSet
68
+ self._name: Attribute[str] = NotSet
69
+ self._number: Attribute[int] = NotSet
70
+ self._started_at: Attribute[datetime] = NotSet
71
+ self._status: Attribute[str] = NotSet
72
+
73
+ def __repr__(self) -> str:
74
+ return self.get__repr__({"number": self._number.value, "name": self._name.value})
75
+
76
+ @property
77
+ async def completed_at(self) -> datetime:
78
+ await self._completeIfNotSet(self._completed_at)
79
+ return self._completed_at.value
80
+
81
+ @property
82
+ async def conclusion(self) -> str:
83
+ await self._completeIfNotSet(self._conclusion)
84
+ return self._conclusion.value
85
+
86
+ @property
87
+ async def name(self) -> str:
88
+ await self._completeIfNotSet(self._name)
89
+ return self._name.value
90
+
91
+ @property
92
+ async def number(self) -> int:
93
+ await self._completeIfNotSet(self._number)
94
+ return self._number.value
95
+
96
+ @property
97
+ async def started_at(self) -> datetime:
98
+ await self._completeIfNotSet(self._started_at)
99
+ return self._started_at.value
100
+
101
+ @property
102
+ async def status(self) -> str:
103
+ await self._completeIfNotSet(self._status)
104
+ return self._status.value
105
+
106
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
107
+ if "completed_at" in attributes: # pragma no branch
108
+ self._completed_at = self._makeDatetimeAttribute(attributes["completed_at"])
109
+ if "conclusion" in attributes: # pragma no branch
110
+ self._conclusion = self._makeStringAttribute(attributes["conclusion"])
111
+ if "name" in attributes: # pragma no branch
112
+ self._name = self._makeStringAttribute(attributes["name"])
113
+ if "number" in attributes: # pragma no branch
114
+ self._number = self._makeIntAttribute(attributes["number"])
115
+ if "started_at" in attributes: # pragma no branch
116
+ self._started_at = self._makeDatetimeAttribute(attributes["started_at"])
117
+ if "status" in attributes: # pragma no branch
118
+ self._status = self._makeStringAttribute(attributes["status"])
@@ -0,0 +1,38 @@
1
+ # FILE AUTO GENERATED DO NOT TOUCH
2
+ """
3
+ Async counterparts of the github package classes.
4
+ """
5
+
6
+ import logging
7
+
8
+ from githubasyncio.MainClass import Github
9
+
10
+ logger = logging.getLogger("githubasyncio")
11
+ logger.addHandler(logging.NullHandler())
12
+ _console_debug_handler: logging.StreamHandler | None = None
13
+
14
+
15
+ def set_log_level(level: int) -> None:
16
+ """
17
+ Set the log level of the githubasyncio logger.
18
+ """
19
+ logger.setLevel(level)
20
+
21
+
22
+ def enable_console_debug_logging() -> None:
23
+ """
24
+ This function sets up a very simple logging configuration (log everything on standard error) that is useful for
25
+ troubleshooting.
26
+ """
27
+ global _console_debug_handler
28
+
29
+ if _console_debug_handler is None:
30
+ _console_debug_handler = logging.StreamHandler()
31
+ logger.addHandler(_console_debug_handler)
32
+ set_log_level(logging.DEBUG)
33
+
34
+
35
+ __all__ = [
36
+ "Github",
37
+ "enable_console_debug_logging",
38
+ ]