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,141 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
5
|
+
# Copyright 2023 Mauricio Alejandro Martínez Pacheco <mauricio.martinez@premise.com>#
|
|
6
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
7
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
8
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
9
|
+
# Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
|
|
10
|
+
# Copyright 2026 Krishna Chaitanya <krishnabkc15@gmail.com> #
|
|
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 TYPE_CHECKING, Any
|
|
33
|
+
|
|
34
|
+
import githubasyncio.Repository
|
|
35
|
+
from githubasyncio.GithubObject import Attribute, NotSet
|
|
36
|
+
from githubasyncio.PaginatedList import PaginatedList
|
|
37
|
+
from githubasyncio.Variable import Variable
|
|
38
|
+
|
|
39
|
+
if TYPE_CHECKING:
|
|
40
|
+
from githubasyncio.Repository import Repository
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class OrganizationVariable(Variable):
|
|
44
|
+
"""
|
|
45
|
+
This class represents a org level GitHub variable.
|
|
46
|
+
|
|
47
|
+
The reference can be found here
|
|
48
|
+
https://docs.github.com/en/rest/actions/variables
|
|
49
|
+
|
|
50
|
+
The OpenAPI schema can be found at
|
|
51
|
+
|
|
52
|
+
- /components/schemas/organization-actions-variable
|
|
53
|
+
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
def _initAttributes(self) -> None:
|
|
57
|
+
super()._initAttributes()
|
|
58
|
+
self._selected_repositories_url: Attribute[str] = NotSet
|
|
59
|
+
self._visibility: Attribute[str] = NotSet
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
async def selected_repositories(self) -> PaginatedList[Repository]:
|
|
63
|
+
return PaginatedList(
|
|
64
|
+
githubasyncio.Repository.Repository,
|
|
65
|
+
self._requester,
|
|
66
|
+
await self.selected_repositories_url,
|
|
67
|
+
None,
|
|
68
|
+
list_item="repositories",
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
async def selected_repositories_url(self) -> str:
|
|
73
|
+
await self._completeIfNotSet(self._selected_repositories_url)
|
|
74
|
+
return self._selected_repositories_url.value
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
async def visibility(self) -> str:
|
|
78
|
+
"""
|
|
79
|
+
:type: string
|
|
80
|
+
"""
|
|
81
|
+
await self._completeIfNotSet(self._visibility)
|
|
82
|
+
return self._visibility.value
|
|
83
|
+
|
|
84
|
+
async def edit(
|
|
85
|
+
self,
|
|
86
|
+
value: str,
|
|
87
|
+
visibility: str = "all",
|
|
88
|
+
) -> bool:
|
|
89
|
+
"""
|
|
90
|
+
:calls: `PATCH /orgs/{org}/actions/variables/{name} <https://docs.github.com/en/rest/reference/actions/variables#update-an-organization-variable>`_
|
|
91
|
+
:param variable_name: string
|
|
92
|
+
:param value: string
|
|
93
|
+
:param visibility: string
|
|
94
|
+
:rtype: bool
|
|
95
|
+
"""
|
|
96
|
+
assert isinstance(value, str), value
|
|
97
|
+
assert isinstance(visibility, str), visibility
|
|
98
|
+
|
|
99
|
+
patch_parameters: dict[str, Any] = {
|
|
100
|
+
"name": await self.name,
|
|
101
|
+
"value": value,
|
|
102
|
+
"visibility": visibility,
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
status, _, _ = await self._requester.requestJson(
|
|
106
|
+
"PATCH",
|
|
107
|
+
await self.url,
|
|
108
|
+
input=patch_parameters,
|
|
109
|
+
)
|
|
110
|
+
return status == 204
|
|
111
|
+
|
|
112
|
+
async def add_repo(self, repo: Repository) -> bool:
|
|
113
|
+
"""
|
|
114
|
+
:calls: `PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id} <https://docs.github.com/en/rest/actions/variables#add-selected-repository-to-an-organization-secret>`_
|
|
115
|
+
:param repo: githubasyncio.Repository.Repository
|
|
116
|
+
:rtype: bool
|
|
117
|
+
"""
|
|
118
|
+
if (await self.visibility) != "selected":
|
|
119
|
+
return False
|
|
120
|
+
await self._requester.requestJsonAndCheck("PUT", f"{self._selected_repositories_url.value}/{(await repo.id)}")
|
|
121
|
+
return True
|
|
122
|
+
|
|
123
|
+
async def remove_repo(self, repo: Repository) -> bool:
|
|
124
|
+
"""
|
|
125
|
+
:calls: `DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id} <https://docs.github.com/en/rest/actions/variables#add-selected-repository-to-an-organization-secret>`_
|
|
126
|
+
:param repo: githubasyncio.Repository.Repository
|
|
127
|
+
:rtype: bool
|
|
128
|
+
"""
|
|
129
|
+
if (await self.visibility) != "selected":
|
|
130
|
+
return False
|
|
131
|
+
await self._requester.requestJsonAndCheck(
|
|
132
|
+
"DELETE", f"{self._selected_repositories_url.value}/{(await repo.id)}"
|
|
133
|
+
)
|
|
134
|
+
return True
|
|
135
|
+
|
|
136
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
137
|
+
super()._useAttributes(attributes)
|
|
138
|
+
if "selected_repositories_url" in attributes:
|
|
139
|
+
self._selected_repositories_url = self._makeStringAttribute(attributes["selected_repositories_url"])
|
|
140
|
+
if "visibility" in attributes:
|
|
141
|
+
self._visibility = self._makeStringAttribute(attributes["visibility"])
|