Class GHCommitQueryBuilder

java.lang.Object
org.kohsuke.github.GHCommitQueryBuilder

public class GHCommitQueryBuilder extends Object
Builds up query for listing commits.

Call various methods that set the filter criteria, then list() method to actually list up the commit.

 GHRepository r = ...;
 for (GHCommit c : r.queryCommits().since(x).until(y).author("kohsuke")) {
     ...
 }
 
Author:
Kohsuke Kawaguchi
See Also:
  • Method Details

    • author

      public GHCommitQueryBuilder author(String author)
      GItHub login or email address by which to filter by commit author.
      Parameters:
      author - the author
      Returns:
      the gh commit query builder
    • path

      public GHCommitQueryBuilder path(String path)
      Only commits containing this file path will be returned.
      Parameters:
      path - the path
      Returns:
      the gh commit query builder
    • from

      public GHCommitQueryBuilder from(String ref)
      Specifies the SHA1 commit / tag / branch / etc to start listing commits from.
      Parameters:
      ref - the ref
      Returns:
      the gh commit query builder
    • pageSize

      public GHCommitQueryBuilder pageSize(int pageSize)
      Page size gh commit query builder.
      Parameters:
      pageSize - the page size
      Returns:
      the gh commit query builder
    • since

      public GHCommitQueryBuilder since(Date dt)
      Only commits after this date will be returned.
      Parameters:
      dt - the dt
      Returns:
      the gh commit query builder
    • since

      public GHCommitQueryBuilder since(long timestamp)
      Only commits after this date will be returned.
      Parameters:
      timestamp - the timestamp
      Returns:
      the gh commit query builder
    • until

      public GHCommitQueryBuilder until(Date dt)
      Only commits before this date will be returned.
      Parameters:
      dt - the dt
      Returns:
      the gh commit query builder
    • until

      public GHCommitQueryBuilder until(long timestamp)
      Only commits before this date will be returned.
      Parameters:
      timestamp - the timestamp
      Returns:
      the gh commit query builder
    • list

      public PagedIterable<GHCommit> list()
      Lists up the commits with the criteria built so far.
      Returns:
      the paged iterable