Class GHDeployment

java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHDeployment

public class GHDeployment extends GHObject
Represents a deployment.
See Also:
  • Field Details

    • 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.
  • Constructor Details

    • GHDeployment

      public GHDeployment()
      Create default GHDeployment instance
  • Method Details

    • 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 use getPayloadObject().
      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 use getPayloadObject().
      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

      public String getOriginalEnvironment()
      The environment defined when the deployment was first created.
      Returns:
      the original deployment environment
    • getEnvironment

      public String 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

      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
    • 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