Interface PushEvent
-
- All Known Implementing Classes:
ImmutablePushEvent
@Immutable public interface PushEventTriggered when a repository branch is pushed to. In addition to branch pushes, webhook push events are also triggered when repository tags are pushed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringafter()SHA of the repository state after the push.Optional<String>baseRef()Base referenceStringbefore()The SHA of the most recent commit on ref before the push.List<PushCommit>commits()An array of commit objects describing the pushed commits.Stringcompare()Compare API URL This is a string because of malformed URIs sent from github.Booleancreated()True if given reference was createdBooleandeleted()True if given reference was deletedBooleanforced()True if given reference was force pushedOptional<PushCommit>headCommit()The push commit object of the most recent commit on ref after the push.Authorpusher()PusherStringref()The full Git ref that was pushed.PushRepositoryrepository()ThePushRepositoryUsersender()TheUserthat triggered/sent the event.
-
-
-
Method Detail
-
repository
@Nullable PushRepository repository()
ThePushRepository
-
ref
@Nullable String ref()
The full Git ref that was pushed. Example: "refs/heads/master".
-
before
@Nullable String before()
The SHA of the most recent commit on ref before the push.
-
after
@Nullable String after()
SHA of the repository state after the push.
-
created
@Nullable Boolean created()
True if given reference was created
-
deleted
@Nullable Boolean deleted()
True if given reference was deleted
-
forced
@Nullable Boolean forced()
True if given reference was force pushed
-
compare
@Nullable String compare()
Compare API URL This is a string because of malformed URIs sent from github. They send unencoded '^' in the uri path.
-
commits
@Nullable List<PushCommit> commits()
An array of commit objects describing the pushed commits. (The array includes a maximum of 20 commits. If necessary, you can use the Commits API to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries.)
-
headCommit
Optional<PushCommit> headCommit()
The push commit object of the most recent commit on ref after the push.
-
pusher
@Nullable Author pusher()
Pusher
-
-