mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
add ref to Deployment (#2489)
Co-authored-by: Nevins Bartolomeo <nevins@sev.co>
This commit is contained in:
co-authored by
Nevins Bartolomeo
parent
8e8cfb3038
commit
e8075c41dd
@@ -43,6 +43,14 @@ class Deployment(github.GithubObject.CompletableGithubObject):
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._id.value
|
||||
|
||||
@property
|
||||
def ref(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._ref)
|
||||
return self._ref.value
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
@@ -254,6 +262,7 @@ class Deployment(github.GithubObject.CompletableGithubObject):
|
||||
def _initAttributes(self):
|
||||
self._id = github.GithubObject.NotSet
|
||||
self._production_environment = github.GithubObject.NotSet
|
||||
self._ref = github.GithubObject.NotSet
|
||||
self._transient_environment = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._sha = github.GithubObject.NotSet
|
||||
@@ -275,6 +284,8 @@ class Deployment(github.GithubObject.CompletableGithubObject):
|
||||
self._production_environment = self._makeBoolAttribute(
|
||||
attributes["production_environment"]
|
||||
)
|
||||
if "ref" in attributes: # pragma no branch
|
||||
self._ref = self._makeStringAttribute(attributes["ref"])
|
||||
if "transient_environment" in attributes: # pragma no branch
|
||||
self._transient_environment = self._makeBoolAttribute(
|
||||
attributes["transient_environment"]
|
||||
|
||||
@@ -30,6 +30,8 @@ class Deployment(CompletableGithubObject):
|
||||
@property
|
||||
def sha(self) -> str: ...
|
||||
@property
|
||||
def ref(self) -> str: ...
|
||||
@property
|
||||
def task(self) -> str: ...
|
||||
@property
|
||||
def payload(self) -> Dict[str, Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user