add ref to Deployment (#2489)

Co-authored-by: Nevins Bartolomeo <nevins@sev.co>
This commit is contained in:
Nevins
2023-05-23 10:23:58 -04:00
committed by GitHub
co-authored by Nevins Bartolomeo
parent 8e8cfb3038
commit e8075c41dd
3 changed files with 16 additions and 0 deletions
+11
View File
@@ -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"]
+2
View File
@@ -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]: ...