Package org.kohsuke.github
Class GHDeployment
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHDeployment
-
public class GHDeployment extends GHObject
Represents a deployment.
-
-
Field Summary
Fields Modifier and Type Field Description protected GHUser
creator
The creator.protected String
description
The description.protected String
environment
The environment.protected String
original_environment
The original environment.protected Object
payload
The payload.protected boolean
production_environment
The production environment.protected String
ref
The ref.protected String
repository_url
The repository url.protected String
sha
The sha.protected String
statuses_url
The statuses url.protected String
task
The task.protected boolean
transient_environment
The transient environment.-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHDeployment()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GHDeploymentStatusBuilder
createStatus(GHDeploymentState state)
Create status gh deployment status builder.GHUser
getCreator()
Gets creator.String
getEnvironment()
Gets environment.URL
getHtmlUrl()
Deprecated.This object has no HTML URL.String
getOriginalEnvironment()
Deprecated.until preview feature has graduated to stableString
getPayload()
Gets payload.Map<String,Object>
getPayloadMap()
Gets payload.Object
getPayloadObject()
Gets payload without assuming its type.String
getRef()
Gets ref.URL
getRepositoryUrl()
Gets repository url.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.String
getSha()
Gets sha.URL
getStatusesUrl()
Gets statuses url.String
getTask()
Gets task.boolean
isProductionEnvironment()
Deprecated.until preview feature has graduated to stableboolean
isTransientEnvironment()
Deprecated.until preview feature has graduated to stablePagedIterable<GHDeploymentStatus>
listStatuses()
List statuses paged iterable.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Field Detail
-
sha
protected String sha
The sha.
-
ref
protected String ref
The ref.
-
task
protected String task
The task.
-
payload
protected Object payload
The payload.
-
environment
protected String environment
The environment.
-
description
protected String description
The description.
-
statuses_url
protected String statuses_url
The statuses url.
-
repository_url
protected String repository_url
The repository url.
-
creator
protected GHUser creator
The creator.
-
original_environment
protected String original_environment
The original environment.
-
transient_environment
protected boolean transient_environment
The transient environment.
-
production_environment
protected boolean production_environment
The production environment.
-
-
Method Detail
-
getStatusesUrl
public URL getStatusesUrl()
Gets statuses url.- Returns:
- the statuses url
-
getRepositoryUrl
public URL getRepositoryUrl()
Gets repository url.- Returns:
- the repository url
-
getTask
public String getTask()
Gets task.- Returns:
- the task
-
getPayload
public String getPayload()
Gets payload. NOTE: only use this method if you can guarantee the payload will be a simple string, otherwise usegetPayloadObject()
.- Returns:
- the payload
-
getPayloadMap
public Map<String,Object> getPayloadMap()
Gets payload. NOTE: only use this method if you can guarantee the payload will be a JSON object (Map), otherwise usegetPayloadObject()
.- Returns:
- the payload
-
getPayloadObject
public Object getPayloadObject()
Gets payload without assuming its type. It could be a String or a Map.- Returns:
- the payload
-
getOriginalEnvironment
@Preview(FLASH) public String getOriginalEnvironment()
Deprecated.until preview feature has graduated to stableThe environment defined when the deployment was first created.- Returns:
- the original deployment environment
-
getEnvironment
public String getEnvironment()
Gets environment.- Returns:
- the environment
-
isTransientEnvironment
@Preview(ANT_MAN) public boolean isTransientEnvironment()
Deprecated.until preview feature has graduated to stableSpecifies if the given environment is specific to the deployment and will no longer exist at some point in the future.- Returns:
- the environment is transient
-
isProductionEnvironment
@Preview(ANT_MAN) public boolean isProductionEnvironment()
Deprecated.until preview feature has graduated to stableSpecifies if the given environment is one that end-users directly interact with.- Returns:
- the environment is used by end-users directly
-
getCreator
public GHUser getCreator() throws IOException
Gets creator.- Returns:
- the creator
- Throws:
IOException
- the io exception
-
getRef
public String getRef()
Gets ref.- Returns:
- the ref
-
getSha
public String getSha()
Gets sha.- Returns:
- the sha
-
getHtmlUrl
public URL getHtmlUrl()
Deprecated.This object has no HTML URL.Gets the html url.- Specified by:
getHtmlUrl
in classGHObject
- Returns:
- the html url
-
createStatus
public GHDeploymentStatusBuilder createStatus(GHDeploymentState state)
Create status gh deployment status builder.- Parameters:
state
- the state- Returns:
- the gh deployment status builder
-
listStatuses
public PagedIterable<GHDeploymentStatus> listStatuses()
List statuses paged iterable.- Returns:
- the paged iterable
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
-