Add support for deployment statuses (#1588)

* Added DeploymentStatus class
* Added stubs for DeploymentStatus class
* Fixed headers for DeploymentStatus.py
* Added get/list/create deployment status methods
* Added DeploymentStatus repr
* Added attribute check tests for DeploymentStatus
* Added "create deployment status" test
* Added test for Deployment.get_statuses()
* Added Deployment.get_status() method

Fixes #1586
This commit is contained in:
Colby Gallup
2020-07-02 12:27:05 +10:00
committed by GitHub
parent 079f75a726
commit 048c8a1df2
9 changed files with 437 additions and 2 deletions
+12 -2
View File
@@ -1,13 +1,23 @@
from datetime import datetime
from typing import Any, Dict
from typing import Any, Dict, Union
from github.GithubObject import CompletableGithubObject
from github.DeploymentStatus import DeploymentStatus
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.NamedUser import NamedUser
from github.PaginatedList import PaginatedList
class Deployment(CompletableGithubObject):
def __repr__(self) -> str: ...
def _initAttributes(self) -> None: ...
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
def get_statuses(self) -> PaginatedList[DeploymentStatus]: ...
def get_status(self, id_: int) -> DeploymentStatus: ...
def create_status(
self,
state: str,
target_url: Union[str, _NotSetType] = ...,
description: Union[str, _NotSetType] = ...,
) -> DeploymentStatus: ...
@property
def id(self) -> int: ...
@property