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,87 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
6
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
7
|
+
# Copyright 2023 alson <git@alm.nufan.net> #
|
|
8
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
9
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
10
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
11
|
+
# #
|
|
12
|
+
# This file is part of PyGithub. #
|
|
13
|
+
# http://pygithub.readthedocs.io/ #
|
|
14
|
+
# #
|
|
15
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
16
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
17
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
18
|
+
# any later version. #
|
|
19
|
+
# #
|
|
20
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
21
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
22
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
23
|
+
# details. #
|
|
24
|
+
# #
|
|
25
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
26
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
27
|
+
# #
|
|
28
|
+
################################################################################
|
|
29
|
+
|
|
30
|
+
from __future__ import annotations
|
|
31
|
+
|
|
32
|
+
from typing import Any
|
|
33
|
+
|
|
34
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class EnvironmentDeploymentBranchPolicy(NonCompletableGithubObject):
|
|
38
|
+
"""
|
|
39
|
+
This class represents a deployment branch policy for an environment.
|
|
40
|
+
|
|
41
|
+
The reference can be found here
|
|
42
|
+
https://docs.github.com/en/rest/reference/deployments#environments
|
|
43
|
+
|
|
44
|
+
The OpenAPI schema can be found at
|
|
45
|
+
|
|
46
|
+
- /components/schemas/deployment-branch-policy-settings
|
|
47
|
+
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def _initAttributes(self) -> None:
|
|
51
|
+
self._custom_branch_policies: Attribute[bool] = NotSet
|
|
52
|
+
self._protected_branches: Attribute[bool] = NotSet
|
|
53
|
+
|
|
54
|
+
def __repr__(self) -> str:
|
|
55
|
+
return self.get__repr__({})
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def custom_branch_policies(self) -> bool:
|
|
59
|
+
return self._custom_branch_policies.value
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def protected_branches(self) -> bool:
|
|
63
|
+
return self._protected_branches.value
|
|
64
|
+
|
|
65
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
66
|
+
if "custom_branch_policies" in attributes: # pragma no branch
|
|
67
|
+
self._custom_branch_policies = self._makeBoolAttribute(attributes["custom_branch_policies"])
|
|
68
|
+
if "protected_branches" in attributes: # pragma no branch
|
|
69
|
+
self._protected_branches = self._makeBoolAttribute(attributes["protected_branches"])
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class EnvironmentDeploymentBranchPolicyParams:
|
|
73
|
+
"""
|
|
74
|
+
This class presents the deployment branch policy parameters as can be configured for an Environment.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def __init__(self, protected_branches: bool = False, custom_branch_policies: bool = False):
|
|
78
|
+
assert isinstance(protected_branches, bool)
|
|
79
|
+
assert isinstance(custom_branch_policies, bool)
|
|
80
|
+
self.protected_branches = protected_branches
|
|
81
|
+
self.custom_branch_policies = custom_branch_policies
|
|
82
|
+
|
|
83
|
+
def _asdict(self) -> dict:
|
|
84
|
+
return {
|
|
85
|
+
"protected_branches": self.protected_branches,
|
|
86
|
+
"custom_branch_policies": self.custom_branch_policies,
|
|
87
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
20
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
21
|
+
# Copyright 2023 alson <git@alm.nufan.net> #
|
|
22
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
23
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
24
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
25
|
+
# Copyright 2025 GPK <gopidesupavan@gmail.com> #
|
|
26
|
+
# #
|
|
27
|
+
# This file is part of PyGithub. #
|
|
28
|
+
# http://pygithub.readthedocs.io/ #
|
|
29
|
+
# #
|
|
30
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
31
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
32
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
33
|
+
# any later version. #
|
|
34
|
+
# #
|
|
35
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
36
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
37
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
38
|
+
# details. #
|
|
39
|
+
# #
|
|
40
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
41
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
42
|
+
# #
|
|
43
|
+
################################################################################
|
|
44
|
+
|
|
45
|
+
from __future__ import annotations
|
|
46
|
+
|
|
47
|
+
from typing import TYPE_CHECKING, Any
|
|
48
|
+
|
|
49
|
+
import githubasyncio.EnvironmentProtectionRuleReviewer
|
|
50
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
51
|
+
|
|
52
|
+
if TYPE_CHECKING:
|
|
53
|
+
from githubasyncio.EnvironmentProtectionRuleReviewer import EnvironmentProtectionRuleReviewer
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class EnvironmentProtectionRule(NonCompletableGithubObject):
|
|
57
|
+
"""
|
|
58
|
+
This class represents a protection rule for an environment.
|
|
59
|
+
|
|
60
|
+
The reference can be found here
|
|
61
|
+
https://docs.github.com/en/rest/reference/deployments#environments
|
|
62
|
+
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
def _initAttributes(self) -> None:
|
|
66
|
+
self._id: Attribute[int] = NotSet
|
|
67
|
+
self._node_id: Attribute[str] = NotSet
|
|
68
|
+
self._prevent_self_review: Attribute[bool] = NotSet
|
|
69
|
+
self._reviewers: Attribute[list[EnvironmentProtectionRuleReviewer]] = NotSet
|
|
70
|
+
self._type: Attribute[str] = NotSet
|
|
71
|
+
self._wait_timer: Attribute[int] = NotSet
|
|
72
|
+
|
|
73
|
+
def __repr__(self) -> str:
|
|
74
|
+
return self.get__repr__({"id": self._id.value})
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def id(self) -> int:
|
|
78
|
+
return self._id.value
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def node_id(self) -> str:
|
|
82
|
+
return self._node_id.value
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def prevent_self_review(self) -> bool:
|
|
86
|
+
return self._prevent_self_review.value
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def reviewers(
|
|
90
|
+
self,
|
|
91
|
+
) -> list[EnvironmentProtectionRuleReviewer]:
|
|
92
|
+
return self._reviewers.value
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def type(self) -> str:
|
|
96
|
+
return self._type.value
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def wait_timer(self) -> int:
|
|
100
|
+
return self._wait_timer.value
|
|
101
|
+
|
|
102
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
103
|
+
if "id" in attributes: # pragma no branch
|
|
104
|
+
self._id = self._makeIntAttribute(attributes["id"])
|
|
105
|
+
if "node_id" in attributes: # pragma no branch
|
|
106
|
+
self._node_id = self._makeStringAttribute(attributes["node_id"])
|
|
107
|
+
if "prevent_self_review" in attributes:
|
|
108
|
+
self._prevent_self_review = self._makeBoolAttribute(attributes["prevent_self_review"])
|
|
109
|
+
if "reviewers" in attributes: # pragma no branch
|
|
110
|
+
self._reviewers = self._makeListOfClassesAttribute(
|
|
111
|
+
githubasyncio.EnvironmentProtectionRuleReviewer.EnvironmentProtectionRuleReviewer,
|
|
112
|
+
attributes["reviewers"],
|
|
113
|
+
)
|
|
114
|
+
if "type" in attributes: # pragma no branch
|
|
115
|
+
self._type = self._makeStringAttribute(attributes["type"])
|
|
116
|
+
if "wait_timer" in attributes: # pragma no branch
|
|
117
|
+
self._wait_timer = self._makeIntAttribute(attributes["wait_timer"])
|
|
@@ -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 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 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 2023 alson <git@alm.nufan.net> #
|
|
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
|
+
# Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
|
|
25
|
+
# #
|
|
26
|
+
# This file is part of PyGithub. #
|
|
27
|
+
# http://pygithub.readthedocs.io/ #
|
|
28
|
+
# #
|
|
29
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
30
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
31
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
32
|
+
# any later version. #
|
|
33
|
+
# #
|
|
34
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
35
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
36
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
37
|
+
# details. #
|
|
38
|
+
# #
|
|
39
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
40
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
41
|
+
# #
|
|
42
|
+
################################################################################
|
|
43
|
+
|
|
44
|
+
from __future__ import annotations
|
|
45
|
+
|
|
46
|
+
from typing import TYPE_CHECKING, Any
|
|
47
|
+
|
|
48
|
+
import githubasyncio.NamedUser
|
|
49
|
+
import githubasyncio.Team
|
|
50
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
51
|
+
|
|
52
|
+
if TYPE_CHECKING:
|
|
53
|
+
from githubasyncio.NamedUser import NamedUser
|
|
54
|
+
from githubasyncio.Team import Team
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class EnvironmentProtectionRuleReviewer(NonCompletableGithubObject):
|
|
58
|
+
"""
|
|
59
|
+
This class represents a reviewer for an EnvironmentProtectionRule.
|
|
60
|
+
|
|
61
|
+
The reference can be found here
|
|
62
|
+
https://docs.github.com/en/rest/reference/deployments#environments
|
|
63
|
+
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def _initAttributes(self) -> None:
|
|
67
|
+
self._reviewer: Attribute[NamedUser | Team] = NotSet
|
|
68
|
+
self._type: Attribute[str] = NotSet
|
|
69
|
+
|
|
70
|
+
def __repr__(self) -> str:
|
|
71
|
+
return self.get__repr__({"type": self._type.value})
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def reviewer(self) -> NamedUser | Team:
|
|
75
|
+
return self._reviewer.value
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def type(self) -> str:
|
|
79
|
+
return self._type.value
|
|
80
|
+
|
|
81
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
82
|
+
if "reviewer" in attributes: # pragma no branch
|
|
83
|
+
self._reviewer = self._makeUnionClassAttributeFromTypeKeyAndValueKey(
|
|
84
|
+
"type",
|
|
85
|
+
"reviewer",
|
|
86
|
+
None,
|
|
87
|
+
attributes,
|
|
88
|
+
(githubasyncio.NamedUser.NamedUser, "User"),
|
|
89
|
+
(githubasyncio.Team.Team, "Team"),
|
|
90
|
+
)
|
|
91
|
+
if "type" in attributes: # pragma no branch
|
|
92
|
+
self._type = self._makeStringAttribute(attributes["type"])
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ReviewerParams:
|
|
96
|
+
"""
|
|
97
|
+
This class presents reviewers as can be configured for an Environment.
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
def __init__(self, type_: str, id_: int):
|
|
101
|
+
assert isinstance(type_, str) and type_ in ("User", "Team")
|
|
102
|
+
assert isinstance(id_, int)
|
|
103
|
+
self.type = type_
|
|
104
|
+
self.id = id_
|
|
105
|
+
|
|
106
|
+
def _asdict(self) -> dict:
|
|
107
|
+
return {
|
|
108
|
+
"type": self.type,
|
|
109
|
+
"id": self.id,
|
|
110
|
+
}
|
githubasyncio/Event.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
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 sfdye <tsfdye@gmail.com> #
|
|
13
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
14
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
15
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
16
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
17
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
18
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
19
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
20
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
21
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
22
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
23
|
+
# Copyright 2026 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.GithubObject
|
|
49
|
+
import githubasyncio.NamedUser
|
|
50
|
+
import githubasyncio.Organization
|
|
51
|
+
import githubasyncio.Repository
|
|
52
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
53
|
+
|
|
54
|
+
if TYPE_CHECKING:
|
|
55
|
+
from githubasyncio.NamedUser import NamedUser
|
|
56
|
+
from githubasyncio.Organization import Organization
|
|
57
|
+
from githubasyncio.Repository import Repository
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class Event(NonCompletableGithubObject):
|
|
61
|
+
"""
|
|
62
|
+
This class represents Events.
|
|
63
|
+
|
|
64
|
+
The reference can be found here
|
|
65
|
+
https://docs.github.com/en/rest/reference/activity#events
|
|
66
|
+
|
|
67
|
+
The OpenAPI schema can be found at
|
|
68
|
+
|
|
69
|
+
- /components/schemas/event
|
|
70
|
+
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
def _initAttributes(self) -> None:
|
|
74
|
+
self._actor: Attribute[NamedUser] = NotSet
|
|
75
|
+
self._created_at: Attribute[datetime] = NotSet
|
|
76
|
+
self._id: Attribute[str] = NotSet
|
|
77
|
+
self._org: Attribute[Organization] = NotSet
|
|
78
|
+
self._payload: Attribute[dict[str, Any]] = NotSet
|
|
79
|
+
self._public: Attribute[bool] = NotSet
|
|
80
|
+
self._repo: Attribute[Repository] = NotSet
|
|
81
|
+
self._type: Attribute[str] = NotSet
|
|
82
|
+
|
|
83
|
+
def __repr__(self) -> str:
|
|
84
|
+
return self.get__repr__({"id": self._id.value, "type": self._type.value})
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def actor(self) -> NamedUser:
|
|
88
|
+
return self._actor.value
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def created_at(self) -> datetime:
|
|
92
|
+
return self._created_at.value
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def id(self) -> str:
|
|
96
|
+
return self._id.value
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def org(self) -> Organization:
|
|
100
|
+
return self._org.value
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def payload(self) -> dict[str, Any]:
|
|
104
|
+
return self._payload.value
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def public(self) -> bool:
|
|
108
|
+
return self._public.value
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def repo(self) -> Repository:
|
|
112
|
+
return self._repo.value
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def type(self) -> str:
|
|
116
|
+
return self._type.value
|
|
117
|
+
|
|
118
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
119
|
+
if "actor" in attributes: # pragma no branch
|
|
120
|
+
self._actor = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["actor"])
|
|
121
|
+
if "created_at" in attributes: # pragma no branch
|
|
122
|
+
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
|
123
|
+
if "id" in attributes: # pragma no branch
|
|
124
|
+
self._id = self._makeStringAttribute(attributes["id"])
|
|
125
|
+
if "org" in attributes: # pragma no branch
|
|
126
|
+
self._org = self._makeClassAttribute(githubasyncio.Organization.Organization, attributes["org"])
|
|
127
|
+
if "payload" in attributes: # pragma no branch
|
|
128
|
+
self._payload = self._makeDictAttribute(attributes["payload"])
|
|
129
|
+
if "public" in attributes: # pragma no branch
|
|
130
|
+
self._public = self._makeBoolAttribute(attributes["public"])
|
|
131
|
+
if "repo" in attributes: # pragma no branch
|
|
132
|
+
self._repo = self._makeClassAttribute(githubasyncio.Repository.Repository, attributes["repo"])
|
|
133
|
+
if "type" in attributes: # pragma no branch
|
|
134
|
+
self._type = self._makeStringAttribute(attributes["type"])
|
githubasyncio/File.py
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
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 Jeffrey Melvin <jeffrey.melvin@workiva.com> #
|
|
11
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.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 Steve Kowalik <steven@wedontsleep.org> #
|
|
16
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
17
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
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 typing import Any
|
|
46
|
+
|
|
47
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class File(NonCompletableGithubObject):
|
|
51
|
+
"""
|
|
52
|
+
This class represents Files.
|
|
53
|
+
|
|
54
|
+
The OpenAPI schema can be found at
|
|
55
|
+
|
|
56
|
+
- /components/schemas/diff-entry
|
|
57
|
+
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
def _initAttributes(self) -> None:
|
|
61
|
+
self._additions: Attribute[int] = NotSet
|
|
62
|
+
self._blob_url: Attribute[str] = NotSet
|
|
63
|
+
self._changes: Attribute[int] = NotSet
|
|
64
|
+
self._contents_url: Attribute[str] = NotSet
|
|
65
|
+
self._deletions: Attribute[int] = NotSet
|
|
66
|
+
self._filename: Attribute[str] = NotSet
|
|
67
|
+
self._patch: Attribute[str] = NotSet
|
|
68
|
+
self._previous_filename: Attribute[str] = NotSet
|
|
69
|
+
self._raw_url: Attribute[str] = NotSet
|
|
70
|
+
self._sha: Attribute[str] = NotSet
|
|
71
|
+
self._status: Attribute[str] = NotSet
|
|
72
|
+
|
|
73
|
+
def __repr__(self) -> str:
|
|
74
|
+
return self.get__repr__({"sha": self._sha.value, "filename": self._filename.value})
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additions(self) -> int:
|
|
78
|
+
return self._additions.value
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def blob_url(self) -> str:
|
|
82
|
+
return self._blob_url.value
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def changes(self) -> int:
|
|
86
|
+
return self._changes.value
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def contents_url(self) -> str:
|
|
90
|
+
return self._contents_url.value
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def deletions(self) -> int:
|
|
94
|
+
return self._deletions.value
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def filename(self) -> str:
|
|
98
|
+
return self._filename.value
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def patch(self) -> str:
|
|
102
|
+
return self._patch.value
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def previous_filename(self) -> str:
|
|
106
|
+
return self._previous_filename.value
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def raw_url(self) -> str:
|
|
110
|
+
return self._raw_url.value
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def sha(self) -> str:
|
|
114
|
+
return self._sha.value
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def status(self) -> str:
|
|
118
|
+
return self._status.value
|
|
119
|
+
|
|
120
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
121
|
+
if "additions" in attributes: # pragma no branch
|
|
122
|
+
self._additions = self._makeIntAttribute(attributes["additions"])
|
|
123
|
+
if "blob_url" in attributes: # pragma no branch
|
|
124
|
+
self._blob_url = self._makeStringAttribute(attributes["blob_url"])
|
|
125
|
+
if "changes" in attributes: # pragma no branch
|
|
126
|
+
self._changes = self._makeIntAttribute(attributes["changes"])
|
|
127
|
+
if "contents_url" in attributes: # pragma no branch
|
|
128
|
+
self._contents_url = self._makeStringAttribute(attributes["contents_url"])
|
|
129
|
+
if "deletions" in attributes: # pragma no branch
|
|
130
|
+
self._deletions = self._makeIntAttribute(attributes["deletions"])
|
|
131
|
+
if "filename" in attributes: # pragma no branch
|
|
132
|
+
self._filename = self._makeStringAttribute(attributes["filename"])
|
|
133
|
+
if "patch" in attributes: # pragma no branch
|
|
134
|
+
self._patch = self._makeStringAttribute(attributes["patch"])
|
|
135
|
+
if "previous_filename" in attributes: # pragma no branch
|
|
136
|
+
self._previous_filename = self._makeStringAttribute(attributes["previous_filename"])
|
|
137
|
+
if "raw_url" in attributes: # pragma no branch
|
|
138
|
+
self._raw_url = self._makeStringAttribute(attributes["raw_url"])
|
|
139
|
+
if "sha" in attributes: # pragma no branch
|
|
140
|
+
self._sha = self._makeStringAttribute(attributes["sha"])
|
|
141
|
+
if "status" in attributes: # pragma no branch
|
|
142
|
+
self._status = self._makeStringAttribute(attributes["status"])
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2025 Matt Ball <96152357+mball-agathos@users.noreply.github.com> #
|
|
6
|
+
# #
|
|
7
|
+
# This file is part of PyGithub. #
|
|
8
|
+
# http://pygithub.readthedocs.io/ #
|
|
9
|
+
# #
|
|
10
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
11
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
12
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
13
|
+
# any later version. #
|
|
14
|
+
# #
|
|
15
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
16
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
17
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
18
|
+
# details. #
|
|
19
|
+
# #
|
|
20
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
21
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
22
|
+
# #
|
|
23
|
+
################################################################################
|
|
24
|
+
|
|
25
|
+
from __future__ import annotations
|
|
26
|
+
|
|
27
|
+
from typing import Any
|
|
28
|
+
|
|
29
|
+
from githubasyncio.GithubObject import (
|
|
30
|
+
Attribute,
|
|
31
|
+
NonCompletableGithubObject,
|
|
32
|
+
NotSet,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class GeneratedReleaseNotes(NonCompletableGithubObject):
|
|
37
|
+
"""
|
|
38
|
+
This class represents the release notes generated by the release/generate-notes REST API endpoint.
|
|
39
|
+
|
|
40
|
+
The reference can be found here:
|
|
41
|
+
https://docs.github.com/en/rest/releases/releases#generate-release-notes-content-for-a-release
|
|
42
|
+
|
|
43
|
+
The OpenAPI schema can be found at
|
|
44
|
+
|
|
45
|
+
- /components/schemas/release-notes-content
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def _initAttributes(self) -> None:
|
|
50
|
+
self._body: Attribute[str] = NotSet
|
|
51
|
+
self._name: Attribute[str] = NotSet
|
|
52
|
+
|
|
53
|
+
def __repr__(self) -> str:
|
|
54
|
+
return self.get__repr__({"name": self._name.value, "body": self._body.value})
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def body(self) -> str:
|
|
58
|
+
return self._body.value
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def name(self) -> str:
|
|
62
|
+
return self._name.value
|
|
63
|
+
|
|
64
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
65
|
+
if "body" in attributes:
|
|
66
|
+
self._body = self._makeStringAttribute(attributes["body"])
|
|
67
|
+
if "name" in attributes:
|
|
68
|
+
self._name = self._makeStringAttribute(attributes["name"])
|