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,63 @@
|
|
|
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 Steve Kowalik <steven@wedontsleep.org> #
|
|
12
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
13
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
14
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
15
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
16
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
17
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
18
|
+
# #
|
|
19
|
+
# This file is part of PyGithub. #
|
|
20
|
+
# http://pygithub.readthedocs.io/ #
|
|
21
|
+
# #
|
|
22
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
23
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
24
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
25
|
+
# any later version. #
|
|
26
|
+
# #
|
|
27
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
28
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
29
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
30
|
+
# details. #
|
|
31
|
+
# #
|
|
32
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
33
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
34
|
+
# #
|
|
35
|
+
################################################################################
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
from __future__ import annotations
|
|
39
|
+
|
|
40
|
+
from typing import Any
|
|
41
|
+
|
|
42
|
+
from githubasyncio.GithubObject import NotSet, Opt, is_defined, is_optional
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class InputFileContent:
|
|
46
|
+
"""
|
|
47
|
+
This class represents InputFileContents.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def __init__(self, content: str, new_name: Opt[str] = NotSet):
|
|
51
|
+
assert isinstance(content, str), content
|
|
52
|
+
assert is_optional(new_name, str), new_name
|
|
53
|
+
self.__newName: Opt[str] = new_name
|
|
54
|
+
self.__content: str = content
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def _identity(self) -> dict[str, str]:
|
|
58
|
+
identity: dict[str, Any] = {
|
|
59
|
+
"content": self.__content,
|
|
60
|
+
}
|
|
61
|
+
if is_defined(self.__newName):
|
|
62
|
+
identity["filename"] = self.__newName
|
|
63
|
+
return identity
|
|
@@ -0,0 +1,71 @@
|
|
|
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 Nic Dahlquist <nic@snapchat.com> #
|
|
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
|
+
# #
|
|
21
|
+
# This file is part of PyGithub. #
|
|
22
|
+
# http://pygithub.readthedocs.io/ #
|
|
23
|
+
# #
|
|
24
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
25
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
26
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
27
|
+
# any later version. #
|
|
28
|
+
# #
|
|
29
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
30
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
31
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
32
|
+
# details. #
|
|
33
|
+
# #
|
|
34
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
35
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
36
|
+
# #
|
|
37
|
+
################################################################################
|
|
38
|
+
|
|
39
|
+
from __future__ import annotations
|
|
40
|
+
|
|
41
|
+
from typing import Any
|
|
42
|
+
|
|
43
|
+
from githubasyncio.GithubObject import NotSet, Opt, is_defined, is_optional
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class InputGitAuthor:
|
|
47
|
+
"""
|
|
48
|
+
This class represents InputGitAuthors.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, name: str, email: str, date: Opt[str] = NotSet):
|
|
52
|
+
assert isinstance(name, str), name
|
|
53
|
+
assert isinstance(email, str), email
|
|
54
|
+
assert is_optional(date, str), date # @todo Datetime?
|
|
55
|
+
|
|
56
|
+
self.__name: str = name
|
|
57
|
+
self.__email: str = email
|
|
58
|
+
self.__date: Opt[str] = date
|
|
59
|
+
|
|
60
|
+
def __repr__(self) -> str:
|
|
61
|
+
return f'InputGitAuthor(name="{self.__name}")'
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def _identity(self) -> dict[str, str]:
|
|
65
|
+
identity: dict[str, Any] = {
|
|
66
|
+
"name": self.__name,
|
|
67
|
+
"email": self.__email,
|
|
68
|
+
}
|
|
69
|
+
if is_defined(self.__date):
|
|
70
|
+
identity["date"] = self.__date
|
|
71
|
+
return identity
|
|
@@ -0,0 +1,79 @@
|
|
|
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 Steve Kowalik <steven@wedontsleep.org> #
|
|
12
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
13
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
14
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
15
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
16
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
17
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
18
|
+
# #
|
|
19
|
+
# This file is part of PyGithub. #
|
|
20
|
+
# http://pygithub.readthedocs.io/ #
|
|
21
|
+
# #
|
|
22
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
23
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
24
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
25
|
+
# any later version. #
|
|
26
|
+
# #
|
|
27
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
28
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
29
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
30
|
+
# details. #
|
|
31
|
+
# #
|
|
32
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
33
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
34
|
+
# #
|
|
35
|
+
################################################################################
|
|
36
|
+
|
|
37
|
+
from __future__ import annotations
|
|
38
|
+
|
|
39
|
+
from typing import Any
|
|
40
|
+
|
|
41
|
+
from githubasyncio.GithubObject import NotSet, Opt, is_defined, is_optional
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class InputGitTreeElement:
|
|
45
|
+
"""
|
|
46
|
+
This class represents InputGitTreeElements.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def __init__(
|
|
50
|
+
self,
|
|
51
|
+
path: str,
|
|
52
|
+
mode: str,
|
|
53
|
+
type: str,
|
|
54
|
+
content: Opt[str] = NotSet,
|
|
55
|
+
sha: Opt[str | None] = NotSet,
|
|
56
|
+
):
|
|
57
|
+
assert isinstance(path, str), path
|
|
58
|
+
assert isinstance(mode, str), mode
|
|
59
|
+
assert isinstance(type, str), type
|
|
60
|
+
assert is_optional(content, str), content
|
|
61
|
+
assert sha is None or is_optional(sha, str), sha
|
|
62
|
+
self.__path = path
|
|
63
|
+
self.__mode = mode
|
|
64
|
+
self.__type = type
|
|
65
|
+
self.__content = content
|
|
66
|
+
self.__sha: Opt[str] | None = sha
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def _identity(self) -> dict[str, Any]:
|
|
70
|
+
identity: dict[str, Any] = {
|
|
71
|
+
"path": self.__path,
|
|
72
|
+
"mode": self.__mode,
|
|
73
|
+
"type": self.__type,
|
|
74
|
+
}
|
|
75
|
+
if is_defined(self.__sha):
|
|
76
|
+
identity["sha"] = self.__sha
|
|
77
|
+
if is_defined(self.__content):
|
|
78
|
+
identity["content"] = self.__content
|
|
79
|
+
return identity
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2012 Zearin <zearin@gonk.net> #
|
|
6
|
+
# Copyright 2013 AKFish <akfish@gmail.com> #
|
|
7
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
9
|
+
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
|
|
10
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
11
|
+
# Copyright 2017 Jannis Gebauer <ja.geb@me.com> #
|
|
12
|
+
# Copyright 2017 Simon <spam@esemi.ru> #
|
|
13
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
14
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
15
|
+
# Copyright 2019 Adam Baratz <adam.baratz@gmail.com> #
|
|
16
|
+
# Copyright 2019 Rigas Papathanasopoulos <rigaspapas@gmail.com> #
|
|
17
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
18
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
19
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
20
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
21
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
22
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
23
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
24
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
25
|
+
# Copyright 2024 Min RK <benjaminrk@gmail.com> #
|
|
26
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
27
|
+
# Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
|
|
28
|
+
# #
|
|
29
|
+
# This file is part of PyGithub. #
|
|
30
|
+
# http://pygithub.readthedocs.io/ #
|
|
31
|
+
# #
|
|
32
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
33
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
34
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
35
|
+
# any later version. #
|
|
36
|
+
# #
|
|
37
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
38
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
39
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
40
|
+
# details. #
|
|
41
|
+
# #
|
|
42
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
43
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
44
|
+
# #
|
|
45
|
+
################################################################################
|
|
46
|
+
|
|
47
|
+
from __future__ import annotations
|
|
48
|
+
|
|
49
|
+
from datetime import datetime
|
|
50
|
+
from typing import TYPE_CHECKING, Any
|
|
51
|
+
|
|
52
|
+
import githubasyncio.Auth
|
|
53
|
+
import githubasyncio.Authorization
|
|
54
|
+
import githubasyncio.Event
|
|
55
|
+
import githubasyncio.Gist
|
|
56
|
+
import githubasyncio.GithubObject
|
|
57
|
+
import githubasyncio.Issue
|
|
58
|
+
import githubasyncio.NamedUser
|
|
59
|
+
import githubasyncio.Notification
|
|
60
|
+
import githubasyncio.Organization
|
|
61
|
+
import githubasyncio.PaginatedList
|
|
62
|
+
import githubasyncio.Plan
|
|
63
|
+
import githubasyncio.Repository
|
|
64
|
+
import githubasyncio.UserKey
|
|
65
|
+
from githubasyncio import Consts
|
|
66
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
67
|
+
from githubasyncio.PaginatedList import PaginatedList
|
|
68
|
+
from githubasyncio.Requester import Requester
|
|
69
|
+
|
|
70
|
+
if TYPE_CHECKING:
|
|
71
|
+
from githubasyncio.MainClass import Github
|
|
72
|
+
from githubasyncio.NamedUser import NamedUser
|
|
73
|
+
from githubasyncio.Organization import Organization
|
|
74
|
+
from githubasyncio.Repository import Repository
|
|
75
|
+
|
|
76
|
+
INTEGRATION_PREVIEW_HEADERS = {"Accept": Consts.mediaTypeIntegrationPreview}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class Installation(NonCompletableGithubObject):
|
|
80
|
+
"""
|
|
81
|
+
This class represents Installations.
|
|
82
|
+
|
|
83
|
+
The reference can be found here
|
|
84
|
+
https://docs.github.com/en/rest/reference/apps#installations
|
|
85
|
+
|
|
86
|
+
The OpenAPI schema can be found at
|
|
87
|
+
|
|
88
|
+
- /components/schemas/installation
|
|
89
|
+
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
def __init__(
|
|
93
|
+
self,
|
|
94
|
+
requester: Requester,
|
|
95
|
+
headers: dict[str, str | int],
|
|
96
|
+
attributes: Any,
|
|
97
|
+
) -> None:
|
|
98
|
+
super().__init__(requester, headers, attributes)
|
|
99
|
+
|
|
100
|
+
auth = self._requester.auth if self._requester is not None else None
|
|
101
|
+
# Usually, an Installation is created from a Requester with App authentication
|
|
102
|
+
if isinstance(auth, githubasyncio.Auth.AppAuth):
|
|
103
|
+
# But the installation has to authenticate as an installation (e.g. for get_repos())
|
|
104
|
+
auth = auth.get_installation_auth(self.id, requester=self._requester)
|
|
105
|
+
self._requester = self._requester.withAuth(auth)
|
|
106
|
+
|
|
107
|
+
def _initAttributes(self) -> None:
|
|
108
|
+
self._access_tokens_url: Attribute[str] = NotSet
|
|
109
|
+
self._account: Attribute[NamedUser | Organization] = NotSet
|
|
110
|
+
self._app_id: Attribute[int] = NotSet
|
|
111
|
+
self._app_slug: Attribute[str] = NotSet
|
|
112
|
+
self._client_id: Attribute[str] = NotSet
|
|
113
|
+
self._contact_email: Attribute[str] = NotSet
|
|
114
|
+
self._created_at: Attribute[datetime] = NotSet
|
|
115
|
+
self._events: Attribute[list[str]] = NotSet
|
|
116
|
+
self._has_multiple_single_files: Attribute[bool] = NotSet
|
|
117
|
+
self._html_url: Attribute[str] = NotSet
|
|
118
|
+
self._id: Attribute[int] = NotSet
|
|
119
|
+
self._permissions: Attribute[dict[str, Any]] = NotSet
|
|
120
|
+
self._repositories_url: Attribute[str] = NotSet
|
|
121
|
+
self._repository_selection: Attribute[str] = NotSet
|
|
122
|
+
self._single_file_name: Attribute[str] = NotSet
|
|
123
|
+
self._single_file_paths: Attribute[list[str]] = NotSet
|
|
124
|
+
self._suspended_at: Attribute[datetime] = NotSet
|
|
125
|
+
self._suspended_by: Attribute[NamedUser] = NotSet
|
|
126
|
+
self._target_id: Attribute[int] = NotSet
|
|
127
|
+
self._target_type: Attribute[str] = NotSet
|
|
128
|
+
self._updated_at: Attribute[datetime] = NotSet
|
|
129
|
+
|
|
130
|
+
def __repr__(self) -> str:
|
|
131
|
+
return self.get__repr__({"id": self._id.value})
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def access_tokens_url(self) -> str:
|
|
135
|
+
return self._access_tokens_url.value
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def account(self) -> NamedUser | Organization:
|
|
139
|
+
return self._account.value
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def app_id(self) -> int:
|
|
143
|
+
return self._app_id.value
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def app_slug(self) -> str:
|
|
147
|
+
return self._app_slug.value
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def client_id(self) -> str:
|
|
151
|
+
return self._client_id.value
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def contact_email(self) -> str:
|
|
155
|
+
return self._contact_email.value
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def created_at(self) -> datetime:
|
|
159
|
+
return self._created_at.value
|
|
160
|
+
|
|
161
|
+
@property
|
|
162
|
+
def events(self) -> list[str]:
|
|
163
|
+
return self._events.value
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def has_multiple_single_files(self) -> bool:
|
|
167
|
+
return self._has_multiple_single_files.value
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def html_url(self) -> str:
|
|
171
|
+
return self._html_url.value
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
def id(self) -> int:
|
|
175
|
+
return self._id.value
|
|
176
|
+
|
|
177
|
+
@property
|
|
178
|
+
def permissions(self) -> dict[str, Any]:
|
|
179
|
+
return self._permissions.value
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def repositories_url(self) -> str:
|
|
183
|
+
return self._repositories_url.value
|
|
184
|
+
|
|
185
|
+
@property
|
|
186
|
+
def repository_selection(self) -> str:
|
|
187
|
+
return self._repository_selection.value
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def requester(self) -> Requester:
|
|
191
|
+
"""
|
|
192
|
+
Return my Requester object.
|
|
193
|
+
|
|
194
|
+
For example, to make requests to API endpoints not yet supported by PyGitHub.
|
|
195
|
+
|
|
196
|
+
"""
|
|
197
|
+
return self._requester
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def single_file_name(self) -> str:
|
|
201
|
+
return self._single_file_name.value
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
def single_file_paths(self) -> list[str]:
|
|
205
|
+
return self._single_file_paths.value
|
|
206
|
+
|
|
207
|
+
@property
|
|
208
|
+
def suspended_at(self) -> datetime:
|
|
209
|
+
return self._suspended_at.value
|
|
210
|
+
|
|
211
|
+
@property
|
|
212
|
+
def suspended_by(self) -> NamedUser:
|
|
213
|
+
return self._suspended_by.value
|
|
214
|
+
|
|
215
|
+
@property
|
|
216
|
+
def target_id(self) -> int:
|
|
217
|
+
return self._target_id.value
|
|
218
|
+
|
|
219
|
+
@property
|
|
220
|
+
def target_type(self) -> str:
|
|
221
|
+
return self._target_type.value
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
def updated_at(self) -> datetime:
|
|
225
|
+
return self._updated_at.value
|
|
226
|
+
|
|
227
|
+
def get_github_for_installation(self) -> Github:
|
|
228
|
+
return githubasyncio.Github(**self._requester.kwargs)
|
|
229
|
+
|
|
230
|
+
def get_repos(self) -> PaginatedList[Repository]:
|
|
231
|
+
"""
|
|
232
|
+
:calls: `GET /installation/repositories <https://docs.github.com/en/rest/apps/installations#list-repositories-accessible-to-the-app-installation>`_
|
|
233
|
+
:calls: `GET /user/installations/{installation_id}/repositories <https://docs.github.com/en/rest/apps/installations#list-repositories-accessible-to-the-user-access-token>`_
|
|
234
|
+
"""
|
|
235
|
+
url_parameters: dict[str, Any] = {}
|
|
236
|
+
url = "/installation/repositories"
|
|
237
|
+
if isinstance(self._requester.auth, githubasyncio.Auth.AppUserAuth):
|
|
238
|
+
url = f"/user/installations/{self.id}/repositories"
|
|
239
|
+
|
|
240
|
+
return PaginatedList(
|
|
241
|
+
contentClass=githubasyncio.Repository.Repository,
|
|
242
|
+
requester=self._requester,
|
|
243
|
+
firstUrl=url,
|
|
244
|
+
firstParams=url_parameters,
|
|
245
|
+
headers=INTEGRATION_PREVIEW_HEADERS,
|
|
246
|
+
list_item="repositories",
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
250
|
+
if "access_tokens_url" in attributes: # pragma no branch
|
|
251
|
+
self._access_tokens_url = self._makeStringAttribute(attributes["access_tokens_url"])
|
|
252
|
+
if "account" in attributes: # pragma no branch
|
|
253
|
+
self._account = self._makeUnionClassAttributeFromTypeKeyAndValueKey(
|
|
254
|
+
"target_type",
|
|
255
|
+
"account",
|
|
256
|
+
None,
|
|
257
|
+
attributes,
|
|
258
|
+
(githubasyncio.NamedUser.NamedUser, "User"),
|
|
259
|
+
(githubasyncio.Organization.Organization, "Organization"),
|
|
260
|
+
)
|
|
261
|
+
if "app_id" in attributes: # pragma no branch
|
|
262
|
+
self._app_id = self._makeIntAttribute(attributes["app_id"])
|
|
263
|
+
if "app_slug" in attributes: # pragma no branch
|
|
264
|
+
self._app_slug = self._makeStringAttribute(attributes["app_slug"])
|
|
265
|
+
if "client_id" in attributes: # pragma no branch
|
|
266
|
+
self._client_id = self._makeStringAttribute(attributes["client_id"])
|
|
267
|
+
if "contact_email" in attributes: # pragma no branch
|
|
268
|
+
self._contact_email = self._makeStringAttribute(attributes["contact_email"])
|
|
269
|
+
if "created_at" in attributes: # pragma no branch
|
|
270
|
+
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
|
271
|
+
if "events" in attributes: # pragma no branch
|
|
272
|
+
self._events = self._makeListOfStringsAttribute(attributes["events"])
|
|
273
|
+
if "has_multiple_single_files" in attributes: # pragma no branch
|
|
274
|
+
self._has_multiple_single_files = self._makeBoolAttribute(attributes["has_multiple_single_files"])
|
|
275
|
+
if "html_url" in attributes: # pragma no branch
|
|
276
|
+
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
|
277
|
+
if "id" in attributes: # pragma no branch
|
|
278
|
+
self._id = self._makeIntAttribute(attributes["id"])
|
|
279
|
+
if "permissions" in attributes: # pragma no branch
|
|
280
|
+
self._permissions = self._makeDictAttribute(attributes["permissions"])
|
|
281
|
+
if "repositories_url" in attributes: # pragma no branch
|
|
282
|
+
self._repositories_url = self._makeStringAttribute(attributes["repositories_url"])
|
|
283
|
+
if "repository_selection" in attributes: # pragma no branch
|
|
284
|
+
self._repository_selection = self._makeStringAttribute(attributes["repository_selection"])
|
|
285
|
+
if "single_file_name" in attributes: # pragma no branch
|
|
286
|
+
self._single_file_name = self._makeStringAttribute(attributes["single_file_name"])
|
|
287
|
+
if "single_file_paths" in attributes: # pragma no branch
|
|
288
|
+
self._single_file_paths = self._makeListOfStringsAttribute(attributes["single_file_paths"])
|
|
289
|
+
if "suspended_at" in attributes: # pragma no branch
|
|
290
|
+
self._suspended_at = self._makeDatetimeAttribute(attributes["suspended_at"])
|
|
291
|
+
if "suspended_by" in attributes: # pragma no branch
|
|
292
|
+
self._suspended_by = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["suspended_by"])
|
|
293
|
+
if "target_id" in attributes: # pragma no branch
|
|
294
|
+
self._target_id = self._makeIntAttribute(attributes["target_id"])
|
|
295
|
+
if "target_type" in attributes: # pragma no branch
|
|
296
|
+
self._target_type = self._makeStringAttribute(attributes["target_type"])
|
|
297
|
+
if "updated_at" in attributes: # pragma no branch
|
|
298
|
+
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2012 Zearin <zearin@gonk.net> #
|
|
6
|
+
# Copyright 2013 AKFish <akfish@gmail.com> #
|
|
7
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
9
|
+
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
|
|
10
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
11
|
+
# Copyright 2017 Simon <spam@esemi.ru> #
|
|
12
|
+
# Copyright 2018 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 2023 Denis Blanchette <dblanchette@coveo.com> #
|
|
18
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
19
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
20
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
21
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
22
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
23
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
24
|
+
# #
|
|
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.NamedUser
|
|
49
|
+
import githubasyncio.PaginatedList
|
|
50
|
+
import githubasyncio.Repository
|
|
51
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
52
|
+
|
|
53
|
+
if TYPE_CHECKING:
|
|
54
|
+
from githubasyncio.NamedUser import NamedUser
|
|
55
|
+
from githubasyncio.Repository import Repository
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class InstallationAuthorization(NonCompletableGithubObject):
|
|
59
|
+
"""
|
|
60
|
+
This class represents InstallationAuthorizations.
|
|
61
|
+
|
|
62
|
+
The OpenAPI schema can be found at
|
|
63
|
+
|
|
64
|
+
- /components/schemas/installation-token
|
|
65
|
+
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def _initAttributes(self) -> None:
|
|
69
|
+
self._expires_at: Attribute[datetime] = NotSet
|
|
70
|
+
self._has_multiple_single_files: Attribute[bool] = NotSet
|
|
71
|
+
self._on_behalf_of: Attribute[NamedUser] = NotSet
|
|
72
|
+
self._permissions: Attribute[dict] = NotSet
|
|
73
|
+
self._repositories: Attribute[list[Repository]] = NotSet
|
|
74
|
+
self._repository_selection: Attribute[str] = NotSet
|
|
75
|
+
self._single_file: Attribute[str] = NotSet
|
|
76
|
+
self._single_file_paths: Attribute[list[str]] = NotSet
|
|
77
|
+
self._token: Attribute[str] = NotSet
|
|
78
|
+
|
|
79
|
+
def __repr__(self) -> str:
|
|
80
|
+
return self.get__repr__({"expires_at": self._expires_at.value})
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def expires_at(self) -> datetime:
|
|
84
|
+
return self._expires_at.value
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def has_multiple_single_files(self) -> bool:
|
|
88
|
+
return self._has_multiple_single_files.value
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def on_behalf_of(self) -> NamedUser:
|
|
92
|
+
return self._on_behalf_of.value
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def permissions(self) -> dict:
|
|
96
|
+
return self._permissions.value
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def repositories(self) -> list[Repository]:
|
|
100
|
+
return self._repositories.value
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def repository_selection(self) -> str:
|
|
104
|
+
return self._repository_selection.value
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def single_file(self) -> str:
|
|
108
|
+
return self._single_file.value
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def single_file_paths(self) -> list[str]:
|
|
112
|
+
return self._single_file_paths.value
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def token(self) -> str:
|
|
116
|
+
return self._token.value
|
|
117
|
+
|
|
118
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
119
|
+
if "expires_at" in attributes: # pragma no branch
|
|
120
|
+
self._expires_at = self._makeDatetimeAttribute(attributes["expires_at"])
|
|
121
|
+
if "has_multiple_single_files" in attributes: # pragma no branch
|
|
122
|
+
self._has_multiple_single_files = self._makeBoolAttribute(attributes["has_multiple_single_files"])
|
|
123
|
+
if "on_behalf_of" in attributes: # pragma no branch
|
|
124
|
+
self._on_behalf_of = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["on_behalf_of"])
|
|
125
|
+
if "permissions" in attributes: # pragma no branch
|
|
126
|
+
self._permissions = self._makeDictAttribute(attributes["permissions"])
|
|
127
|
+
if "repositories" in attributes: # pragma no branch
|
|
128
|
+
self._repositories = self._makeListOfClassesAttribute(
|
|
129
|
+
githubasyncio.Repository.Repository, attributes["repositories"]
|
|
130
|
+
)
|
|
131
|
+
if "repository_selection" in attributes: # pragma no branch
|
|
132
|
+
self._repository_selection = self._makeStringAttribute(attributes["repository_selection"])
|
|
133
|
+
if "single_file" in attributes: # pragma no branch
|
|
134
|
+
self._single_file = self._makeStringAttribute(attributes["single_file"])
|
|
135
|
+
if "single_file_paths" in attributes: # pragma no branch
|
|
136
|
+
self._single_file_paths = self._makeListOfStringsAttribute(attributes["single_file_paths"])
|
|
137
|
+
if "token" in attributes: # pragma no branch
|
|
138
|
+
self._token = self._makeStringAttribute(attributes["token"])
|