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,245 @@
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 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
10
+ # Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
11
+ # Copyright 2018 sfdye <tsfdye@gmail.com> #
12
+ # Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
13
+ # Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
14
+ # Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
15
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
16
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
17
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
18
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
19
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
20
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
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
45
+
46
+ import githubasyncio.CommitStats
47
+ import githubasyncio.Gist
48
+ import githubasyncio.GistFile
49
+ import githubasyncio.GithubObject
50
+ import githubasyncio.NamedUser
51
+ import githubasyncio.Organization
52
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
53
+
54
+ if TYPE_CHECKING:
55
+ from githubasyncio.CommitStats import CommitStats
56
+ from githubasyncio.Gist import Gist
57
+ from githubasyncio.GistFile import GistFile
58
+ from githubasyncio.NamedUser import NamedUser
59
+
60
+
61
+ class GistHistoryState(CompletableGithubObject):
62
+ """
63
+ This class represents GistHistoryStates.
64
+
65
+ The OpenAPI schema can be found at
66
+
67
+ - /components/schemas/gist-history
68
+
69
+ """
70
+
71
+ def _initAttributes(self) -> None:
72
+ self._change_status: Attribute[CommitStats] = NotSet
73
+ self._comments: Attribute[int] = NotSet
74
+ self._comments_url: Attribute[str] = NotSet
75
+ self._commits_url: Attribute[str] = NotSet
76
+ self._committed_at: Attribute[datetime] = NotSet
77
+ self._created_at: Attribute[datetime] = NotSet
78
+ self._description: Attribute[str] = NotSet
79
+ self._files: Attribute[dict[str, GistFile]] = NotSet
80
+ self._forks: Attribute[list[Gist]] = NotSet
81
+ self._forks_url: Attribute[str] = NotSet
82
+ self._git_pull_url: Attribute[str] = NotSet
83
+ self._git_push_url: Attribute[str] = NotSet
84
+ self._history: Attribute[list[GistHistoryState]] = NotSet
85
+ self._html_url: Attribute[str] = NotSet
86
+ self._id: Attribute[str] = NotSet
87
+ self._owner: Attribute[NamedUser] = NotSet
88
+ self._public: Attribute[bool] = NotSet
89
+ self._updated_at: Attribute[datetime] = NotSet
90
+ self._url: Attribute[str] = NotSet
91
+ self._user: Attribute[NamedUser] = NotSet
92
+ self._version: Attribute[str] = NotSet
93
+
94
+ @property
95
+ async def change_status(self) -> CommitStats:
96
+ await self._completeIfNotSet(self._change_status)
97
+ return self._change_status.value
98
+
99
+ @property
100
+ async def comments(self) -> int:
101
+ await self._completeIfNotSet(self._comments)
102
+ return self._comments.value
103
+
104
+ @property
105
+ async def comments_url(self) -> str:
106
+ await self._completeIfNotSet(self._comments_url)
107
+ return self._comments_url.value
108
+
109
+ @property
110
+ async def commits_url(self) -> str:
111
+ await self._completeIfNotSet(self._commits_url)
112
+ return self._commits_url.value
113
+
114
+ @property
115
+ async def committed_at(self) -> datetime:
116
+ await self._completeIfNotSet(self._committed_at)
117
+ return self._committed_at.value
118
+
119
+ @property
120
+ async def created_at(self) -> datetime:
121
+ await self._completeIfNotSet(self._created_at)
122
+ return self._created_at.value
123
+
124
+ @property
125
+ async def description(self) -> str:
126
+ await self._completeIfNotSet(self._description)
127
+ return self._description.value
128
+
129
+ @property
130
+ async def files(self) -> dict[str, GistFile]:
131
+ await self._completeIfNotSet(self._files)
132
+ return self._files.value
133
+
134
+ @property
135
+ async def forks(self) -> list[Gist]:
136
+ await self._completeIfNotSet(self._forks)
137
+ return self._forks.value
138
+
139
+ @property
140
+ async def forks_url(self) -> str:
141
+ await self._completeIfNotSet(self._forks_url)
142
+ return self._forks_url.value
143
+
144
+ @property
145
+ async def git_pull_url(self) -> str:
146
+ await self._completeIfNotSet(self._git_pull_url)
147
+ return self._git_pull_url.value
148
+
149
+ @property
150
+ async def git_push_url(self) -> str:
151
+ await self._completeIfNotSet(self._git_push_url)
152
+ return self._git_push_url.value
153
+
154
+ @property
155
+ async def history(self) -> list[GistHistoryState]:
156
+ await self._completeIfNotSet(self._history)
157
+ return self._history.value
158
+
159
+ @property
160
+ async def html_url(self) -> str:
161
+ await self._completeIfNotSet(self._html_url)
162
+ return self._html_url.value
163
+
164
+ @property
165
+ async def id(self) -> str:
166
+ await self._completeIfNotSet(self._id)
167
+ return self._id.value
168
+
169
+ @property
170
+ async def owner(self) -> NamedUser:
171
+ await self._completeIfNotSet(self._owner)
172
+ return self._owner.value
173
+
174
+ @property
175
+ async def public(self) -> bool:
176
+ await self._completeIfNotSet(self._public)
177
+ return self._public.value
178
+
179
+ @property
180
+ async def updated_at(self) -> datetime:
181
+ await self._completeIfNotSet(self._updated_at)
182
+ return self._updated_at.value
183
+
184
+ @property
185
+ async def url(self) -> str:
186
+ await self._completeIfNotSet(self._url)
187
+ return self._url.value
188
+
189
+ @property
190
+ async def user(self) -> NamedUser:
191
+ await self._completeIfNotSet(self._user)
192
+ return self._user.value
193
+
194
+ @property
195
+ async def version(self) -> str:
196
+ await self._completeIfNotSet(self._version)
197
+ return self._version.value
198
+
199
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
200
+ if "change_status" in attributes: # pragma no branch
201
+ self._change_status = self._makeClassAttribute(
202
+ githubasyncio.CommitStats.CommitStats, attributes["change_status"]
203
+ )
204
+ if "comments" in attributes: # pragma no branch
205
+ self._comments = self._makeIntAttribute(attributes["comments"])
206
+ if "comments_url" in attributes: # pragma no branch
207
+ self._comments_url = self._makeStringAttribute(attributes["comments_url"])
208
+ if "commits_url" in attributes: # pragma no branch
209
+ self._commits_url = self._makeStringAttribute(attributes["commits_url"])
210
+ if "committed_at" in attributes: # pragma no branch
211
+ self._committed_at = self._makeDatetimeAttribute(attributes["committed_at"])
212
+ if "created_at" in attributes: # pragma no branch
213
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
214
+ if "description" in attributes: # pragma no branch
215
+ self._description = self._makeStringAttribute(attributes["description"])
216
+ if "files" in attributes: # pragma no branch
217
+ self._files = self._makeDictOfStringsToClassesAttribute(
218
+ githubasyncio.GistFile.GistFile, attributes["files"]
219
+ )
220
+ if "forks" in attributes: # pragma no branch
221
+ self._forks = self._makeListOfClassesAttribute(githubasyncio.Gist.Gist, attributes["forks"])
222
+ if "forks_url" in attributes: # pragma no branch
223
+ self._forks_url = self._makeStringAttribute(attributes["forks_url"])
224
+ if "git_pull_url" in attributes: # pragma no branch
225
+ self._git_pull_url = self._makeStringAttribute(attributes["git_pull_url"])
226
+ if "git_push_url" in attributes: # pragma no branch
227
+ self._git_push_url = self._makeStringAttribute(attributes["git_push_url"])
228
+ if "history" in attributes: # pragma no branch
229
+ self._history = self._makeListOfClassesAttribute(GistHistoryState, attributes["history"])
230
+ if "html_url" in attributes: # pragma no branch
231
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
232
+ if "id" in attributes: # pragma no branch
233
+ self._id = self._makeStringAttribute(attributes["id"])
234
+ if "owner" in attributes: # pragma no branch
235
+ self._owner = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["owner"])
236
+ if "public" in attributes: # pragma no branch
237
+ self._public = self._makeBoolAttribute(attributes["public"])
238
+ if "updated_at" in attributes: # pragma no branch
239
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
240
+ if "url" in attributes: # pragma no branch
241
+ self._url = self._makeStringAttribute(attributes["url"])
242
+ if "user" in attributes: # pragma no branch
243
+ self._user = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["user"])
244
+ if "version" in attributes: # pragma no branch
245
+ self._version = self._makeStringAttribute(attributes["version"])
@@ -0,0 +1,94 @@
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 2023 Enrico Minack <github@enrico.minack.dev> #
17
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
18
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
19
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
20
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
21
+ # #
22
+ # This file is part of PyGithub. #
23
+ # http://pygithub.readthedocs.io/ #
24
+ # #
25
+ # PyGithub is free software: you can redistribute it and/or modify it under #
26
+ # the terms of the GNU Lesser General Public License as published by the Free #
27
+ # Software Foundation, either version 3 of the License, or (at your option) #
28
+ # any later version. #
29
+ # #
30
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
31
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
32
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
33
+ # details. #
34
+ # #
35
+ # You should have received a copy of the GNU Lesser General Public License #
36
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
37
+ # #
38
+ ################################################################################
39
+
40
+ from __future__ import annotations
41
+
42
+ from datetime import datetime
43
+ from typing import Any
44
+
45
+ from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
46
+
47
+
48
+ class GitAuthor(NonCompletableGithubObject):
49
+ """
50
+ This class represents GitAuthors.
51
+
52
+ The OpenAPI schema can be found at
53
+
54
+ - /components/schemas/commit-search-result-item/properties/commit/properties/author
55
+ - /components/schemas/file-commit/properties/commit/properties/author
56
+ - /components/schemas/file-commit/properties/commit/properties/committer
57
+ - /components/schemas/git-commit/properties/author
58
+ - /components/schemas/git-commit/properties/committer
59
+ - /components/schemas/git-tag/properties/tagger
60
+ - /components/schemas/nullable-git-user
61
+ - /components/schemas/nullable-simple-commit/properties/author
62
+ - /components/schemas/nullable-simple-commit/properties/committer
63
+ - /components/schemas/simple-commit/properties/author
64
+ - /components/schemas/simple-commit/properties/committer
65
+
66
+ """
67
+
68
+ def _initAttributes(self) -> None:
69
+ self._date: Attribute[datetime] = NotSet
70
+ self._email: Attribute[str] = NotSet
71
+ self._name: Attribute[str] = NotSet
72
+
73
+ def __repr__(self) -> str:
74
+ return self.get__repr__({"name": self._name.value})
75
+
76
+ @property
77
+ def date(self) -> datetime:
78
+ return self._date.value
79
+
80
+ @property
81
+ def email(self) -> str:
82
+ return self._email.value
83
+
84
+ @property
85
+ def name(self) -> str:
86
+ return self._name.value
87
+
88
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
89
+ if "date" in attributes: # pragma no branch
90
+ self._date = self._makeDatetimeAttribute(attributes["date"])
91
+ if "email" in attributes: # pragma no branch
92
+ self._email = self._makeStringAttribute(attributes["email"])
93
+ if "name" in attributes: # pragma no branch
94
+ self._name = self._makeStringAttribute(attributes["name"])
@@ -0,0 +1,123 @@
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 2021 Steve Kowalik <steven@wedontsleep.org> #
17
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
18
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
19
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
20
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
21
+ # Copyright 2025 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 typing import Any
44
+
45
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
46
+
47
+
48
+ class GitBlob(CompletableGithubObject):
49
+ """
50
+ This class represents GitBlobs.
51
+
52
+ The reference can be found here
53
+ https://docs.github.com/en/rest/reference/git#blobs
54
+
55
+ The OpenAPI schema can be found at
56
+
57
+ - /components/schemas/blob
58
+ - /components/schemas/short-blob
59
+
60
+ """
61
+
62
+ def _initAttributes(self) -> None:
63
+ self._content: Attribute[str] = NotSet
64
+ self._encoding: Attribute[str] = NotSet
65
+ self._highlighted_content: Attribute[str] = NotSet
66
+ self._node_id: Attribute[str] = NotSet
67
+ self._sha: Attribute[str] = NotSet
68
+ self._size: Attribute[int] = NotSet
69
+ self._url: Attribute[str] = NotSet
70
+
71
+ def __repr__(self) -> str:
72
+ return self.get__repr__({"sha": self._sha.value})
73
+
74
+ @property
75
+ async def content(self) -> str:
76
+ await self._completeIfNotSet(self._content)
77
+ return self._content.value
78
+
79
+ @property
80
+ async def encoding(self) -> str:
81
+ await self._completeIfNotSet(self._encoding)
82
+ return self._encoding.value
83
+
84
+ @property
85
+ async def highlighted_content(self) -> str:
86
+ await self._completeIfNotSet(self._highlighted_content)
87
+ return self._highlighted_content.value
88
+
89
+ @property
90
+ async def node_id(self) -> str:
91
+ await self._completeIfNotSet(self._node_id)
92
+ return self._node_id.value
93
+
94
+ @property
95
+ async def sha(self) -> str:
96
+ await self._completeIfNotSet(self._sha)
97
+ return self._sha.value
98
+
99
+ @property
100
+ async def size(self) -> int:
101
+ await self._completeIfNotSet(self._size)
102
+ return self._size.value
103
+
104
+ @property
105
+ async def url(self) -> str:
106
+ await self._completeIfNotSet(self._url)
107
+ return self._url.value
108
+
109
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
110
+ if "content" in attributes: # pragma no branch
111
+ self._content = self._makeStringAttribute(attributes["content"])
112
+ if "encoding" in attributes: # pragma no branch
113
+ self._encoding = self._makeStringAttribute(attributes["encoding"])
114
+ if "highlighted_content" in attributes: # pragma no branch
115
+ self._highlighted_content = self._makeStringAttribute(attributes["highlighted_content"])
116
+ if "node_id" in attributes: # pragma no branch
117
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
118
+ if "sha" in attributes: # pragma no branch
119
+ self._sha = self._makeStringAttribute(attributes["sha"])
120
+ if "size" in attributes: # pragma no branch
121
+ self._size = self._makeIntAttribute(attributes["size"])
122
+ if "url" in attributes: # pragma no branch
123
+ self._url = self._makeStringAttribute(attributes["url"])
@@ -0,0 +1,208 @@
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 2021 Steve Kowalik <steven@wedontsleep.org> #
17
+ # Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
18
+ # Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
19
+ # Copyright 2023 Trim21 <trim21.me@gmail.com> #
20
+ # Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
21
+ # Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
22
+ # Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
23
+ # Copyright 2025 Tim Gates <tim.gates@iress.com> #
24
+ # #
25
+ # This file is part of PyGithub. #
26
+ # http://pygithub.readthedocs.io/ #
27
+ # #
28
+ # PyGithub is free software: you can redistribute it and/or modify it under #
29
+ # the terms of the GNU Lesser General Public License as published by the Free #
30
+ # Software Foundation, either version 3 of the License, or (at your option) #
31
+ # any later version. #
32
+ # #
33
+ # PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
34
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
35
+ # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
36
+ # details. #
37
+ # #
38
+ # You should have received a copy of the GNU Lesser General Public License #
39
+ # along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
40
+ # #
41
+ ################################################################################
42
+
43
+ from __future__ import annotations
44
+
45
+ from datetime import datetime
46
+ from typing import TYPE_CHECKING, Any
47
+
48
+ import githubasyncio.GitAuthor
49
+ import githubasyncio.GitCommitVerification
50
+ import githubasyncio.GitTree
51
+ from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet, is_defined, is_undefined
52
+
53
+ if TYPE_CHECKING:
54
+ from githubasyncio.GitAuthor import GitAuthor
55
+ from githubasyncio.GitCommitVerification import GitCommitVerification
56
+ from githubasyncio.GitTree import GitTree
57
+
58
+
59
+ class GitCommit(CompletableGithubObject):
60
+ """
61
+ This class represents GitCommits.
62
+
63
+ The reference can be found here
64
+ https://docs.github.com/en/rest/reference/git#commits
65
+
66
+ The OpenAPI schema can be found at
67
+
68
+ - /components/schemas/commit-search-result-item/properties/commit
69
+ - /components/schemas/commit/properties/commit
70
+ - /components/schemas/file-commit/properties/commit
71
+ - /components/schemas/file-commit/properties/commit/properties/parents/items
72
+ - /components/schemas/git-commit
73
+ - /components/schemas/git-commit/properties/parents/items
74
+ - /components/schemas/nullable-simple-commit
75
+ - /components/schemas/simple-commit
76
+
77
+ """
78
+
79
+ def _initAttributes(self) -> None:
80
+ self._author: Attribute[GitAuthor] = NotSet
81
+ self._comment_count: Attribute[int] = NotSet
82
+ self._committer: Attribute[GitAuthor] = NotSet
83
+ self._html_url: Attribute[str] = NotSet
84
+ self._id: Attribute[str] = NotSet
85
+ self._message: Attribute[str] = NotSet
86
+ self._node_id: Attribute[str] = NotSet
87
+ self._parents: Attribute[list[GitCommit]] = NotSet
88
+ self._sha: Attribute[str] = NotSet
89
+ self._timestamp: Attribute[datetime] = NotSet
90
+ self._tree: Attribute[GitTree] = NotSet
91
+ self._tree_id: Attribute[str] = NotSet
92
+ self._url: Attribute[str] = NotSet
93
+ self._verification: Attribute[GitCommitVerification] = NotSet
94
+
95
+ def __repr__(self) -> str:
96
+ return self.get__repr__({"sha": self._sha.value})
97
+
98
+ @property
99
+ async def _identity(self) -> str:
100
+ return await self.sha
101
+
102
+ @property
103
+ async def author(self) -> GitAuthor:
104
+ await self._completeIfNotSet(self._author)
105
+ return self._author.value
106
+
107
+ @property
108
+ async def comment_count(self) -> int:
109
+ await self._completeIfNotSet(self._comment_count)
110
+ return self._comment_count.value
111
+
112
+ @property
113
+ async def committer(self) -> GitAuthor:
114
+ await self._completeIfNotSet(self._committer)
115
+ return self._committer.value
116
+
117
+ @property
118
+ async def html_url(self) -> str:
119
+ await self._completeIfNotSet(self._html_url)
120
+ return self._html_url.value
121
+
122
+ @property
123
+ async def id(self) -> str:
124
+ await self._completeIfNotSet(self._id)
125
+ return self._id.value
126
+
127
+ @property
128
+ async def message(self) -> str:
129
+ await self._completeIfNotSet(self._message)
130
+ return self._message.value
131
+
132
+ @property
133
+ async def node_id(self) -> str:
134
+ await self._completeIfNotSet(self._node_id)
135
+ return self._node_id.value
136
+
137
+ @property
138
+ async def parents(self) -> list[GitCommit]:
139
+ await self._completeIfNotSet(self._parents)
140
+ return self._parents.value
141
+
142
+ @property
143
+ async def sha(self) -> str:
144
+ # if populated from a simple-commit, id actually holds the sha
145
+ if is_undefined(self._sha) and is_defined(self._id):
146
+ return self._id.value
147
+ await self._completeIfNotSet(self._sha)
148
+ return self._sha.value
149
+
150
+ @property
151
+ async def timestamp(self) -> datetime:
152
+ await self._completeIfNotSet(self._timestamp)
153
+ return self._timestamp.value
154
+
155
+ @property
156
+ async def tree(self) -> GitTree:
157
+ # if populated from a simple-commit, tree_id holds the sha
158
+ if is_undefined(self._tree) and is_defined(self._tree_id):
159
+ return githubasyncio.GitTree.GitTree(self._requester, self._headers, {"sha": self._tree_id.value})
160
+ await self._completeIfNotSet(self._tree)
161
+ return self._tree.value
162
+
163
+ @property
164
+ async def tree_id(self) -> str:
165
+ await self._completeIfNotSet(self._tree_id)
166
+ return self._tree_id.value
167
+
168
+ @property
169
+ async def url(self) -> str:
170
+ await self._completeIfNotSet(self._url)
171
+ return self._url.value
172
+
173
+ @property
174
+ async def verification(self) -> GitCommitVerification:
175
+ await self._completeIfNotSet(self._verification)
176
+ return self._verification.value
177
+
178
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
179
+ if "author" in attributes: # pragma no branch
180
+ self._author = self._makeClassAttribute(githubasyncio.GitAuthor.GitAuthor, attributes["author"])
181
+ if "comment_count" in attributes: # pragma no branch
182
+ self._comment_count = self._makeIntAttribute(attributes["comment_count"])
183
+ if "committer" in attributes: # pragma no branch
184
+ self._committer = self._makeClassAttribute(githubasyncio.GitAuthor.GitAuthor, attributes["committer"])
185
+ if "html_url" in attributes: # pragma no branch
186
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
187
+ if "id" in attributes: # pragma no branch
188
+ self._id = self._makeStringAttribute(attributes["id"])
189
+ if "message" in attributes: # pragma no branch
190
+ self._message = self._makeStringAttribute(attributes["message"])
191
+ if "node_id" in attributes: # pragma no branch
192
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
193
+ if "parents" in attributes: # pragma no branch
194
+ self._parents = self._makeListOfClassesAttribute(GitCommit, attributes["parents"])
195
+ if "sha" in attributes: # pragma no branch
196
+ self._sha = self._makeStringAttribute(attributes["sha"])
197
+ if "timestamp" in attributes: # pragma no branch
198
+ self._timestamp = self._makeDatetimeAttribute(attributes["timestamp"])
199
+ if "tree" in attributes: # pragma no branch
200
+ self._tree = self._makeClassAttribute(githubasyncio.GitTree.GitTree, attributes["tree"])
201
+ if "tree_id" in attributes: # pragma no branch
202
+ self._tree_id = self._makeStringAttribute(attributes["tree_id"])
203
+ if "url" in attributes: # pragma no branch
204
+ self._url = self._makeStringAttribute(attributes["url"])
205
+ if "verification" in attributes: # pragma no branch
206
+ self._verification = self._makeClassAttribute(
207
+ githubasyncio.GitCommitVerification.GitCommitVerification, attributes["verification"]
208
+ )