Package org.kohsuke.github
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:
- authoritative source
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGHEventPayload.Push.PushCommitCommit in a pushstatic classGHEventPayload.Push.PusherThe type Pusher.-
Nested classes/interfaces inherited from class org.kohsuke.github.GHEventPayload
GHEventPayload.CommitComment, GHEventPayload.Create, GHEventPayload.Delete, GHEventPayload.Deployment, GHEventPayload.DeploymentStatus, GHEventPayload.Fork, GHEventPayload.Issue, GHEventPayload.IssueComment, GHEventPayload.Ping, GHEventPayload.Public, GHEventPayload.PullRequest, GHEventPayload.PullRequestReview, GHEventPayload.PullRequestReviewComment, GHEventPayload.Push, GHEventPayload.Release, GHEventPayload.Repository
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHEventPayload
root
-
-
Constructor Summary
Constructors Constructor Description Push()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBefore()This is undocumented, but it looks like this captures the commit that the ref was pointing to before the push.List<GHEventPayload.Push.PushCommit>getCommits()The list of pushed commits.StringgetHead()The SHA of the HEAD commit on the repositoryGHEventPayload.Push.PushergetPusher()Gets pusher.StringgetRef()The full Git ref that was pushed.GHRepositorygetRepository()Gets repository.intgetSize()The number of commits in the push.booleanisCreated()Is created boolean.booleanisDeleted()Is deleted boolean.booleanisForced()Is forced boolean.voidsetPusher(GHEventPayload.Push.Pusher pusher)Sets pusher.-
Methods inherited from class org.kohsuke.github.GHEventPayload
getSender, setSender
-
-
-
-
Method Detail
-
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/master”- Returns:
- the ref
-
getSize
public int getSize()
The number of commits in the push. Is this always the same asgetCommits().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
-
getRepository
public GHRepository getRepository()
Gets repository.- Returns:
- the repository
-
getPusher
public GHEventPayload.Push.Pusher getPusher()
Gets pusher.- Returns:
- the pusher
-
setPusher
public void setPusher(GHEventPayload.Push.Pusher pusher)
Sets pusher.- Parameters:
pusher- the pusher
-
-