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:
- push event
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GHEventPayload.Push.PushCommit
Commit in a push.static class
GHEventPayload.Push.Pusher
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.Fork, GHEventPayload.Installation, GHEventPayload.InstallationRepositories, GHEventPayload.Issue, GHEventPayload.IssueComment, GHEventPayload.Label, GHEventPayload.Ping, GHEventPayload.ProjectsV2Item, GHEventPayload.Public, GHEventPayload.PullRequest, GHEventPayload.PullRequestReview, GHEventPayload.PullRequestReviewComment, GHEventPayload.Push, GHEventPayload.Release, GHEventPayload.Repository, GHEventPayload.Star, GHEventPayload.Status, GHEventPayload.WorkflowDispatch, GHEventPayload.WorkflowJob, GHEventPayload.WorkflowRun
-
-
Constructor Summary
Constructors Constructor Description Push()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getBefore()
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.String
getCompare()
Gets compare.String
getHead()
The SHA of the HEAD commit on the repository.GHEventPayload.Push.PushCommit
getHeadCommit()
The head commit of the push.GHEventPayload.Push.Pusher
getPusher()
Gets pusher.String
getRef()
The full Git ref that was pushed.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.int
getSize()
The number of commits in the push.boolean
isCreated()
Is created boolean.boolean
isDeleted()
Is deleted boolean.boolean
isForced()
Is forced boolean.void
setPusher(GHEventPayload.Push.Pusher pusher)
Deprecated.Do not use this method.-
Methods inherited from class org.kohsuke.github.GHEventPayload
getAction, getInstallation, getOrganization, getRepository, getSender, setOrganization, setRepository, 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/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
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
-
setPusher
@Deprecated public void setPusher(GHEventPayload.Push.Pusher pusher)
Deprecated.Do not use this method. It was added due to incomplete understanding of Jackson binding.Sets pusher.- Parameters:
pusher
- the pusher
-
getCompare
public String getCompare()
Gets compare.- Returns:
- compare
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
-