File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1052,6 +1052,17 @@ def delete_subscription(self):
1052
1052
url = self ._build_url ('subscription' , base_url = self ._api )
1053
1053
return self ._boolean (self ._delete (url ), 204 , 404 )
1054
1054
1055
+ def deployment (self , id ):
1056
+ """Retrieve the deployment identified by ``id``.
1057
+
1058
+ :param int id: (required), id for deployments.
1059
+ :returns: :class:`~github3.repos.deployment.Deployment`
1060
+ """
1061
+ if int (id ) > 0 :
1062
+ url = self ._build_url ('deployments' , str (id ), base_url = self ._api )
1063
+ json = self ._json (self ._get (url ), 200 )
1064
+ return self ._instance_or_null (Deployment , json )
1065
+
1055
1066
def deployments (self , number = - 1 , etag = None ):
1056
1067
r"""Iterate over deployments for this repository.
1057
1068
You can’t perform that action at this time.
0 commit comments