Interface PushEvent
-
- All Known Implementing Classes:
ImmutablePushEvent
@Immutable public interface PushEvent
Triggered 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 String
after()
SHA of the repository state after the push.Optional<String>
baseRef()
Base referenceString
before()
The SHA of the most recent commit on ref before the push.List<PushCommit>
commits()
An array of commit objects describing the pushed commits.String
compare()
Compare API URL This is a string because of malformed URIs sent from github.Boolean
created()
True if given reference was createdBoolean
deleted()
True if given reference was deletedBoolean
forced()
True if given reference was force pushedOptional<PushCommit>
headCommit()
The push commit object of the most recent commit on ref after the push.Author
pusher()
PusherString
ref()
The full Git ref that was pushed.PushRepository
repository()
ThePushRepository
User
sender()
TheUser
that 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
@Nullable Optional<PushCommit> headCommit()
The push commit object of the most recent commit on ref after the push.
-
pusher
@Nullable Author pusher()
Pusher
-
-