Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d96bf3

Browse files
committed
1 parent45f8a5e commit6d96bf3

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎github3/repos/deployment.py‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: utf-8 -*-
22
from __future__importunicode_literals
3-
fromjsonimportloads
43

54
fromgithub3.modelsimportGitHubCore
65
fromgithub3.usersimportUser
@@ -21,6 +20,10 @@ def __init__(self, deployment, session=None):
2120
#: SHA of the branch on GitHub
2221
self.sha=deployment.get('sha')
2322

23+
#: The reference used to create the Deployment, e.g.,
24+
#: `deploy-20140526`
25+
self.ref=deployment.get('ref')
26+
2427
#: User object representing the creator of the deployment
2528
self.creator=deployment.get('creator')
2629
ifself.creator:
@@ -38,6 +41,9 @@ def __init__(self, deployment, session=None):
3841
#: Description of the deployment
3942
self.description=deployment.get('description')
4043

44+
#: Target for the deployment, e.g., 'production', 'staging'
45+
self.environment=deployment.get('environment')
46+
4147
#: URL to get the statuses of this deployment
4248
self.statuses_url=deployment.get('statuses_url')
4349

@@ -113,5 +119,14 @@ def __init__(self, status, session=None):
113119
#: Description of the deployment
114120
self.description=status.get('description')
115121

122+
#: :class:`Deployment` representing the deployment this status is
123+
#: associated with
124+
self.deployment=status.get('deployment')
125+
ifself.deployment:
126+
self.deployment=Deployment(self.deployment,self)
127+
128+
#: URL for the deployment this status is associated with
129+
self.deployment_url=status.get('deployment_url')
130+
116131
def_repr(self):
117132
return'<DeploymentStatus [{0}]>'.format(self.id)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp