java.lang.Object
org.kohsuke.github.GHEventPayload
org.kohsuke.github.GHEventPayload.Push
- Enclosing class:
- GHEventPayload
A commit was pushed.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Commit in a push.static class
The type Pusher.Nested classes/interfaces inherited from class org.kohsuke.github.GHEventPayload
GHEventPayload.CheckRun, GHEventPayload.CheckSuite, GHEventPayload.CommentChanges, GHEventPayload.CommitComment, GHEventPayload.Create, GHEventPayload.Delete, GHEventPayload.Deployment, GHEventPayload.DeploymentStatus, GHEventPayload.Discussion, GHEventPayload.DiscussionComment, GHEventPayload.Fork, GHEventPayload.Installation, GHEventPayload.InstallationRepositories, GHEventPayload.Issue, GHEventPayload.IssueComment, GHEventPayload.Label, GHEventPayload.Member, GHEventPayload.Membership, GHEventPayload.Ping, GHEventPayload.ProjectsV2Item, GHEventPayload.Public, GHEventPayload.PullRequest, GHEventPayload.PullRequestReview, GHEventPayload.PullRequestReviewComment, GHEventPayload.Push, GHEventPayload.Release, GHEventPayload.Repository, GHEventPayload.Star, GHEventPayload.Status, GHEventPayload.Team, GHEventPayload.TeamAdd, GHEventPayload.WorkflowDispatch, GHEventPayload.WorkflowJob, GHEventPayload.WorkflowRun
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis is undocumented, but it looks like this captures the commit that the ref was pointing to before the push.The list of pushed commits.Gets compare.getHead()
The SHA of the HEAD commit on the repository.The head commit of the push.Gets pusher.getRef()
The full Git ref that was pushed.int
getSize()
The number of commits in the push.boolean
Is created boolean.boolean
Is deleted boolean.boolean
isForced()
Is forced boolean.Methods inherited from class org.kohsuke.github.GHEventPayload
getAction, getInstallation, getOrganization, getRepository, getSender
-
Constructor Details
-
Push
public Push()Create default Push instance
-
-
Method Details
-
getHead
The SHA of the HEAD commit on the repository.- Returns:
- the head
-
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
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 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
The list of pushed commits.- Returns:
- the commits
-
getHeadCommit
The head commit of the push.- Returns:
- the commit
-
getPusher
Gets pusher.- Returns:
- the pusher
-
getCompare
Gets compare.- Returns:
- compare
-