Class GHEventInfo

java.lang.Object
org.kohsuke.github.GHEventInfo

public class GHEventInfo extends Object
Represents an event.
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • GHEventInfo

      public GHEventInfo()
  • Method Details

    • getType

      public GHEvent getType()
      Gets type.
      Returns:
      the type
    • getId

      public long getId()
      Gets id.
      Returns:
      the id
    • getCreatedAt

      public Date getCreatedAt()
      Gets created at.
      Returns:
      the created at
    • getRepository

      public GHRepository getRepository() throws IOException
      Gets repository.
      Returns:
      Repository where the change was made.
      Throws:
      IOException - on error
    • getActor

      public GHUser getActor() throws IOException
      Gets actor.
      Returns:
      the GHUser actor for this event.
      Throws:
      IOException - on error
    • getActorLogin

      public String getActorLogin() throws IOException
      Gets actor login.
      Returns:
      the login of the actor.
      Throws:
      IOException - on error
    • getOrganization

      public GHOrganization getOrganization() throws IOException
      Gets organization.
      Returns:
      the organization
      Throws:
      IOException - the io exception
    • getPayload

      public <T extends GHEventPayload> T getPayload(Class<T> type) throws IOException
      Retrieves the payload.
      Type Parameters:
      T - the type parameter
      Parameters:
      type - Specify one of the GHEventPayload subtype that defines a type-safe access to the payload. This must match the event type.
      Returns:
      parsed event payload
      Throws:
      IOException - if payload cannot be parsed
    • getRoot

      @Deprecated public GitHub getRoot()
      Deprecated.
      For access to the GitHub instance, use a local copy instead of pulling it out of objects.
      Get the root GitHub instance for this object.
      Returns:
      the root GitHub instance