java.lang.Object
org.kohsuke.github.GHEventInfo
Represents an event.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInside the event JSON model, GitHub uses a slightly different format. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActor()Gets actor.Gets actor login.Gets created at.longgetId()Gets id.Gets organization.<T extends GHEventPayload>
TgetPayload(Class<T> type) Retrieves the payload.Gets repository.getType()Gets type.
-
Constructor Details
-
GHEventInfo
public GHEventInfo()Create default GHEventInfo instance
-
-
Method Details
-
getActor
Gets actor.- Returns:
- the
GHUseractor for this event. - Throws:
IOException- on error
-
getActorLogin
Gets actor login.- Returns:
- the login of the actor.
-
getCreatedAt
@WithBridgeMethods(value=java.util.Date.class, adapterMethod="instantToDate") public Instant getCreatedAt()Gets created at.- Returns:
- the created at
-
getId
public long getId()Gets id.- Returns:
- the id
-
getOrganization
Gets organization.- Returns:
- the organization
- Throws:
IOException- the io exception
-
getPayload
Retrieves the payload.- Type Parameters:
T- the type parameter- Parameters:
type- Specify one of theGHEventPayloadsubtype 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
-
getRepository
Gets repository.- Returns:
- Repository where the change was made.
- Throws:
IOException- on error
-
getType
Gets type.- Returns:
- the type
-