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,309 @@
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 Michael Stead <michael.stead@gmail.com> #
8
+ # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
9
+ # Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
10
+ # Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
11
+ # Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
12
+ # Copyright 2017 Nicolas Agustín Torres <nicolastrres@gmail.com> #
13
+ # Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
14
+ # Copyright 2018 per1234 <accounts@perglass.com> #
15
+ # Copyright 2018 sfdye <tsfdye@gmail.com> #
16
+ # Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
17
+ # Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
18
+ # Copyright 2020 Huan-Cheng Chang <changhc84@gmail.com> #
19
+ # Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
20
+ # Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
21
+ # Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
22
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
23
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
24
+ # Copyright 2023 Malik Shahzad Muzaffar <shahzad.malik.muzaffar@cern.ch> #
25
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
26
+ # Copyright 2024 Arash Kadkhodaei <arash77.kad@gmail.com> #
27
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
28
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
29
+ # Copyright 2025 Aidan McNay <acm289@cornell.edu> #
30
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
31
+ # Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
32
+ # #
33
+ # This file is part of PyGithub. #
34
+ # http://pygithub.readthedocs.io/ #
35
+ # #
36
+ # PyGithub is free software: you can redistribute it and/or modify it under #
37
+ # the terms of the GNU Lesser General Public License as published by the Free #
38
+ # Software Foundation, either version 3 of the License, or (at your option) #
39
+ # any later version. #
40
+ # #
41
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
42
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
43
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
44
+ # details. #
45
+ # #
46
+ # You should have received a copy of the GNU Lesser General Public License #
47
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
48
+ # #
49
+ ################################################################################
50
+
51
+ from __future__ import annotations
52
+
53
+ from datetime import datetime
54
+ from typing import TYPE_CHECKING, Any
55
+
56
+ import githubasyncio.GithubApp
57
+ import githubasyncio.GithubObject
58
+ import githubasyncio.NamedUser
59
+ import githubasyncio.Organization
60
+ import githubasyncio.Reaction
61
+ from githubasyncio import Consts
62
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
63
+ from githubasyncio.PaginatedList import PaginatedList
64
+
65
+ if TYPE_CHECKING:
66
+ from githubasyncio.GithubApp import GithubApp
67
+ from githubasyncio.NamedUser import NamedUser
68
+ from githubasyncio.Organization import Organization
69
+ from githubasyncio.Reaction import Reaction
70
+
71
+
72
+ class IssueComment(CompletableGithubObject):
73
+ """
74
+ This class represents IssueComments.
75
+
76
+ The reference can be found here
77
+ https://docs.github.com/en/rest/reference/issues#comments
78
+
79
+ The OpenAPI schema can be found at
80
+
81
+ - /components/schemas/issue-comment
82
+
83
+ """
84
+
85
+ def _initAttributes(self) -> None:
86
+ self._author_association: Attribute[str] = NotSet
87
+ self._body: Attribute[str] = NotSet
88
+ self._body_html: Attribute[str] = NotSet
89
+ self._body_text: Attribute[str] = NotSet
90
+ self._created_at: Attribute[datetime] = NotSet
91
+ self._html_url: Attribute[str] = NotSet
92
+ self._id: Attribute[int] = NotSet
93
+ self._issue_url: Attribute[str] = NotSet
94
+ self._node_id: Attribute[str] = NotSet
95
+ self._performed_via_github_app: Attribute[GithubApp] = NotSet
96
+ self._reactions: Attribute[dict] = NotSet
97
+ self._updated_at: Attribute[datetime] = NotSet
98
+ self._url: Attribute[str] = NotSet
99
+ self._user: Attribute[NamedUser | Organization] = NotSet
100
+
101
+ def __repr__(self) -> str:
102
+ return self.get__repr__({"id": self._id.value, "user": self._user.value})
103
+
104
+ @property
105
+ async def author_association(self) -> str:
106
+ await self._completeIfNotSet(self._author_association)
107
+ return self._author_association.value
108
+
109
+ @property
110
+ async def body(self) -> str:
111
+ await self._completeIfNotSet(self._body)
112
+ return self._body.value
113
+
114
+ @property
115
+ async def body_html(self) -> str:
116
+ await self._completeIfNotSet(self._body_html)
117
+ return self._body_html.value
118
+
119
+ @property
120
+ async def body_text(self) -> str:
121
+ await self._completeIfNotSet(self._body_text)
122
+ return self._body_text.value
123
+
124
+ @property
125
+ async def created_at(self) -> datetime:
126
+ await self._completeIfNotSet(self._created_at)
127
+ return self._created_at.value
128
+
129
+ @property
130
+ async def html_url(self) -> str:
131
+ await self._completeIfNotSet(self._html_url)
132
+ return self._html_url.value
133
+
134
+ @property
135
+ async def id(self) -> int:
136
+ await self._completeIfNotSet(self._id)
137
+ return self._id.value
138
+
139
+ @property
140
+ async def issue_url(self) -> str:
141
+ await self._completeIfNotSet(self._issue_url)
142
+ return self._issue_url.value
143
+
144
+ @property
145
+ async def node_id(self) -> str:
146
+ await self._completeIfNotSet(self._node_id)
147
+ return self._node_id.value
148
+
149
+ @property
150
+ async def performed_via_github_app(self) -> GithubApp:
151
+ await self._completeIfNotSet(self._performed_via_github_app)
152
+ return self._performed_via_github_app.value
153
+
154
+ @property
155
+ async def reactions(self) -> dict:
156
+ await self._completeIfNotSet(self._reactions)
157
+ return self._reactions.value
158
+
159
+ @property
160
+ async def updated_at(self) -> datetime:
161
+ await self._completeIfNotSet(self._updated_at)
162
+ return self._updated_at.value
163
+
164
+ @property
165
+ async def url(self) -> str:
166
+ await self._completeIfNotSet(self._url)
167
+ return self._url.value
168
+
169
+ @property
170
+ async def user(self) -> NamedUser | Organization:
171
+ await self._completeIfNotSet(self._user)
172
+ return self._user.value
173
+
174
+ async def delete(self) -> None:
175
+ """
176
+ :calls: `DELETE /repos/{owner}/{repo}/issues/comments/{comment_id} <https://docs.github.com/en/rest/reference/issues#comments>`_
177
+ """
178
+ headers, data = await self._requester.requestJsonAndCheck("DELETE", await self.url)
179
+
180
+ async def edit(self, body: str) -> None:
181
+ """
182
+ :calls: `PATCH /repos/{owner}/{repo}/issues/comments/{comment_id} <https://docs.github.com/en/rest/reference/issues#comments>`_
183
+ """
184
+ assert isinstance(body, str), body
185
+ post_parameters = {
186
+ "body": body,
187
+ }
188
+ headers, data = await self._requester.requestJsonAndCheck("PATCH", await self.url, input=post_parameters)
189
+ self._useAttributes(data)
190
+ self._set_complete()
191
+
192
+ async def get_reactions(self) -> PaginatedList[Reaction]:
193
+ """
194
+ :calls: `GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
195
+ <https://docs.github.com/en/rest/reference/reactions#list-reactions-for-an-issue-comment>`_
196
+ """
197
+ return PaginatedList(
198
+ githubasyncio.Reaction.Reaction,
199
+ self._requester,
200
+ f"{await self.url}/reactions",
201
+ None,
202
+ headers={"Accept": Consts.mediaTypeReactionsPreview},
203
+ )
204
+
205
+ async def create_reaction(self, reaction_type: str) -> Reaction:
206
+ """
207
+ :calls: `POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions
208
+ <https://docs.github.com/en/rest/reference/reactions#create-reaction-for-an-issue-comment>`_
209
+ """
210
+ assert isinstance(reaction_type, str), reaction_type
211
+ post_parameters = {
212
+ "content": reaction_type,
213
+ }
214
+ headers, data = await self._requester.requestJsonAndCheck(
215
+ "POST",
216
+ f"{await self.url}/reactions",
217
+ input=post_parameters,
218
+ headers={"Accept": Consts.mediaTypeReactionsPreview},
219
+ )
220
+ return githubasyncio.Reaction.Reaction(self._requester, headers, data)
221
+
222
+ async def delete_reaction(self, reaction_id: int) -> bool:
223
+ """
224
+ :calls: `DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}
225
+ <https://docs.github.com/en/rest/reference/reactions#delete-an-issue-comment-reaction>`_
226
+ """
227
+ assert isinstance(reaction_id, int), reaction_id
228
+ status, _, _ = await self._requester.requestJson(
229
+ "DELETE",
230
+ f"{await self.url}/reactions/{reaction_id}",
231
+ headers={"Accept": Consts.mediaTypeReactionsPreview},
232
+ )
233
+ return status == 204
234
+
235
+ async def minimize(self, reason: str = "OUTDATED") -> bool:
236
+ """
237
+ :calls: `POST /graphql <https://docs.github.com/en/graphql>`__ with a mutation to minimize comment
238
+ <https://docs.github.com/en/graphql/reference/mutations#minimizecomment>
239
+ :graphql: `mutation minimizeComment <https://docs.github.com/en/graphql/reference/issues#mutation-minimizecomment>`_
240
+ """
241
+ assert isinstance(reason, str), reason
242
+ variables = {
243
+ "subjectId": await self.node_id,
244
+ "classifier": reason,
245
+ }
246
+ _, data = await self._requester.graphql_named_mutation(
247
+ mutation_name="minimizeComment",
248
+ mutation_input=NotSet.remove_unset_items(variables),
249
+ output_schema="minimizedComment { isMinimized }",
250
+ )
251
+ return data["minimizedComment"]["isMinimized"] is True
252
+
253
+ async def unminimize(self) -> bool:
254
+ """
255
+ :calls: `POST /graphql <https://docs.github.com/en/graphql>`__ with a mutation to unminimize comment
256
+ <https://docs.github.com/en/graphql/reference/mutations#unminimizecomment>
257
+ :graphql: `mutation unminimizeComment <https://docs.github.com/en/graphql/reference/issues#mutation-unminimizecomment>`_
258
+ """
259
+ variables = {
260
+ "subjectId": await self.node_id,
261
+ }
262
+ _, data = await self._requester.graphql_named_mutation(
263
+ mutation_name="unminimizeComment",
264
+ mutation_input=NotSet.remove_unset_items(variables),
265
+ output_schema="unminimizedComment { isMinimized }",
266
+ )
267
+ return data["unminimizedComment"]["isMinimized"] is False
268
+
269
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
270
+ if "author_association" in attributes: # pragma no branch
271
+ self._author_association = self._makeStringAttribute(attributes["author_association"])
272
+ if "body" in attributes: # pragma no branch
273
+ self._body = self._makeStringAttribute(attributes["body"])
274
+ if "body_html" in attributes: # pragma no branch
275
+ self._body_html = self._makeStringAttribute(attributes["body_html"])
276
+ if "body_text" in attributes: # pragma no branch
277
+ self._body_text = self._makeStringAttribute(attributes["body_text"])
278
+ if "created_at" in attributes: # pragma no branch
279
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
280
+ if "html_url" in attributes: # pragma no branch
281
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
282
+ if "id" in attributes: # pragma no branch
283
+ self._id = self._makeIntAttribute(attributes["id"])
284
+ elif "url" in attributes and attributes["url"]:
285
+ id = attributes["url"].split("/")[-1]
286
+ if id.isnumeric():
287
+ self._id = self._makeIntAttribute(int(id))
288
+ if "issue_url" in attributes: # pragma no branch
289
+ self._issue_url = self._makeStringAttribute(attributes["issue_url"])
290
+ if "node_id" in attributes: # pragma no branch
291
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
292
+ if "performed_via_github_app" in attributes: # pragma no branch
293
+ self._performed_via_github_app = self._makeClassAttribute(
294
+ githubasyncio.GithubApp.GithubApp, attributes["performed_via_github_app"]
295
+ )
296
+ if "reactions" in attributes:
297
+ self._reactions = self._makeDictAttribute(attributes["reactions"])
298
+ if "updated_at" in attributes: # pragma no branch
299
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
300
+ if "url" in attributes: # pragma no branch
301
+ self._url = self._makeStringAttribute(attributes["url"])
302
+ if "user" in attributes: # pragma no branch
303
+ self._user = self._makeUnionClassAttributeFromTypeKey(
304
+ "type",
305
+ "User",
306
+ attributes["user"],
307
+ (githubasyncio.NamedUser.NamedUser, "User"),
308
+ (githubasyncio.Organization.Organization, "Organization"),
309
+ )
@@ -0,0 +1,77 @@
1
+ # FILE AUTO GENERATED DO NOT TOUCH
2
+ ############################ Copyrights and license ############################
3
+ # #
4
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
5
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
6
+ # Copyright 2024 Thomas Cooper <coopernetes@proton.me> #
7
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
8
+ # #
9
+ # This file is part of PyGithub. #
10
+ # http://pygithub.readthedocs.io/ #
11
+ # #
12
+ # PyGithub is free software: you can redistribute it and/or modify it under #
13
+ # the terms of the GNU Lesser General Public License as published by the Free #
14
+ # Software Foundation, either version 3 of the License, or (at your option) #
15
+ # any later version. #
16
+ # #
17
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
18
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
19
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
20
+ # details. #
21
+ # #
22
+ # You should have received a copy of the GNU Lesser General Public License #
23
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
24
+ # #
25
+ ################################################################################
26
+
27
+ from __future__ import annotations
28
+
29
+ from typing import Any
30
+
31
+ from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
32
+
33
+
34
+ class IssueDependenciesSummary(NonCompletableGithubObject):
35
+ """
36
+ This class represents IssueDependenciesSummary.
37
+
38
+ The reference can be found here
39
+ https://docs.github.com/en/rest/issues/issues
40
+
41
+ The OpenAPI schema can be found at
42
+
43
+ - /components/schemas/issue-dependencies-summary
44
+
45
+ """
46
+
47
+ def _initAttributes(self) -> None:
48
+ self._blocked_by: Attribute[int] = NotSet
49
+ self._blocking: Attribute[int] = NotSet
50
+ self._total_blocked_by: Attribute[int] = NotSet
51
+ self._total_blocking: Attribute[int] = NotSet
52
+
53
+ @property
54
+ def blocked_by(self) -> int:
55
+ return self._blocked_by.value
56
+
57
+ @property
58
+ def blocking(self) -> int:
59
+ return self._blocking.value
60
+
61
+ @property
62
+ def total_blocked_by(self) -> int:
63
+ return self._total_blocked_by.value
64
+
65
+ @property
66
+ def total_blocking(self) -> int:
67
+ return self._total_blocking.value
68
+
69
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
70
+ if "blocked_by" in attributes: # pragma no branch
71
+ self._blocked_by = self._makeIntAttribute(attributes["blocked_by"])
72
+ if "blocking" in attributes: # pragma no branch
73
+ self._blocking = self._makeIntAttribute(attributes["blocking"])
74
+ if "total_blocked_by" in attributes: # pragma no branch
75
+ self._total_blocked_by = self._makeIntAttribute(attributes["total_blocked_by"])
76
+ if "total_blocking" in attributes: # pragma no branch
77
+ self._total_blocking = self._makeIntAttribute(attributes["total_blocking"])
@@ -0,0 +1,296 @@
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 2017 Simon <spam@esemi.ru> #
12
+ # Copyright 2018 Aaron L. Levine <allevin@sandia.gov> #
13
+ # Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
14
+ # Copyright 2018 sfdye <tsfdye@gmail.com> #
15
+ # Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
16
+ # Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
17
+ # Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
18
+ # Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
19
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
20
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
21
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
22
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
23
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
24
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
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 TYPE_CHECKING, Any
48
+
49
+ import githubasyncio.GithubApp
50
+ import githubasyncio.GithubObject
51
+ import githubasyncio.Issue
52
+ import githubasyncio.Label
53
+ import githubasyncio.Milestone
54
+ import githubasyncio.NamedUser
55
+ import githubasyncio.Organization
56
+ import githubasyncio.Team
57
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
58
+
59
+ if TYPE_CHECKING:
60
+ from githubasyncio.GithubApp import GithubApp
61
+ from githubasyncio.Issue import Issue
62
+ from githubasyncio.Label import Label
63
+ from githubasyncio.Milestone import Milestone
64
+ from githubasyncio.NamedUser import NamedUser
65
+ from githubasyncio.Organization import Organization
66
+ from githubasyncio.Team import Team
67
+
68
+
69
+ class IssueEvent(CompletableGithubObject):
70
+ """
71
+ This class represents IssueEvents.
72
+
73
+ The reference can be found here
74
+ https://docs.github.com/en/rest/reference/issues#events
75
+
76
+ The OpenAPI schema can be found at
77
+
78
+ - /components/schemas/issue-event
79
+ - /components/schemas/issue-event-for-issue
80
+
81
+ """
82
+
83
+ def _initAttributes(self) -> None:
84
+ self._actor: Attribute[NamedUser | Organization] = NotSet
85
+ self._assignee: Attribute[NamedUser | Organization] = NotSet
86
+ self._assigner: Attribute[NamedUser | Organization] = NotSet
87
+ self._author_association: Attribute[dict[str, Any]] = NotSet
88
+ self._commit_id: Attribute[str] = NotSet
89
+ self._commit_url: Attribute[str] = NotSet
90
+ self._created_at: Attribute[datetime] = NotSet
91
+ self._dismissed_review: Attribute[dict] = NotSet
92
+ self._event: Attribute[str] = NotSet
93
+ self._id: Attribute[int] = NotSet
94
+ self._issue: Attribute[Issue] = NotSet
95
+ self._label: Attribute[Label] = NotSet
96
+ self._lock_reason: Attribute[str] = NotSet
97
+ self._milestone: Attribute[Milestone] = NotSet
98
+ self._node_id: Attribute[str] = NotSet
99
+ self._performed_via_github_app: Attribute[GithubApp] = NotSet
100
+ self._project_card: Attribute[dict[str, Any]] = NotSet
101
+ self._rename: Attribute[dict] = NotSet
102
+ self._requested_reviewer: Attribute[NamedUser | Organization] = NotSet
103
+ self._requested_team: Attribute[Team] = NotSet
104
+ self._review_requester: Attribute[NamedUser | Organization] = NotSet
105
+ self._url: Attribute[str] = NotSet
106
+
107
+ def __repr__(self) -> str:
108
+ return self.get__repr__({"id": self._id.value})
109
+
110
+ @property
111
+ async def actor(self) -> NamedUser | Organization:
112
+ await self._completeIfNotSet(self._actor)
113
+ return self._actor.value
114
+
115
+ @property
116
+ async def assignee(self) -> NamedUser | Organization:
117
+ await self._completeIfNotSet(self._assignee)
118
+ return self._assignee.value
119
+
120
+ @property
121
+ async def assigner(self) -> NamedUser | Organization:
122
+ await self._completeIfNotSet(self._assigner)
123
+ return self._assigner.value
124
+
125
+ @property
126
+ async def author_association(self) -> dict[str, Any]:
127
+ await self._completeIfNotSet(self._author_association)
128
+ return self._author_association.value
129
+
130
+ @property
131
+ async def commit_id(self) -> str:
132
+ await self._completeIfNotSet(self._commit_id)
133
+ return self._commit_id.value
134
+
135
+ @property
136
+ async def commit_url(self) -> str:
137
+ await self._completeIfNotSet(self._commit_url)
138
+ return self._commit_url.value
139
+
140
+ @property
141
+ async def created_at(self) -> datetime:
142
+ await self._completeIfNotSet(self._created_at)
143
+ return self._created_at.value
144
+
145
+ @property
146
+ async def dismissed_review(self) -> dict:
147
+ await self._completeIfNotSet(self._dismissed_review)
148
+ return self._dismissed_review.value
149
+
150
+ @property
151
+ async def event(self) -> str:
152
+ await self._completeIfNotSet(self._event)
153
+ return self._event.value
154
+
155
+ @property
156
+ async def id(self) -> int:
157
+ await self._completeIfNotSet(self._id)
158
+ return self._id.value
159
+
160
+ @property
161
+ async def issue(self) -> Issue:
162
+ await self._completeIfNotSet(self._issue)
163
+ return self._issue.value
164
+
165
+ @property
166
+ async def label(self) -> Label:
167
+ await self._completeIfNotSet(self._label)
168
+ return self._label.value
169
+
170
+ @property
171
+ async def lock_reason(self) -> str:
172
+ await self._completeIfNotSet(self._lock_reason)
173
+ return self._lock_reason.value
174
+
175
+ @property
176
+ async def milestone(self) -> Milestone:
177
+ await self._completeIfNotSet(self._milestone)
178
+ return self._milestone.value
179
+
180
+ @property
181
+ async def node_id(self) -> str:
182
+ await self._completeIfNotSet(self._node_id)
183
+ return self._node_id.value
184
+
185
+ @property
186
+ async def performed_via_github_app(self) -> GithubApp:
187
+ await self._completeIfNotSet(self._performed_via_github_app)
188
+ return self._performed_via_github_app.value
189
+
190
+ @property
191
+ async def project_card(self) -> dict[str, Any]:
192
+ await self._completeIfNotSet(self._project_card)
193
+ return self._project_card.value
194
+
195
+ @property
196
+ async def rename(self) -> dict:
197
+ await self._completeIfNotSet(self._rename)
198
+ return self._rename.value
199
+
200
+ @property
201
+ async def requested_reviewer(self) -> NamedUser | Organization:
202
+ await self._completeIfNotSet(self._requested_reviewer)
203
+ return self._requested_reviewer.value
204
+
205
+ @property
206
+ async def requested_team(self) -> Team:
207
+ await self._completeIfNotSet(self._requested_team)
208
+ return self._requested_team.value
209
+
210
+ @property
211
+ async def review_requester(self) -> NamedUser | Organization:
212
+ await self._completeIfNotSet(self._review_requester)
213
+ return self._review_requester.value
214
+
215
+ @property
216
+ async def url(self) -> str:
217
+ await self._completeIfNotSet(self._url)
218
+ return self._url.value
219
+
220
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
221
+ if "actor" in attributes: # pragma no branch
222
+ self._actor = self._makeUnionClassAttributeFromTypeKey(
223
+ "type",
224
+ "User",
225
+ attributes["actor"],
226
+ (githubasyncio.NamedUser.NamedUser, "User"),
227
+ (githubasyncio.Organization.Organization, "Organization"),
228
+ )
229
+ if "assignee" in attributes: # pragma no branch
230
+ self._assignee = self._makeUnionClassAttributeFromTypeKey(
231
+ "type",
232
+ "User",
233
+ attributes["assignee"],
234
+ (githubasyncio.NamedUser.NamedUser, "User"),
235
+ (githubasyncio.Organization.Organization, "Organization"),
236
+ )
237
+ if "assigner" in attributes: # pragma no branch
238
+ self._assigner = self._makeUnionClassAttributeFromTypeKey(
239
+ "type",
240
+ "User",
241
+ attributes["assigner"],
242
+ (githubasyncio.NamedUser.NamedUser, "User"),
243
+ (githubasyncio.Organization.Organization, "Organization"),
244
+ )
245
+ if "author_association" in attributes: # pragma no branch
246
+ self._author_association = self._makeDictAttribute(attributes["author_association"])
247
+ if "commit_id" in attributes: # pragma no branch
248
+ self._commit_id = self._makeStringAttribute(attributes["commit_id"])
249
+ if "commit_url" in attributes: # pragma no branch
250
+ self._commit_url = self._makeStringAttribute(attributes["commit_url"])
251
+ if "created_at" in attributes: # pragma no branch
252
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
253
+ if "dismissed_review" in attributes: # pragma no branch
254
+ self._dismissed_review = self._makeDictAttribute(attributes["dismissed_review"])
255
+ if "event" in attributes: # pragma no branch
256
+ self._event = self._makeStringAttribute(attributes["event"])
257
+ if "id" in attributes: # pragma no branch
258
+ self._id = self._makeIntAttribute(attributes["id"])
259
+ if "issue" in attributes: # pragma no branch
260
+ self._issue = self._makeClassAttribute(githubasyncio.Issue.Issue, attributes["issue"])
261
+ if "label" in attributes: # pragma no branch
262
+ self._label = self._makeClassAttribute(githubasyncio.Label.Label, attributes["label"])
263
+ if "lock_reason" in attributes: # pragma no branch
264
+ self._lock_reason = self._makeStringAttribute(attributes["lock_reason"])
265
+ if "milestone" in attributes: # pragma no branch
266
+ self._milestone = self._makeClassAttribute(githubasyncio.Milestone.Milestone, attributes["milestone"])
267
+ if "node_id" in attributes: # pragma no branch
268
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
269
+ if "performed_via_github_app" in attributes: # pragma no branch
270
+ self._performed_via_github_app = self._makeClassAttribute(
271
+ githubasyncio.GithubApp.GithubApp, attributes["performed_via_github_app"]
272
+ )
273
+ if "project_card" in attributes: # pragma no branch
274
+ self._project_card = self._makeDictAttribute(attributes["project_card"])
275
+ if "rename" in attributes: # pragma no branch
276
+ self._rename = self._makeDictAttribute(attributes["rename"])
277
+ if "requested_reviewer" in attributes: # pragma no branch
278
+ self._requested_reviewer = self._makeUnionClassAttributeFromTypeKey(
279
+ "type",
280
+ "User",
281
+ attributes["requested_reviewer"],
282
+ (githubasyncio.NamedUser.NamedUser, "User"),
283
+ (githubasyncio.Organization.Organization, "Organization"),
284
+ )
285
+ if "requested_team" in attributes: # pragma no branch
286
+ self._requested_team = self._makeClassAttribute(githubasyncio.Team.Team, attributes["requested_team"])
287
+ if "review_requester" in attributes: # pragma no branch
288
+ self._review_requester = self._makeUnionClassAttributeFromTypeKey(
289
+ "type",
290
+ "User",
291
+ attributes["review_requester"],
292
+ (githubasyncio.NamedUser.NamedUser, "User"),
293
+ (githubasyncio.Organization.Organization, "Organization"),
294
+ )
295
+ if "url" in attributes: # pragma no branch
296
+ self._url = self._makeStringAttribute(attributes["url"])