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,192 @@
|
|
|
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
|
+
# #
|
|
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.AuthorizationApplication
|
|
47
|
+
import githubasyncio.GithubObject
|
|
48
|
+
from githubasyncio.GithubObject import Attribute, NotSet, Opt, _NotSetType
|
|
49
|
+
|
|
50
|
+
if TYPE_CHECKING:
|
|
51
|
+
from githubasyncio.AuthorizationApplication import AuthorizationApplication
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Authorization(githubasyncio.GithubObject.CompletableGithubObject):
|
|
55
|
+
"""
|
|
56
|
+
This class represents Authorizations.
|
|
57
|
+
|
|
58
|
+
The reference can be found here
|
|
59
|
+
https://docs.github.com/en/enterprise-server@3.0/rest/reference/oauth-authorizations
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
def _initAttributes(self) -> None:
|
|
64
|
+
self._app: Attribute[AuthorizationApplication] = NotSet
|
|
65
|
+
self._created_at: Attribute[datetime] = NotSet
|
|
66
|
+
self._id: Attribute[int] = NotSet
|
|
67
|
+
self._note: Attribute[str | None] = NotSet
|
|
68
|
+
self._note_url: Attribute[str | None] = NotSet
|
|
69
|
+
self._scopes: Attribute[str] = NotSet
|
|
70
|
+
self._token: Attribute[str] = NotSet
|
|
71
|
+
self._updated_at: Attribute[datetime] = NotSet
|
|
72
|
+
self._url: Attribute[str] = NotSet
|
|
73
|
+
|
|
74
|
+
def __repr__(self) -> str:
|
|
75
|
+
return self.get__repr__({"scopes": self._scopes.value})
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
async def app(self) -> AuthorizationApplication:
|
|
79
|
+
await self._completeIfNotSet(self._app)
|
|
80
|
+
return self._app.value
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
async def created_at(self) -> datetime:
|
|
84
|
+
"""
|
|
85
|
+
:type: datetime.datetime
|
|
86
|
+
"""
|
|
87
|
+
await self._completeIfNotSet(self._created_at)
|
|
88
|
+
return self._created_at.value
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
async def id(self) -> int:
|
|
92
|
+
await self._completeIfNotSet(self._id)
|
|
93
|
+
return self._id.value
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
async def note(self) -> str | None:
|
|
97
|
+
await self._completeIfNotSet(self._note)
|
|
98
|
+
return self._note.value
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
async def note_url(self) -> str | None:
|
|
102
|
+
await self._completeIfNotSet(self._note_url)
|
|
103
|
+
return self._note_url.value
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
async def scopes(self) -> str:
|
|
107
|
+
await self._completeIfNotSet(self._scopes)
|
|
108
|
+
return self._scopes.value
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
async def token(self) -> str:
|
|
112
|
+
await self._completeIfNotSet(self._token)
|
|
113
|
+
return self._token.value
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
async def updated_at(self) -> datetime:
|
|
117
|
+
await self._completeIfNotSet(self._updated_at)
|
|
118
|
+
return self._updated_at.value
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
async def url(self) -> str:
|
|
122
|
+
await self._completeIfNotSet(self._url)
|
|
123
|
+
return self._url.value
|
|
124
|
+
|
|
125
|
+
async def delete(self) -> None:
|
|
126
|
+
"""
|
|
127
|
+
:calls: `DELETE /authorizations/{id} <https://docs.github.com/en/developers/apps/authorizing-oauth-apps>`_
|
|
128
|
+
"""
|
|
129
|
+
headers, data = await self._requester.requestJsonAndCheck("DELETE", await self.url)
|
|
130
|
+
|
|
131
|
+
async def edit(
|
|
132
|
+
self,
|
|
133
|
+
scopes: Opt[list[str]] = NotSet,
|
|
134
|
+
add_scopes: Opt[list[str]] = NotSet,
|
|
135
|
+
remove_scopes: Opt[list[str]] = NotSet,
|
|
136
|
+
note: Opt[str] = NotSet,
|
|
137
|
+
note_url: Opt[str] = NotSet,
|
|
138
|
+
) -> None:
|
|
139
|
+
"""
|
|
140
|
+
:calls: `PATCH /authorizations/{id} <https://docs.github.com/en/developers/apps/authorizing-oauth-apps>`_
|
|
141
|
+
:param scopes: list of string
|
|
142
|
+
:param add_scopes: list of string
|
|
143
|
+
:param remove_scopes: list of string
|
|
144
|
+
:param note: string
|
|
145
|
+
:param note_url: string
|
|
146
|
+
:rtype: None
|
|
147
|
+
"""
|
|
148
|
+
assert isinstance(scopes, _NotSetType) or all(isinstance(element, str) for element in scopes), scopes
|
|
149
|
+
assert isinstance(add_scopes, _NotSetType) or all(isinstance(element, str) for element in add_scopes), (
|
|
150
|
+
add_scopes
|
|
151
|
+
)
|
|
152
|
+
assert isinstance(remove_scopes, _NotSetType) or all(isinstance(element, str) for element in remove_scopes), (
|
|
153
|
+
remove_scopes
|
|
154
|
+
)
|
|
155
|
+
assert isinstance(note, (_NotSetType, str)), note
|
|
156
|
+
assert isinstance(note_url, (_NotSetType, str)), note_url
|
|
157
|
+
|
|
158
|
+
post_parameters = NotSet.remove_unset_items(
|
|
159
|
+
{
|
|
160
|
+
"scopes": scopes,
|
|
161
|
+
"add_scopes": add_scopes,
|
|
162
|
+
"remove_scopes": remove_scopes,
|
|
163
|
+
"note": note,
|
|
164
|
+
"note_url": note_url,
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
headers, data = await self._requester.requestJsonAndCheck("PATCH", await self.url, input=post_parameters)
|
|
169
|
+
self._useAttributes(data)
|
|
170
|
+
|
|
171
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
172
|
+
if "app" in attributes: # pragma no branch
|
|
173
|
+
self._app = self._makeClassAttribute(
|
|
174
|
+
githubasyncio.AuthorizationApplication.AuthorizationApplication,
|
|
175
|
+
attributes["app"],
|
|
176
|
+
)
|
|
177
|
+
if "created_at" in attributes: # pragma no branch
|
|
178
|
+
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
|
179
|
+
if "id" in attributes: # pragma no branch
|
|
180
|
+
self._id = self._makeIntAttribute(attributes["id"])
|
|
181
|
+
if "note" in attributes: # pragma no branch
|
|
182
|
+
self._note = self._makeStringAttribute(attributes["note"])
|
|
183
|
+
if "note_url" in attributes: # pragma no branch
|
|
184
|
+
self._note_url = self._makeStringAttribute(attributes["note_url"])
|
|
185
|
+
if "scopes" in attributes: # pragma no branch
|
|
186
|
+
self._scopes = self._makeListOfStringsAttribute(attributes["scopes"])
|
|
187
|
+
if "token" in attributes: # pragma no branch
|
|
188
|
+
self._token = self._makeStringAttribute(attributes["token"])
|
|
189
|
+
if "updated_at" in attributes: # pragma no branch
|
|
190
|
+
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
|
|
191
|
+
if "url" in attributes: # pragma no branch
|
|
192
|
+
self._url = self._makeStringAttribute(attributes["url"])
|
|
@@ -0,0 +1,73 @@
|
|
|
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 typing import Any
|
|
43
|
+
|
|
44
|
+
from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class AuthorizationApplication(CompletableGithubObject):
|
|
48
|
+
"""
|
|
49
|
+
This class represents AuthorizationApplications.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def _initAttributes(self) -> None:
|
|
53
|
+
self._name: Attribute[str] = NotSet
|
|
54
|
+
self._url: Attribute[str] = NotSet
|
|
55
|
+
|
|
56
|
+
def __repr__(self) -> str:
|
|
57
|
+
return self.get__repr__({"name": self._name.value})
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
async def name(self) -> str:
|
|
61
|
+
await self._completeIfNotSet(self._name)
|
|
62
|
+
return self._name.value
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
async def url(self) -> str:
|
|
66
|
+
await self._completeIfNotSet(self._url)
|
|
67
|
+
return self._url.value
|
|
68
|
+
|
|
69
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
70
|
+
if "name" in attributes: # pragma no branch
|
|
71
|
+
self._name = self._makeStringAttribute(attributes["name"])
|
|
72
|
+
if "url" in attributes: # pragma no branch
|
|
73
|
+
self._url = self._makeStringAttribute(attributes["url"])
|
|
@@ -0,0 +1,104 @@
|
|
|
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 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
7
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
9
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
10
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
11
|
+
# Copyright 2019 Adam Baratz <adam.baratz@gmail.com> #
|
|
12
|
+
# Copyright 2019 Nick Campbell <nicholas.j.campbell@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 2022 Marco Köpcke <hello@parakoopa.de> #
|
|
18
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
19
|
+
# Copyright 2023 Oskar Jansson <56458534+janssonoskar@users.noreply.github.com>#
|
|
20
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
21
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
22
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
23
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
24
|
+
# #
|
|
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 Any
|
|
47
|
+
|
|
48
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Autolink(NonCompletableGithubObject):
|
|
52
|
+
"""
|
|
53
|
+
This class represents Repository autolinks.
|
|
54
|
+
|
|
55
|
+
The reference can be found here
|
|
56
|
+
https://docs.github.com/en/rest/repos/autolinks?apiVersion=2022-11-28
|
|
57
|
+
|
|
58
|
+
The OpenAPI schema can be found at
|
|
59
|
+
|
|
60
|
+
- /components/schemas/autolink
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
def _initAttributes(self) -> None:
|
|
65
|
+
self._id: Attribute[int] = NotSet
|
|
66
|
+
self._is_alphanumeric: Attribute[bool] = NotSet
|
|
67
|
+
self._key_prefix: Attribute[str] = NotSet
|
|
68
|
+
self._updated_at: Attribute[datetime] = NotSet
|
|
69
|
+
self._url_template: Attribute[str] = NotSet
|
|
70
|
+
|
|
71
|
+
def __repr__(self) -> str:
|
|
72
|
+
return self.get__repr__({"id": self._id.value})
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def id(self) -> int:
|
|
76
|
+
return self._id.value
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def is_alphanumeric(self) -> bool:
|
|
80
|
+
return self._is_alphanumeric.value
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def key_prefix(self) -> str:
|
|
84
|
+
return self._key_prefix.value
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def updated_at(self) -> datetime:
|
|
88
|
+
return self._updated_at.value
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def url_template(self) -> str:
|
|
92
|
+
return self._url_template.value
|
|
93
|
+
|
|
94
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
95
|
+
if "id" in attributes: # pragma no branch
|
|
96
|
+
self._id = self._makeIntAttribute(attributes["id"])
|
|
97
|
+
if "is_alphanumeric" in attributes: # pragma no branch
|
|
98
|
+
self._is_alphanumeric = self._makeBoolAttribute(attributes["is_alphanumeric"])
|
|
99
|
+
if "key_prefix" in attributes: # pragma no branch
|
|
100
|
+
self._key_prefix = self._makeStringAttribute(attributes["key_prefix"])
|
|
101
|
+
if "updated_at" in attributes: # pragma no branch
|
|
102
|
+
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
|
|
103
|
+
if "url_template" in attributes: # pragma no branch
|
|
104
|
+
self._url_template = self._makeStringAttribute(attributes["url_template"])
|