Class GHEventPayload.Push

java.lang.Object
org.kohsuke.github.GHEventPayload
org.kohsuke.github.GHEventPayload.Push
Enclosing class:
GHEventPayload

public static class GHEventPayload.Push extends GHEventPayload
A commit was pushed.
See Also:
  • Constructor Details

    • Push

      public Push()
      Create default Push instance
  • Method Details

    • getHead

      public String getHead()
      The SHA of the HEAD commit on the repository.
      Returns:
      the head
    • getBefore

      public String getBefore()
      This is undocumented, but it looks like this captures the commit that the ref was pointing to before the push.
      Returns:
      the before
    • getRef

      public String getRef()
      The full Git ref that was pushed. Example: “refs/heads/main”
      Returns:
      the ref
    • getSize

      public int getSize()
      The number of commits in the push. Is this always the same as getCommits().size()?
      Returns:
      the size
    • isCreated

      public boolean isCreated()
      Is created boolean.
      Returns:
      the boolean
    • isDeleted

      public boolean isDeleted()
      Is deleted boolean.
      Returns:
      the boolean
    • isForced

      public boolean isForced()
      Is forced boolean.
      Returns:
      the boolean
    • getCommits

      public List<GHEventPayload.Push.PushCommit> getCommits()
      The list of pushed commits.
      Returns:
      the commits
    • getHeadCommit

      public GHEventPayload.Push.PushCommit getHeadCommit()
      The head commit of the push.
      Returns:
      the commit
    • getPusher

      public GHEventPayload.Push.Pusher getPusher()
      Gets pusher.
      Returns:
      the pusher
    • getCompare

      public String getCompare()
      Gets compare.
      Returns:
      compare