java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHDeployment
Represents a deployment.
-
Field Summary
Modifier and TypeFieldDescriptionprotected GHUser
The creator.protected String
The description.protected String
The environment.protected String
The original environment.protected Object
The payload.protected boolean
The production environment.protected String
The ref.protected String
The repository url.protected String
The sha.protected String
The statuses url.protected String
The task.protected boolean
The transient environment.Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateStatus
(GHDeploymentState state) Create status gh deployment status builder.Gets creator.Gets environment.The environment defined when the deployment was first created.Gets payload.Gets payload.Gets payload without assuming its type.getRef()
Gets ref.Gets repository url.getSha()
Gets sha.Gets statuses url.getTask()
Gets task.boolean
Specifies if the given environment is one that end-users directly interact with.boolean
Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future.List 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
The environment defined when the deployment was first created.- Returns:
- the original deployment environment
-
getEnvironment
Gets environment.- Returns:
- the environment
-
isTransientEnvironment
public boolean isTransientEnvironment()Specifies 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()Specifies 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
-
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
-