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,184 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
6
|
+
# Copyright 2024 Thomas Cooper <coopernetes@proton.me> #
|
|
7
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
8
|
+
# #
|
|
9
|
+
# This file is part of PyGithub. #
|
|
10
|
+
# http://pygithub.readthedocs.io/ #
|
|
11
|
+
# #
|
|
12
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
13
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
14
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
15
|
+
# any later version. #
|
|
16
|
+
# #
|
|
17
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
18
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
19
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
20
|
+
# details. #
|
|
21
|
+
# #
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
23
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
24
|
+
# #
|
|
25
|
+
################################################################################
|
|
26
|
+
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
|
|
29
|
+
from datetime import datetime
|
|
30
|
+
from typing import TYPE_CHECKING, Any
|
|
31
|
+
|
|
32
|
+
import githubasyncio.AdvisoryVulnerabilityPackage
|
|
33
|
+
import githubasyncio.DependabotAlertAdvisory
|
|
34
|
+
import githubasyncio.DependabotAlertDependency
|
|
35
|
+
import githubasyncio.DependabotAlertVulnerability
|
|
36
|
+
import githubasyncio.NamedUser
|
|
37
|
+
import githubasyncio.Organization
|
|
38
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
39
|
+
|
|
40
|
+
if TYPE_CHECKING:
|
|
41
|
+
from githubasyncio.DependabotAlertAdvisory import DependabotAlertAdvisory
|
|
42
|
+
from githubasyncio.DependabotAlertDependency import DependabotAlertDependency
|
|
43
|
+
from githubasyncio.DependabotAlertVulnerability import DependabotAlertVulnerability
|
|
44
|
+
from githubasyncio.NamedUser import NamedUser
|
|
45
|
+
from githubasyncio.Organization import Organization
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class DependabotAlert(NonCompletableGithubObject):
|
|
49
|
+
"""
|
|
50
|
+
This class represents a DependabotAlert.
|
|
51
|
+
|
|
52
|
+
The reference can be found here
|
|
53
|
+
https://docs.github.com/en/rest/dependabot/alerts
|
|
54
|
+
|
|
55
|
+
The OpenAPI schema can be found at
|
|
56
|
+
|
|
57
|
+
- /components/schemas/dependabot-alert
|
|
58
|
+
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
def _initAttributes(self) -> None:
|
|
62
|
+
self._auto_dismissed_at: Attribute[datetime] = NotSet
|
|
63
|
+
self._created_at: Attribute[datetime] = NotSet
|
|
64
|
+
self._dependency: Attribute[DependabotAlertDependency] = NotSet
|
|
65
|
+
self._dismissed_at: Attribute[datetime | None] = NotSet
|
|
66
|
+
self._dismissed_by: Attribute[NamedUser | Organization | None] = NotSet
|
|
67
|
+
self._dismissed_comment: Attribute[str | None] = NotSet
|
|
68
|
+
self._dismissed_reason: Attribute[str | None] = NotSet
|
|
69
|
+
self._fixed_at: Attribute[str] = NotSet
|
|
70
|
+
self._html_url: Attribute[str] = NotSet
|
|
71
|
+
self._number: Attribute[int] = NotSet
|
|
72
|
+
self._security_advisory: Attribute[DependabotAlertAdvisory] = NotSet
|
|
73
|
+
self._security_vulnerability: Attribute[DependabotAlertVulnerability] = NotSet
|
|
74
|
+
self._state: Attribute[str] = NotSet
|
|
75
|
+
self._updated_at: Attribute[datetime] = NotSet
|
|
76
|
+
self._url: Attribute[str] = NotSet
|
|
77
|
+
|
|
78
|
+
def __repr__(self) -> str:
|
|
79
|
+
return self.get__repr__({"number": self._number.value, "ghsa_id": self.security_advisory.ghsa_id})
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def auto_dismissed_at(self) -> datetime:
|
|
83
|
+
return self._auto_dismissed_at.value
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def created_at(self) -> datetime:
|
|
87
|
+
return self._created_at.value
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def dependency(self) -> DependabotAlertDependency:
|
|
91
|
+
return self._dependency.value
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def dismissed_at(self) -> datetime | None:
|
|
95
|
+
return self._dismissed_at.value
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def dismissed_by(self) -> NamedUser | Organization | None:
|
|
99
|
+
return self._dismissed_by.value
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def dismissed_comment(self) -> str | None:
|
|
103
|
+
return self._dismissed_comment.value
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def dismissed_reason(self) -> str | None:
|
|
107
|
+
return self._dismissed_reason.value
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def fixed_at(self) -> str | None:
|
|
111
|
+
return self._fixed_at.value
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def html_url(self) -> str:
|
|
115
|
+
return self._html_url.value
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def number(self) -> int:
|
|
119
|
+
return self._number.value
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def security_advisory(self) -> DependabotAlertAdvisory:
|
|
123
|
+
return self._security_advisory.value
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def security_vulnerability(self) -> DependabotAlertVulnerability:
|
|
127
|
+
return self._security_vulnerability.value
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def state(self) -> str:
|
|
131
|
+
return self._state.value
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
def updated_at(self) -> datetime:
|
|
135
|
+
return self._updated_at.value
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def url(self) -> str:
|
|
139
|
+
return self._url.value
|
|
140
|
+
|
|
141
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
142
|
+
if "auto_dismissed_at" in attributes: # pragma no branch
|
|
143
|
+
self._auto_dismissed_at = self._makeDatetimeAttribute(attributes["auto_dismissed_at"])
|
|
144
|
+
if "created_at" in attributes:
|
|
145
|
+
self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
|
|
146
|
+
if "dependency" in attributes:
|
|
147
|
+
self._dependency = self._makeClassAttribute(
|
|
148
|
+
githubasyncio.DependabotAlertDependency.DependabotAlertDependency, attributes["dependency"]
|
|
149
|
+
)
|
|
150
|
+
if "dismissed_at" in attributes:
|
|
151
|
+
self._dismissed_at = self._makeDatetimeAttribute(attributes["dismissed_at"])
|
|
152
|
+
if "dismissed_by" in attributes:
|
|
153
|
+
self._dismissed_by = self._makeUnionClassAttributeFromTypeKey(
|
|
154
|
+
"type",
|
|
155
|
+
"User",
|
|
156
|
+
attributes["dismissed_by"],
|
|
157
|
+
(githubasyncio.NamedUser.NamedUser, "User"),
|
|
158
|
+
(githubasyncio.Organization.Organization, "Organization"),
|
|
159
|
+
) # type: ignore
|
|
160
|
+
if "dismissed_comment" in attributes:
|
|
161
|
+
self._dismissed_comment = self._makeStringAttribute(attributes["dismissed_comment"])
|
|
162
|
+
if "dismissed_reason" in attributes:
|
|
163
|
+
self._dismissed_reason = self._makeStringAttribute(attributes["dismissed_reason"])
|
|
164
|
+
if "fixed_at" in attributes:
|
|
165
|
+
self._fixed_at = self._makeStringAttribute(attributes["fixed_at"])
|
|
166
|
+
if "html_url" in attributes:
|
|
167
|
+
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
|
168
|
+
if "number" in attributes:
|
|
169
|
+
self._number = self._makeIntAttribute(attributes["number"])
|
|
170
|
+
if "security_advisory" in attributes:
|
|
171
|
+
self._security_advisory = self._makeClassAttribute(
|
|
172
|
+
githubasyncio.DependabotAlertAdvisory.DependabotAlertAdvisory, attributes["security_advisory"]
|
|
173
|
+
)
|
|
174
|
+
if "security_vulnerability" in attributes:
|
|
175
|
+
self._security_vulnerability = self._makeClassAttribute(
|
|
176
|
+
githubasyncio.DependabotAlertVulnerability.DependabotAlertVulnerability,
|
|
177
|
+
attributes["security_vulnerability"],
|
|
178
|
+
)
|
|
179
|
+
if "state" in attributes:
|
|
180
|
+
self._state = self._makeStringAttribute(attributes["state"])
|
|
181
|
+
if "updated_at" in attributes:
|
|
182
|
+
self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
|
|
183
|
+
if "url" in attributes:
|
|
184
|
+
self._url = self._makeStringAttribute(attributes["url"])
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
6
|
+
# Copyright 2024 Thomas Cooper <coopernetes@proton.me> #
|
|
7
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
8
|
+
# #
|
|
9
|
+
# This file is part of PyGithub. #
|
|
10
|
+
# http://pygithub.readthedocs.io/ #
|
|
11
|
+
# #
|
|
12
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
13
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
14
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
15
|
+
# any later version. #
|
|
16
|
+
# #
|
|
17
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
18
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
19
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
20
|
+
# details. #
|
|
21
|
+
# #
|
|
22
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
23
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
24
|
+
# #
|
|
25
|
+
################################################################################
|
|
26
|
+
|
|
27
|
+
from __future__ import annotations
|
|
28
|
+
|
|
29
|
+
from typing import TYPE_CHECKING, Any
|
|
30
|
+
|
|
31
|
+
import githubasyncio.DependabotAlertVulnerability
|
|
32
|
+
from githubasyncio.AdvisoryBase import AdvisoryBase
|
|
33
|
+
from githubasyncio.GithubObject import Attribute, NotSet
|
|
34
|
+
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
from githubasyncio.DependabotAlertVulnerability import DependabotAlertVulnerability
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DependabotAlertAdvisory(AdvisoryBase):
|
|
40
|
+
"""
|
|
41
|
+
This class represents a package flagged by a Dependabot alert that is vulnerable to a parent SecurityAdvisory.
|
|
42
|
+
|
|
43
|
+
The reference can be found here
|
|
44
|
+
https://docs.github.com/en/rest/dependabot/alerts
|
|
45
|
+
|
|
46
|
+
The OpenAPI schema can be found at
|
|
47
|
+
|
|
48
|
+
- /components/schemas/dependabot-alert-security-advisory
|
|
49
|
+
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def _initAttributes(self) -> None:
|
|
53
|
+
super()._initAttributes()
|
|
54
|
+
self._classification: Attribute[str] = NotSet
|
|
55
|
+
self._references: Attribute[list[dict]] = NotSet
|
|
56
|
+
self._vulnerabilities: Attribute[list[DependabotAlertVulnerability]] = NotSet
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def classification(self) -> str:
|
|
60
|
+
return self._classification.value
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def references(self) -> list[dict]:
|
|
64
|
+
return self._references.value
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def vulnerabilities(self) -> list[DependabotAlertVulnerability]:
|
|
68
|
+
return self._vulnerabilities.value
|
|
69
|
+
|
|
70
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
71
|
+
if "classification" in attributes: # pragma no branch
|
|
72
|
+
self._classification = self._makeStringAttribute(attributes["classification"])
|
|
73
|
+
if "references" in attributes:
|
|
74
|
+
self._references = self._makeListOfDictsAttribute(
|
|
75
|
+
attributes["references"],
|
|
76
|
+
)
|
|
77
|
+
if "vulnerabilities" in attributes:
|
|
78
|
+
self._vulnerabilities = self._makeListOfClassesAttribute(
|
|
79
|
+
githubasyncio.DependabotAlertVulnerability.DependabotAlertVulnerability,
|
|
80
|
+
attributes["vulnerabilities"],
|
|
81
|
+
)
|
|
82
|
+
super()._useAttributes(attributes)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
6
|
+
# Copyright 2024 Thomas Cooper <coopernetes@proton.me> #
|
|
7
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
8
|
+
# Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
|
|
9
|
+
# #
|
|
10
|
+
# This file is part of PyGithub. #
|
|
11
|
+
# http://pygithub.readthedocs.io/ #
|
|
12
|
+
# #
|
|
13
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
14
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
15
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
16
|
+
# any later version. #
|
|
17
|
+
# #
|
|
18
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
19
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
20
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
21
|
+
# details. #
|
|
22
|
+
# #
|
|
23
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
24
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
25
|
+
# #
|
|
26
|
+
################################################################################
|
|
27
|
+
|
|
28
|
+
from __future__ import annotations
|
|
29
|
+
|
|
30
|
+
from typing import TYPE_CHECKING, Any
|
|
31
|
+
|
|
32
|
+
import githubasyncio.AdvisoryVulnerabilityPackage
|
|
33
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
34
|
+
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
from githubasyncio.AdvisoryVulnerabilityPackage import AdvisoryVulnerabilityPackage
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class DependabotAlertDependency(NonCompletableGithubObject):
|
|
40
|
+
"""
|
|
41
|
+
This class represents a DependabotAlertDependency.
|
|
42
|
+
|
|
43
|
+
The reference can be found here
|
|
44
|
+
https://docs.github.com/en/rest/dependabot/alerts
|
|
45
|
+
|
|
46
|
+
The OpenAPI schema can be found at
|
|
47
|
+
|
|
48
|
+
- /components/schemas/dependabot-alert/properties/dependency
|
|
49
|
+
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def _initAttributes(self) -> None:
|
|
53
|
+
self._manifest_path: Attribute[str] = NotSet
|
|
54
|
+
self._package: Attribute[AdvisoryVulnerabilityPackage] = NotSet
|
|
55
|
+
self._relationship: Attribute[str] = NotSet
|
|
56
|
+
self._scope: Attribute[str] = NotSet
|
|
57
|
+
self._version_requirement: Attribute[str] = NotSet
|
|
58
|
+
|
|
59
|
+
def __repr__(self) -> str:
|
|
60
|
+
return self.get__repr__(
|
|
61
|
+
{
|
|
62
|
+
"package": self.package,
|
|
63
|
+
"manifest_path": self.manifest_path,
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def manifest_path(self) -> str:
|
|
69
|
+
return self._manifest_path.value
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def package(self) -> AdvisoryVulnerabilityPackage:
|
|
73
|
+
return self._package.value
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def relationship(self) -> str:
|
|
77
|
+
return self._relationship.value
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def scope(self) -> str:
|
|
81
|
+
return self._scope.value
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def version_requirement(self) -> str:
|
|
85
|
+
return self._version_requirement.value
|
|
86
|
+
|
|
87
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
88
|
+
if "manifest_path" in attributes:
|
|
89
|
+
self._manifest_path = self._makeStringAttribute(attributes["manifest_path"])
|
|
90
|
+
if "package" in attributes:
|
|
91
|
+
self._package = self._makeClassAttribute(
|
|
92
|
+
githubasyncio.AdvisoryVulnerabilityPackage.AdvisoryVulnerabilityPackage,
|
|
93
|
+
attributes["package"],
|
|
94
|
+
)
|
|
95
|
+
if "relationship" in attributes: # pragma no branch
|
|
96
|
+
self._relationship = self._makeStringAttribute(attributes["relationship"])
|
|
97
|
+
if "scope" in attributes:
|
|
98
|
+
self._scope = self._makeStringAttribute(attributes["scope"])
|
|
99
|
+
if "version_requirement" in attributes: # pragma no branch
|
|
100
|
+
self._version_requirement = self._makeStringAttribute(attributes["version_requirement"])
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2024 Thomas Cooper <coopernetes@proton.me> #
|
|
6
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
7
|
+
# #
|
|
8
|
+
# This file is part of PyGithub. #
|
|
9
|
+
# http://pygithub.readthedocs.io/ #
|
|
10
|
+
# #
|
|
11
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
12
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
13
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
14
|
+
# any later version. #
|
|
15
|
+
# #
|
|
16
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
17
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
18
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
19
|
+
# details. #
|
|
20
|
+
# #
|
|
21
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
22
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
23
|
+
# #
|
|
24
|
+
################################################################################
|
|
25
|
+
|
|
26
|
+
from __future__ import annotations
|
|
27
|
+
|
|
28
|
+
from typing import TYPE_CHECKING, Any
|
|
29
|
+
|
|
30
|
+
import githubasyncio.AdvisoryVulnerabilityPackage
|
|
31
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
32
|
+
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
from githubasyncio.AdvisoryVulnerabilityPackage import AdvisoryVulnerabilityPackage
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class DependabotAlertVulnerability(NonCompletableGithubObject):
|
|
38
|
+
"""
|
|
39
|
+
A vulnerability represented in a Dependabot alert.
|
|
40
|
+
|
|
41
|
+
The OpenAPI schema can be found at
|
|
42
|
+
|
|
43
|
+
- /components/schemas/dependabot-alert-security-vulnerability
|
|
44
|
+
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def _initAttributes(self) -> None:
|
|
48
|
+
self._first_patched_version: Attribute[dict] = NotSet
|
|
49
|
+
self._package: Attribute[AdvisoryVulnerabilityPackage] = NotSet
|
|
50
|
+
self._severity: Attribute[str] = NotSet
|
|
51
|
+
self._vulnerable_version_range: Attribute[str | None] = NotSet
|
|
52
|
+
|
|
53
|
+
def __repr__(self) -> str:
|
|
54
|
+
return self.get__repr__({"package": self.package, "severity": self.severity})
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def first_patched_version(self) -> dict:
|
|
58
|
+
return self._first_patched_version.value
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def package(self) -> AdvisoryVulnerabilityPackage:
|
|
62
|
+
return self._package.value
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def severity(self) -> str:
|
|
66
|
+
return self._severity.value
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def vulnerable_version_range(self) -> str | None:
|
|
70
|
+
return self._vulnerable_version_range.value
|
|
71
|
+
|
|
72
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
73
|
+
if "first_patched_version" in attributes:
|
|
74
|
+
self._first_patched_version = self._makeDictAttribute(
|
|
75
|
+
attributes["first_patched_version"],
|
|
76
|
+
)
|
|
77
|
+
if "package" in attributes:
|
|
78
|
+
self._package = self._makeClassAttribute(
|
|
79
|
+
githubasyncio.AdvisoryVulnerabilityPackage.AdvisoryVulnerabilityPackage,
|
|
80
|
+
attributes["package"],
|
|
81
|
+
)
|
|
82
|
+
if "severity" in attributes:
|
|
83
|
+
self._severity = self._makeStringAttribute(attributes["severity"])
|
|
84
|
+
if "vulnerable_version_range" in attributes:
|
|
85
|
+
self._vulnerable_version_range = self._makeStringAttribute(attributes["vulnerable_version_range"])
|