mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Add support for environments (#2223)
This commit is contained in:
@@ -14,6 +14,11 @@ from github.Comparison import Comparison
|
||||
from github.ContentFile import ContentFile
|
||||
from github.Deployment import Deployment
|
||||
from github.Download import Download
|
||||
from github.Environment import Environment
|
||||
from github.EnvironmentDeploymentBranchPolicy import (
|
||||
EnvironmentDeploymentBranchPolicyParams,
|
||||
)
|
||||
from github.EnvironmentProtectionRuleReviewer import ReviewerParams
|
||||
from github.Event import Event
|
||||
from github.GitBlob import GitBlob
|
||||
from github.GitCommit import GitCommit
|
||||
@@ -142,6 +147,15 @@ class Repository(CompletableGithubObject):
|
||||
) -> Deployment: ...
|
||||
def get_repository_advisories(self) -> PaginatedList[RepositoryAdvisory]: ...
|
||||
def get_repository_advisory(self, ghsa: str) -> RepositoryAdvisory: ...
|
||||
def create_environment(
|
||||
self,
|
||||
environment_name: str,
|
||||
wait_timer: int = ...,
|
||||
reviewers: List[ReviewerParams] = ...,
|
||||
deployment_branch_policy: Optional[
|
||||
EnvironmentDeploymentBranchPolicyParams
|
||||
] = ...,
|
||||
) -> Environment: ...
|
||||
def create_file(
|
||||
self,
|
||||
path: str,
|
||||
@@ -287,6 +301,7 @@ class Repository(CompletableGithubObject):
|
||||
@property
|
||||
def default_branch(self) -> str: ...
|
||||
def delete(self) -> None: ...
|
||||
def delete_environment(self, environment_name: str) -> None: ...
|
||||
def delete_file(
|
||||
self,
|
||||
path: str,
|
||||
@@ -392,6 +407,8 @@ class Repository(CompletableGithubObject):
|
||||
) -> List[ContentFile]: ...
|
||||
def get_download(self, id: int) -> Download: ...
|
||||
def get_downloads(self) -> PaginatedList[Download]: ...
|
||||
def get_environments(self) -> PaginatedList[Environment]: ...
|
||||
def get_environment(self, environment_name: str) -> Environment: ...
|
||||
def get_events(self) -> PaginatedList[Event]: ...
|
||||
def get_forks(self) -> PaginatedList[Repository]: ...
|
||||
def create_fork(
|
||||
@@ -644,6 +661,15 @@ class Repository(CompletableGithubObject):
|
||||
@property
|
||||
def trees_url(self) -> str: ...
|
||||
def unsubscribe_from_hub(self, event: str, callback: str) -> None: ...
|
||||
def update_environment(
|
||||
self,
|
||||
environment_name: str,
|
||||
wait_timer: int = ...,
|
||||
reviewers: List[ReviewerParams] = ...,
|
||||
deployment_branch_policy: Optional[
|
||||
EnvironmentDeploymentBranchPolicyParams
|
||||
] = ...,
|
||||
) -> Environment: ...
|
||||
def update_file(
|
||||
self,
|
||||
path: str,
|
||||
|
||||
Reference in New Issue
Block a user