Package org.kohsuke.github
Class GHDeployment
java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHDeployment
Represents a deployment.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GHUserThe creator.protected StringThe description.protected StringThe environment.protected StringThe original environment.protected ObjectThe payload.protected booleanThe production environment.protected StringThe ref.protected StringThe repository url.protected StringThe sha.protected StringThe statuses url.protected StringThe task.protected booleanThe transient environment.Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateStatus(GHDeploymentState state) Create status gh deployment status builder.Gets creator.Gets environment.Deprecated.This object has no HTML URL.Deprecated.until preview feature has graduated to stableGets payload.Gets payload.Gets payload without assuming its type.getRef()Gets ref.Gets repository url.getRoot()Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.getSha()Gets sha.Gets statuses url.getTask()Gets task.booleanDeprecated.until preview feature has graduated to stablebooleanDeprecated.until preview feature has graduated to stableList statuses paged iterable.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Field Details
-
sha
The sha. -
ref
The ref. -
task
The task. -
payload
The payload. -
environment
The environment. -
description
The description. -
statuses_url
The statuses url. -
repository_url
The repository url. -
creator
The creator. -
original_environment
The original environment. -
transient_environment
protected boolean transient_environmentThe transient environment. -
production_environment
protected boolean production_environmentThe production environment.
-
-
Constructor Details
-
GHDeployment
public GHDeployment()Create default GHDeployment instance
-
-
Method Details
-
getStatusesUrl
Gets statuses url.- Returns:
- the statuses url
-
getRepositoryUrl
Gets repository url.- Returns:
- the repository url
-
getTask
Gets task.- Returns:
- the task
-
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
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
Gets payload without assuming its type. It could be a String or a Map.- Returns:
- the payload
-
getOriginalEnvironment
Deprecated.until preview feature has graduated to stableThe environment defined when the deployment was first created.- Returns:
- the original deployment environment
-
getEnvironment
Gets environment.- Returns:
- the environment
-
isTransientEnvironment
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
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
Gets creator.- Returns:
- the creator
- Throws:
IOException- the io exception
-
getRef
Gets ref.- Returns:
- the ref
-
getSha
Gets sha.- Returns:
- the sha
-
getHtmlUrl
Deprecated.This object has no HTML URL.Gets the html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- the html url
-
createStatus
Create status gh deployment status builder.- Parameters:
state- the state- Returns:
- the gh deployment status builder
-
listStatuses
List statuses paged iterable.- Returns:
- the paged iterable
-
getRoot
Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.Get the rootGitHubinstance for this object.- Returns:
- the root
GitHubinstance
-