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 Detail

      • sender

        @Nullable
        User sender()
        The User that triggered/sent the event.
      • 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