Add Secret and Variable classes (#2623)

Co-authored-by: Enrico Minack <github@enrico.minack.dev>
This commit is contained in:
Mauricio Alejandro Martínez Pacheco
2023-08-10 10:06:44 +02:00
committed by GitHub
co-authored by Enrico Minack
parent 7cfa476187
commit bcca758d13
19 changed files with 865 additions and 157 deletions
+8 -3
View File
@@ -57,6 +57,7 @@ from github.RepositoryAdvisoryVulnerability import (
)
from github.RepositoryKey import RepositoryKey
from github.RepositoryPreferences import RepositoryPreferences
from github.Secret import Secret
from github.SelfHostedActionsRunner import SelfHostedActionsRunner
from github.SourceImport import SourceImport
from github.Stargazer import Stargazer
@@ -67,6 +68,7 @@ from github.StatsParticipation import StatsParticipation
from github.StatsPunchCard import StatsPunchCard
from github.Tag import Tag
from github.Team import Team
from github.Variable import Variable
from github.View import View
from github.Workflow import Workflow
from github.WorkflowRun import WorkflowRun
@@ -282,9 +284,12 @@ class Repository(CompletableGithubObject):
def create_repository_dispatch(
self, event_type: str, client_payload: Union[Dict[str, Any], _NotSetType] = ...
) -> bool: ...
def create_secret(self, secret_name: str, unencrypted_value: str) -> bool: ...
def create_variable(self, variable_name: str, value: str) -> bool: ...
def update_variable(self, variable_name: str, value: str) -> bool: ...
def get_secrets(self) -> PaginatedList[Secret]: ...
def get_secret(self, secret_name: str) -> Secret: ...
def create_secret(self, secret_name: str, unencrypted_value: str) -> Secret: ...
def get_variables(self) -> PaginatedList[Variable]: ...
def get_variable(self, variable_name: str) -> Variable: ...
def create_variable(self, variable_name: str, value: str) -> Variable: ...
def delete_secret(self, secret_name: str) -> bool: ...
def delete_variable(self, variable_name: str) -> bool: ...
def create_source_import(