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.
- githubasyncio/AccessToken.py +159 -0
- githubasyncio/AdvisoryBase.py +163 -0
- githubasyncio/AdvisoryCredit.py +131 -0
- githubasyncio/AdvisoryCreditDetailed.py +110 -0
- githubasyncio/AdvisoryVulnerability.py +191 -0
- githubasyncio/AdvisoryVulnerabilityPackage.py +93 -0
- githubasyncio/AppAuthentication.py +58 -0
- githubasyncio/ApplicationOAuth.py +200 -0
- githubasyncio/Artifact.py +183 -0
- githubasyncio/Auth.py +560 -0
- githubasyncio/AuthenticatedUser.py +1251 -0
- githubasyncio/Authorization.py +192 -0
- githubasyncio/AuthorizationApplication.py +73 -0
- githubasyncio/Autolink.py +104 -0
- githubasyncio/Branch.py +689 -0
- githubasyncio/BranchProtection.py +224 -0
- githubasyncio/CVSS.py +83 -0
- githubasyncio/CWE.py +75 -0
- githubasyncio/CheckRun.py +315 -0
- githubasyncio/CheckRunAnnotation.py +134 -0
- githubasyncio/CheckRunOutput.py +108 -0
- githubasyncio/CheckSuite.py +319 -0
- githubasyncio/Clones.py +97 -0
- githubasyncio/CodeScanAlert.py +215 -0
- githubasyncio/CodeScanAlertInstance.py +134 -0
- githubasyncio/CodeScanAlertInstanceLocation.py +102 -0
- githubasyncio/CodeScanRule.py +134 -0
- githubasyncio/CodeScanTool.py +94 -0
- githubasyncio/CodeSecurityConfig.py +301 -0
- githubasyncio/CodeSecurityConfigRepository.py +70 -0
- githubasyncio/Commit.py +442 -0
- githubasyncio/CommitCombinedStatus.py +126 -0
- githubasyncio/CommitComment.py +270 -0
- githubasyncio/CommitStats.py +78 -0
- githubasyncio/CommitStatus.py +169 -0
- githubasyncio/Comparison.py +219 -0
- githubasyncio/Consts.py +197 -0
- githubasyncio/ContentFile.py +304 -0
- githubasyncio/Copilot.py +97 -0
- githubasyncio/CopilotSeat.py +132 -0
- githubasyncio/DefaultCodeSecurityConfig.py +93 -0
- githubasyncio/DependabotAlert.py +184 -0
- githubasyncio/DependabotAlertAdvisory.py +82 -0
- githubasyncio/DependabotAlertDependency.py +100 -0
- githubasyncio/DependabotAlertVulnerability.py +85 -0
- githubasyncio/Deployment.py +314 -0
- githubasyncio/DeploymentBranchPolicy.py +102 -0
- githubasyncio/DeploymentStatus.py +201 -0
- githubasyncio/DiscussionBase.py +140 -0
- githubasyncio/DiscussionCommentBase.py +140 -0
- githubasyncio/Download.py +256 -0
- githubasyncio/Enterprise.py +175 -0
- githubasyncio/EnterpriseConsumedLicenses.py +138 -0
- githubasyncio/Environment.py +354 -0
- githubasyncio/EnvironmentDeploymentBranchPolicy.py +87 -0
- githubasyncio/EnvironmentProtectionRule.py +117 -0
- githubasyncio/EnvironmentProtectionRuleReviewer.py +110 -0
- githubasyncio/Event.py +134 -0
- githubasyncio/File.py +142 -0
- githubasyncio/GeneratedReleaseNotes.py +68 -0
- githubasyncio/Gist.py +373 -0
- githubasyncio/GistComment.py +162 -0
- githubasyncio/GistFile.py +106 -0
- githubasyncio/GistHistoryState.py +245 -0
- githubasyncio/GitAuthor.py +94 -0
- githubasyncio/GitBlob.py +123 -0
- githubasyncio/GitCommit.py +208 -0
- githubasyncio/GitCommitVerification.py +103 -0
- githubasyncio/GitObject.py +84 -0
- githubasyncio/GitRef.py +122 -0
- githubasyncio/GitRelease.py +476 -0
- githubasyncio/GitReleaseAsset.py +232 -0
- githubasyncio/GitTag.py +143 -0
- githubasyncio/GitTree.py +113 -0
- githubasyncio/GitTreeElement.py +104 -0
- githubasyncio/GithubApp.py +236 -0
- githubasyncio/GithubException.py +226 -0
- githubasyncio/GithubIntegration.py +365 -0
- githubasyncio/GithubObject.py +910 -0
- githubasyncio/GithubRetry.py +253 -0
- githubasyncio/GitignoreTemplate.py +88 -0
- githubasyncio/GlobalAdvisory.py +141 -0
- githubasyncio/Hook.py +238 -0
- githubasyncio/HookDelivery.py +243 -0
- githubasyncio/HookDescription.py +85 -0
- githubasyncio/HookResponse.py +83 -0
- githubasyncio/InputFileContent.py +63 -0
- githubasyncio/InputGitAuthor.py +71 -0
- githubasyncio/InputGitTreeElement.py +79 -0
- githubasyncio/Installation.py +298 -0
- githubasyncio/InstallationAuthorization.py +138 -0
- githubasyncio/Invitation.py +171 -0
- githubasyncio/Issue.py +955 -0
- githubasyncio/IssueComment.py +309 -0
- githubasyncio/IssueDependenciesSummary.py +77 -0
- githubasyncio/IssueEvent.py +296 -0
- githubasyncio/IssuePullRequest.py +97 -0
- githubasyncio/IssueType.py +123 -0
- githubasyncio/Label.py +186 -0
- githubasyncio/License.py +169 -0
- githubasyncio/MainClass.py +1142 -0
- githubasyncio/Membership.py +154 -0
- githubasyncio/MergedUpstream.py +71 -0
- githubasyncio/Migration.py +281 -0
- githubasyncio/Milestone.py +255 -0
- githubasyncio/NamedEnterpriseUser.py +207 -0
- githubasyncio/NamedUser.py +841 -0
- githubasyncio/Notification.py +182 -0
- githubasyncio/NotificationSubject.py +96 -0
- githubasyncio/Organization.py +2462 -0
- githubasyncio/OrganizationCodeScanAlert.py +65 -0
- githubasyncio/OrganizationCustomProperty.py +215 -0
- githubasyncio/OrganizationDependabotAlert.py +75 -0
- githubasyncio/OrganizationSecret.py +191 -0
- githubasyncio/OrganizationSecretScanAlert.py +112 -0
- githubasyncio/OrganizationVariable.py +141 -0
- githubasyncio/PaginatedList.py +652 -0
- githubasyncio/Path.py +102 -0
- githubasyncio/Permissions.py +113 -0
- githubasyncio/Plan.py +108 -0
- githubasyncio/Project.py +286 -0
- githubasyncio/ProjectCard.py +257 -0
- githubasyncio/ProjectColumn.py +227 -0
- githubasyncio/PublicKey.py +138 -0
- githubasyncio/PullRequest.py +1202 -0
- githubasyncio/PullRequestComment.py +401 -0
- githubasyncio/PullRequestMergeStatus.py +89 -0
- githubasyncio/PullRequestPart.py +110 -0
- githubasyncio/PullRequestReview.py +214 -0
- githubasyncio/Rate.py +123 -0
- githubasyncio/RateLimit.py +210 -0
- githubasyncio/RateLimitOverview.py +104 -0
- githubasyncio/Reaction.py +128 -0
- githubasyncio/Referrer.py +94 -0
- githubasyncio/RepoCodeSecurityConfig.py +93 -0
- githubasyncio/Repository.py +5211 -0
- githubasyncio/RepositoryAdvisory.py +431 -0
- githubasyncio/RepositoryDiscussion.py +221 -0
- githubasyncio/RepositoryDiscussionCategory.py +150 -0
- githubasyncio/RepositoryDiscussionComment.py +159 -0
- githubasyncio/RepositoryKey.py +166 -0
- githubasyncio/RepositoryPreferences.py +82 -0
- githubasyncio/RepositoryRulesetBypassActor.py +75 -0
- githubasyncio/Requester.py +1518 -0
- githubasyncio/RequiredPullRequestReviews.py +269 -0
- githubasyncio/RequiredStatusChecks.py +153 -0
- githubasyncio/Rule.py +134 -0
- githubasyncio/Ruleset.py +292 -0
- githubasyncio/Secret.py +139 -0
- githubasyncio/SecretScanAlert.py +317 -0
- githubasyncio/SecretScanAlertInstance.py +128 -0
- githubasyncio/SecurityAndAnalysis.py +188 -0
- githubasyncio/SecurityAndAnalysisFeature.py +79 -0
- githubasyncio/SelfHostedActionsRunner.py +129 -0
- githubasyncio/SelfHostedActionsRunnerApplication.py +92 -0
- githubasyncio/SelfHostedActionsRunnerJitConfig.py +74 -0
- githubasyncio/SelfHostedActionsRunnerToken.py +118 -0
- githubasyncio/SourceImport.py +260 -0
- githubasyncio/Stargazer.py +88 -0
- githubasyncio/StatsCodeFrequency.py +81 -0
- githubasyncio/StatsCommitActivity.py +86 -0
- githubasyncio/StatsContributor.py +138 -0
- githubasyncio/StatsParticipation.py +78 -0
- githubasyncio/StatsPunchCard.py +76 -0
- githubasyncio/SubIssueSummary.py +70 -0
- githubasyncio/Tag.py +108 -0
- githubasyncio/Team.py +618 -0
- githubasyncio/TeamDiscussion.py +137 -0
- githubasyncio/TimelineEvent.py +164 -0
- githubasyncio/TimelineEventSource.py +81 -0
- githubasyncio/Topic.py +177 -0
- githubasyncio/Traffic.py +95 -0
- githubasyncio/UserKey.py +141 -0
- githubasyncio/Variable.py +155 -0
- githubasyncio/View.py +97 -0
- githubasyncio/Workflow.py +335 -0
- githubasyncio/WorkflowJob.py +253 -0
- githubasyncio/WorkflowRun.py +480 -0
- githubasyncio/WorkflowStep.py +118 -0
- githubasyncio/__init__.py +38 -0
- githubasyncio/compat/__init__.py +52 -0
- githubasyncio/requestlib/__init__.py +29 -0
- pygithub_asyncio-3.0.0b1.dist-info/METADATA +102 -0
- pygithub_asyncio-3.0.0b1.dist-info/RECORD +188 -0
- pygithub_asyncio-3.0.0b1.dist-info/WHEEL +5 -0
- pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING +674 -0
- pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING.LESSER +165 -0
- pygithub_asyncio-3.0.0b1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,401 @@
|
|
|
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 2013 martinqt <m.ki2@laposte.net> #
|
|
10
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
11
|
+
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
|
|
12
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
13
|
+
# Copyright 2017 Nicolas Agustín Torres <nicolastrres@gmail.com> #
|
|
14
|
+
# Copyright 2018 Jess Morgan <979404+JessMorgan@users.noreply.github.com> #
|
|
15
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
16
|
+
# Copyright 2018 per1234 <accounts@perglass.com> #
|
|
17
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
18
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
19
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
20
|
+
# Copyright 2020 Huan-Cheng Chang <changhc84@gmail.com> #
|
|
21
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
22
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
23
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
24
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
25
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
26
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
27
|
+
# Copyright 2024 Den Stroebel <stroebs@users.noreply.github.com> #
|
|
28
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
29
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
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.GithubObject
|
|
57
|
+
import githubasyncio.NamedUser
|
|
58
|
+
import githubasyncio.Organization
|
|
59
|
+
import githubasyncio.Reaction
|
|
60
|
+
from githubasyncio import Consts
|
|
61
|
+
from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
|
|
62
|
+
from githubasyncio.PaginatedList import PaginatedList
|
|
63
|
+
|
|
64
|
+
if TYPE_CHECKING:
|
|
65
|
+
from githubasyncio.NamedUser import NamedUser
|
|
66
|
+
from githubasyncio.Reaction import Reaction
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class PullRequestComment(CompletableGithubObject):
|
|
70
|
+
"""
|
|
71
|
+
This class represents PullRequestComments.
|
|
72
|
+
|
|
73
|
+
The reference can be found here
|
|
74
|
+
https://docs.github.com/en/rest/reference/pulls#review-comments
|
|
75
|
+
|
|
76
|
+
The OpenAPI schema can be found at
|
|
77
|
+
|
|
78
|
+
- /components/schemas/pull-request-review-comment
|
|
79
|
+
- /components/schemas/review-comment
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
def _initAttributes(self) -> None:
|
|
84
|
+
self.__links: Attribute[dict[str, Any]] = NotSet
|
|
85
|
+
self._author_association: Attribute[str] = NotSet
|
|
86
|
+
self._body: Attribute[str] = NotSet
|
|
87
|
+
self._body_html: Attribute[str] = NotSet
|
|
88
|
+
self._body_text: Attribute[str] = NotSet
|
|
89
|
+
self._commit_id: Attribute[str] = NotSet
|
|
90
|
+
self._created_at: Attribute[datetime] = NotSet
|
|
91
|
+
self._diff_hunk: Attribute[str] = NotSet
|
|
92
|
+
self._html_url: Attribute[str] = NotSet
|
|
93
|
+
self._id: Attribute[int] = NotSet
|
|
94
|
+
self._in_reply_to_id: Attribute[int] = NotSet
|
|
95
|
+
self._is_copilot_code_review: Attribute[bool] = NotSet
|
|
96
|
+
self._line: Attribute[int] = NotSet
|
|
97
|
+
self._node_id: Attribute[str] = NotSet
|
|
98
|
+
self._original_commit_id: Attribute[str] = NotSet
|
|
99
|
+
self._original_line: Attribute[int] = NotSet
|
|
100
|
+
self._original_position: Attribute[int] = NotSet
|
|
101
|
+
self._original_start_line: Attribute[int] = NotSet
|
|
102
|
+
self._path: Attribute[str] = NotSet
|
|
103
|
+
self._position: Attribute[int] = NotSet
|
|
104
|
+
self._pull_request_review_id: Attribute[int] = NotSet
|
|
105
|
+
self._pull_request_url: Attribute[str] = NotSet
|
|
106
|
+
self._reactions: Attribute[dict[str, Any]] = NotSet
|
|
107
|
+
self._side: Attribute[str] = NotSet
|
|
108
|
+
self._start_line: Attribute[int] = NotSet
|
|
109
|
+
self._start_side: Attribute[str] = NotSet
|
|
110
|
+
self._subject_type: Attribute[str] = NotSet
|
|
111
|
+
self._updated_at: Attribute[datetime] = NotSet
|
|
112
|
+
self._url: Attribute[str] = NotSet
|
|
113
|
+
self._user: Attribute[NamedUser] = NotSet
|
|
114
|
+
|
|
115
|
+
def __repr__(self) -> str:
|
|
116
|
+
return self.get__repr__({"id": self._id.value, "user": self._user.value})
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
async def _links(self) -> dict[str, Any]:
|
|
120
|
+
await self._completeIfNotSet(self.__links)
|
|
121
|
+
return self.__links.value
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
async def author_association(self) -> str:
|
|
125
|
+
await self._completeIfNotSet(self._author_association)
|
|
126
|
+
return self._author_association.value
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
async def body(self) -> str:
|
|
130
|
+
await self._completeIfNotSet(self._body)
|
|
131
|
+
return self._body.value
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
async def body_html(self) -> str:
|
|
135
|
+
await self._completeIfNotSet(self._body_html)
|
|
136
|
+
return self._body_html.value
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
async def body_text(self) -> str:
|
|
140
|
+
await self._completeIfNotSet(self._body_text)
|
|
141
|
+
return self._body_text.value
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
async def commit_id(self) -> str:
|
|
145
|
+
await self._completeIfNotSet(self._commit_id)
|
|
146
|
+
return self._commit_id.value
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
async def created_at(self) -> datetime:
|
|
150
|
+
await self._completeIfNotSet(self._created_at)
|
|
151
|
+
return self._created_at.value
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
async def diff_hunk(self) -> str:
|
|
155
|
+
await self._completeIfNotSet(self._diff_hunk)
|
|
156
|
+
return self._diff_hunk.value
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
async def html_url(self) -> str:
|
|
160
|
+
await self._completeIfNotSet(self._html_url)
|
|
161
|
+
return self._html_url.value
|
|
162
|
+
|
|
163
|
+
@property
|
|
164
|
+
async def id(self) -> int:
|
|
165
|
+
await self._completeIfNotSet(self._id)
|
|
166
|
+
return self._id.value
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
async def in_reply_to_id(self) -> int:
|
|
170
|
+
await self._completeIfNotSet(self._in_reply_to_id)
|
|
171
|
+
return self._in_reply_to_id.value
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
async def is_copilot_code_review(self) -> bool:
|
|
175
|
+
await self._completeIfNotSet(self._is_copilot_code_review)
|
|
176
|
+
return self._is_copilot_code_review.value
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
async def line(self) -> int:
|
|
180
|
+
await self._completeIfNotSet(self._line)
|
|
181
|
+
return self._line.value
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
async def node_id(self) -> str:
|
|
185
|
+
await self._completeIfNotSet(self._node_id)
|
|
186
|
+
return self._node_id.value
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
async def original_commit_id(self) -> str:
|
|
190
|
+
await self._completeIfNotSet(self._original_commit_id)
|
|
191
|
+
return self._original_commit_id.value
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
async def original_line(self) -> int:
|
|
195
|
+
await self._completeIfNotSet(self._original_line)
|
|
196
|
+
return self._original_line.value
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
async def original_position(self) -> int:
|
|
200
|
+
await self._completeIfNotSet(self._original_position)
|
|
201
|
+
return self._original_position.value
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
async def original_start_line(self) -> int:
|
|
205
|
+
await self._completeIfNotSet(self._original_start_line)
|
|
206
|
+
return self._original_start_line.value
|
|
207
|
+
|
|
208
|
+
@property
|
|
209
|
+
async def path(self) -> str:
|
|
210
|
+
await self._completeIfNotSet(self._path)
|
|
211
|
+
return self._path.value
|
|
212
|
+
|
|
213
|
+
@property
|
|
214
|
+
async def position(self) -> int:
|
|
215
|
+
await self._completeIfNotSet(self._position)
|
|
216
|
+
return self._position.value
|
|
217
|
+
|
|
218
|
+
@property
|
|
219
|
+
async def pull_request_review_id(self) -> int:
|
|
220
|
+
await self._completeIfNotSet(self._pull_request_review_id)
|
|
221
|
+
return self._pull_request_review_id.value
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
async def pull_request_url(self) -> str:
|
|
225
|
+
await self._completeIfNotSet(self._pull_request_url)
|
|
226
|
+
return self._pull_request_url.value
|
|
227
|
+
|
|
228
|
+
@property
|
|
229
|
+
async def reactions(self) -> dict[str, Any]:
|
|
230
|
+
await self._completeIfNotSet(self._reactions)
|
|
231
|
+
return self._reactions.value
|
|
232
|
+
|
|
233
|
+
@property
|
|
234
|
+
async def side(self) -> str:
|
|
235
|
+
await self._completeIfNotSet(self._side)
|
|
236
|
+
return self._side.value
|
|
237
|
+
|
|
238
|
+
@property
|
|
239
|
+
async def start_line(self) -> int:
|
|
240
|
+
await self._completeIfNotSet(self._start_line)
|
|
241
|
+
return self._start_line.value
|
|
242
|
+
|
|
243
|
+
@property
|
|
244
|
+
async def start_side(self) -> str:
|
|
245
|
+
await self._completeIfNotSet(self._start_side)
|
|
246
|
+
return self._start_side.value
|
|
247
|
+
|
|
248
|
+
@property
|
|
249
|
+
async def subject_type(self) -> str:
|
|
250
|
+
await self._completeIfNotSet(self._subject_type)
|
|
251
|
+
return self._subject_type.value
|
|
252
|
+
|
|
253
|
+
@property
|
|
254
|
+
async def updated_at(self) -> datetime:
|
|
255
|
+
await self._completeIfNotSet(self._updated_at)
|
|
256
|
+
return self._updated_at.value
|
|
257
|
+
|
|
258
|
+
@property
|
|
259
|
+
async def url(self) -> str:
|
|
260
|
+
await self._completeIfNotSet(self._url)
|
|
261
|
+
return self._url.value
|
|
262
|
+
|
|
263
|
+
@property
|
|
264
|
+
async def user(self) -> NamedUser:
|
|
265
|
+
await self._completeIfNotSet(self._user)
|
|
266
|
+
return self._user.value
|
|
267
|
+
|
|
268
|
+
async def delete(self) -> None:
|
|
269
|
+
"""
|
|
270
|
+
:calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
|
271
|
+
:rtype: None
|
|
272
|
+
"""
|
|
273
|
+
headers, data = await self._requester.requestJsonAndCheck("DELETE", await self.url)
|
|
274
|
+
|
|
275
|
+
async def edit(self, body: str) -> None:
|
|
276
|
+
"""
|
|
277
|
+
:calls: `PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
|
|
278
|
+
:param body: string
|
|
279
|
+
:rtype: None
|
|
280
|
+
"""
|
|
281
|
+
assert isinstance(body, str), body
|
|
282
|
+
post_parameters = {
|
|
283
|
+
"body": body,
|
|
284
|
+
}
|
|
285
|
+
headers, data = await self._requester.requestJsonAndCheck("PATCH", await self.url, input=post_parameters)
|
|
286
|
+
self._useAttributes(data)
|
|
287
|
+
self._set_complete()
|
|
288
|
+
|
|
289
|
+
async def get_reactions(self) -> PaginatedList[Reaction]:
|
|
290
|
+
"""
|
|
291
|
+
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
|
|
292
|
+
<https://docs.github.com/en/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment>`_
|
|
293
|
+
:return: :class: :class:`githubasyncio.PaginatedList.PaginatedList` of :class:`githubasyncio.Reaction.Reaction`
|
|
294
|
+
"""
|
|
295
|
+
return PaginatedList(
|
|
296
|
+
githubasyncio.Reaction.Reaction,
|
|
297
|
+
self._requester,
|
|
298
|
+
f"{await self.url}/reactions",
|
|
299
|
+
None,
|
|
300
|
+
headers={"Accept": Consts.mediaTypeReactionsPreview},
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
async def create_reaction(self, reaction_type: str) -> Reaction:
|
|
304
|
+
"""
|
|
305
|
+
:calls: `POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions
|
|
306
|
+
<https://docs.github.com/en/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment>`_
|
|
307
|
+
:param reaction_type: string
|
|
308
|
+
:rtype: :class:`githubasyncio.Reaction.Reaction`
|
|
309
|
+
"""
|
|
310
|
+
assert isinstance(reaction_type, str), reaction_type
|
|
311
|
+
post_parameters = {
|
|
312
|
+
"content": reaction_type,
|
|
313
|
+
}
|
|
314
|
+
headers, data = await self._requester.requestJsonAndCheck(
|
|
315
|
+
"POST",
|
|
316
|
+
f"{await self.url}/reactions",
|
|
317
|
+
input=post_parameters,
|
|
318
|
+
headers={"Accept": Consts.mediaTypeReactionsPreview},
|
|
319
|
+
)
|
|
320
|
+
return githubasyncio.Reaction.Reaction(self._requester, headers, data)
|
|
321
|
+
|
|
322
|
+
async def delete_reaction(self, reaction_id: int) -> bool:
|
|
323
|
+
"""
|
|
324
|
+
:calls: `DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}
|
|
325
|
+
<https://docs.github.com/en/rest/reference/reactions#delete-a-pull-request-comment-reaction>`_
|
|
326
|
+
:param reaction_id: integer
|
|
327
|
+
:rtype: bool
|
|
328
|
+
"""
|
|
329
|
+
assert isinstance(reaction_id, int), reaction_id
|
|
330
|
+
status, _, _ = await self._requester.requestJson(
|
|
331
|
+
"DELETE",
|
|
332
|
+
f"{await self.url}/reactions/{reaction_id}",
|
|
333
|
+
headers={"Accept": Consts.mediaTypeReactionsPreview},
|
|
334
|
+
)
|
|
335
|
+
return status == 204
|
|
336
|
+
|
|
337
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
338
|
+
if "_links" in attributes: # pragma no branch
|
|
339
|
+
self.__links = self._makeDictAttribute(attributes["_links"])
|
|
340
|
+
if "author_association" in attributes: # pragma no branch
|
|
341
|
+
self._author_association = self._makeStringAttribute(attributes["author_association"])
|
|
342
|
+
if "body" in attributes: # pragma no branch
|
|
343
|
+
self._body = self._makeStringAttribute(attributes["body"])
|
|
344
|
+
if "body_html" in attributes: # pragma no branch
|
|
345
|
+
self._body_html = self._makeStringAttribute(attributes["body_html"])
|
|
346
|
+
if "body_text" in attributes: # pragma no branch
|
|
347
|
+
self._body_text = self._makeStringAttribute(attributes["body_text"])
|
|
348
|
+
if "commit_id" in attributes: # pragma no branch
|
|
349
|
+
self._commit_id = self._makeStringAttribute(attributes["commit_id"])
|
|
350
|
+
if "created_at" in attributes: # pragma no branch
|
|
351
|
+
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
|
352
|
+
if "diff_hunk" in attributes: # pragma no branch
|
|
353
|
+
self._diff_hunk = self._makeStringAttribute(attributes["diff_hunk"])
|
|
354
|
+
if "html_url" in attributes: # pragma no branch
|
|
355
|
+
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
|
356
|
+
if "id" in attributes: # pragma no branch
|
|
357
|
+
self._id = self._makeIntAttribute(attributes["id"])
|
|
358
|
+
elif "url" in attributes and attributes["url"]:
|
|
359
|
+
id = attributes["url"].split("/")[-1]
|
|
360
|
+
if id.isnumeric():
|
|
361
|
+
self._id = self._makeIntAttribute(int(id))
|
|
362
|
+
if "in_reply_to_id" in attributes: # pragma no branch
|
|
363
|
+
self._in_reply_to_id = self._makeIntAttribute(attributes["in_reply_to_id"])
|
|
364
|
+
if "is_copilot_code_review" in attributes: # pragma no branch
|
|
365
|
+
self._is_copilot_code_review = self._makeBoolAttribute(attributes["is_copilot_code_review"])
|
|
366
|
+
if "line" in attributes: # pragma no branch
|
|
367
|
+
self._line = self._makeIntAttribute(attributes["line"])
|
|
368
|
+
if "node_id" in attributes: # pragma no branch
|
|
369
|
+
self._node_id = self._makeStringAttribute(attributes["node_id"])
|
|
370
|
+
if "original_commit_id" in attributes: # pragma no branch
|
|
371
|
+
self._original_commit_id = self._makeStringAttribute(attributes["original_commit_id"])
|
|
372
|
+
if "original_line" in attributes: # pragma no branch
|
|
373
|
+
self._original_line = self._makeIntAttribute(attributes["original_line"])
|
|
374
|
+
if "original_position" in attributes: # pragma no branch
|
|
375
|
+
self._original_position = self._makeIntAttribute(attributes["original_position"])
|
|
376
|
+
if "original_start_line" in attributes: # pragma no branch
|
|
377
|
+
self._original_start_line = self._makeIntAttribute(attributes["original_start_line"])
|
|
378
|
+
if "path" in attributes: # pragma no branch
|
|
379
|
+
self._path = self._makeStringAttribute(attributes["path"])
|
|
380
|
+
if "position" in attributes: # pragma no branch
|
|
381
|
+
self._position = self._makeIntAttribute(attributes["position"])
|
|
382
|
+
if "pull_request_review_id" in attributes: # pragma no branch
|
|
383
|
+
self._pull_request_review_id = self._makeIntAttribute(attributes["pull_request_review_id"])
|
|
384
|
+
if "pull_request_url" in attributes: # pragma no branch
|
|
385
|
+
self._pull_request_url = self._makeStringAttribute(attributes["pull_request_url"])
|
|
386
|
+
if "reactions" in attributes: # pragma no branch
|
|
387
|
+
self._reactions = self._makeDictAttribute(attributes["reactions"])
|
|
388
|
+
if "side" in attributes: # pragma no branch
|
|
389
|
+
self._side = self._makeStringAttribute(attributes["side"])
|
|
390
|
+
if "start_line" in attributes: # pragma no branch
|
|
391
|
+
self._start_line = self._makeIntAttribute(attributes["start_line"])
|
|
392
|
+
if "start_side" in attributes: # pragma no branch
|
|
393
|
+
self._start_side = self._makeStringAttribute(attributes["start_side"])
|
|
394
|
+
if "subject_type" in attributes: # pragma no branch
|
|
395
|
+
self._subject_type = self._makeStringAttribute(attributes["subject_type"])
|
|
396
|
+
if "updated_at" in attributes: # pragma no branch
|
|
397
|
+
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
|
|
398
|
+
if "url" in attributes: # pragma no branch
|
|
399
|
+
self._url = self._makeStringAttribute(attributes["url"])
|
|
400
|
+
if "user" in attributes: # pragma no branch
|
|
401
|
+
self._user = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["user"])
|
|
@@ -0,0 +1,89 @@
|
|
|
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 2013 martinqt <m.ki2@laposte.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 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
13
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
14
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
15
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
16
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
17
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
18
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
19
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
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
|
+
# #
|
|
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 typing import Any
|
|
46
|
+
|
|
47
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class PullRequestMergeStatus(NonCompletableGithubObject):
|
|
51
|
+
"""
|
|
52
|
+
This class represents PullRequestMergeStatuses.
|
|
53
|
+
|
|
54
|
+
The reference can be found here
|
|
55
|
+
https://docs.github.com/en/rest/reference/pulls#check-if-a-pull-request-has-been-merged
|
|
56
|
+
|
|
57
|
+
The OpenAPI schema can be found at
|
|
58
|
+
|
|
59
|
+
- /components/schemas/pull-request-merge-result
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
def _initAttributes(self) -> None:
|
|
64
|
+
self._merged: Attribute[bool] = NotSet
|
|
65
|
+
self._message: Attribute[str] = NotSet
|
|
66
|
+
self._sha: Attribute[str] = NotSet
|
|
67
|
+
|
|
68
|
+
def __repr__(self) -> str:
|
|
69
|
+
return self.get__repr__({"sha": self._sha.value, "merged": self._merged.value})
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def merged(self) -> bool:
|
|
73
|
+
return self._merged.value
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def message(self) -> str:
|
|
77
|
+
return self._message.value
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def sha(self) -> str:
|
|
81
|
+
return self._sha.value
|
|
82
|
+
|
|
83
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
84
|
+
if "merged" in attributes: # pragma no branch
|
|
85
|
+
self._merged = self._makeBoolAttribute(attributes["merged"])
|
|
86
|
+
if "message" in attributes: # pragma no branch
|
|
87
|
+
self._message = self._makeStringAttribute(attributes["message"])
|
|
88
|
+
if "sha" in attributes: # pragma no branch
|
|
89
|
+
self._sha = self._makeStringAttribute(attributes["sha"])
|
|
@@ -0,0 +1,110 @@
|
|
|
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 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
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 TYPE_CHECKING, Any
|
|
44
|
+
|
|
45
|
+
import githubasyncio.NamedUser
|
|
46
|
+
import githubasyncio.Organization
|
|
47
|
+
import githubasyncio.Repository
|
|
48
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
49
|
+
|
|
50
|
+
if TYPE_CHECKING:
|
|
51
|
+
from githubasyncio.NamedUser import NamedUser
|
|
52
|
+
from githubasyncio.Repository import Repository
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class PullRequestPart(NonCompletableGithubObject):
|
|
56
|
+
"""
|
|
57
|
+
This class represents PullRequestParts.
|
|
58
|
+
|
|
59
|
+
The OpenAPI schema can be found at
|
|
60
|
+
|
|
61
|
+
- /components/schemas/pull-request-minimal/properties/base
|
|
62
|
+
- /components/schemas/pull-request-minimal/properties/head
|
|
63
|
+
- /components/schemas/pull-request-simple/properties/base
|
|
64
|
+
- /components/schemas/pull-request-simple/properties/head
|
|
65
|
+
- /components/schemas/pull-request/properties/base
|
|
66
|
+
- /components/schemas/pull-request/properties/head
|
|
67
|
+
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
def _initAttributes(self) -> None:
|
|
71
|
+
self._label: Attribute[str] = NotSet
|
|
72
|
+
self._ref: Attribute[str] = NotSet
|
|
73
|
+
self._repo: Attribute[Repository] = NotSet
|
|
74
|
+
self._sha: Attribute[str] = NotSet
|
|
75
|
+
self._user: Attribute[NamedUser] = NotSet
|
|
76
|
+
|
|
77
|
+
def __repr__(self) -> str:
|
|
78
|
+
return self.get__repr__({"sha": self._sha.value})
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def label(self) -> str:
|
|
82
|
+
return self._label.value
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def ref(self) -> str:
|
|
86
|
+
return self._ref.value
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def repo(self) -> Repository:
|
|
90
|
+
return self._repo.value
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def sha(self) -> str:
|
|
94
|
+
return self._sha.value
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def user(self) -> NamedUser:
|
|
98
|
+
return self._user.value
|
|
99
|
+
|
|
100
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
101
|
+
if "label" in attributes: # pragma no branch
|
|
102
|
+
self._label = self._makeStringAttribute(attributes["label"])
|
|
103
|
+
if "ref" in attributes: # pragma no branch
|
|
104
|
+
self._ref = self._makeStringAttribute(attributes["ref"])
|
|
105
|
+
if "repo" in attributes: # pragma no branch
|
|
106
|
+
self._repo = self._makeClassAttribute(githubasyncio.Repository.Repository, attributes["repo"])
|
|
107
|
+
if "sha" in attributes: # pragma no branch
|
|
108
|
+
self._sha = self._makeStringAttribute(attributes["sha"])
|
|
109
|
+
if "user" in attributes: # pragma no branch
|
|
110
|
+
self._user = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["user"])
|