mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-23 00:11:24 +00:00
Add JavaDocs
Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
This commit is contained in:
@@ -16,7 +16,7 @@ import java.util.Date;
|
||||
* </pre>
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
* @see GHRepository#queryCommits()
|
||||
* @see GHRepository#queryCommits() GHRepository#queryCommits()
|
||||
*/
|
||||
public class GHCommitQueryBuilder {
|
||||
private final Requester req;
|
||||
@@ -29,6 +29,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* GItHub login or email address by which to filter by commit author.
|
||||
*
|
||||
* @param author
|
||||
* the author
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder author(String author) {
|
||||
req.with("author", author);
|
||||
@@ -37,6 +41,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Only commits containing this file path will be returned.
|
||||
*
|
||||
* @param path
|
||||
* the path
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder path(String path) {
|
||||
req.with("path", path);
|
||||
@@ -46,12 +54,22 @@ public class GHCommitQueryBuilder {
|
||||
/**
|
||||
* Specifies the SHA1 commit / tag / branch / etc to start listing commits from.
|
||||
*
|
||||
* @param ref
|
||||
* the ref
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder from(String ref) {
|
||||
req.with("sha", ref);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Page size gh commit query builder.
|
||||
*
|
||||
* @param pageSize
|
||||
* the page size
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder pageSize(int pageSize) {
|
||||
req.with("per_page", pageSize);
|
||||
return this;
|
||||
@@ -59,6 +77,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Only commits after this date will be returned
|
||||
*
|
||||
* @param dt
|
||||
* the dt
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder since(Date dt) {
|
||||
req.with("since", GitHub.printDate(dt));
|
||||
@@ -67,6 +89,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Only commits after this date will be returned
|
||||
*
|
||||
* @param timestamp
|
||||
* the timestamp
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder since(long timestamp) {
|
||||
return since(new Date(timestamp));
|
||||
@@ -74,6 +100,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Only commits before this date will be returned
|
||||
*
|
||||
* @param dt
|
||||
* the dt
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder until(Date dt) {
|
||||
req.with("until", GitHub.printDate(dt));
|
||||
@@ -82,6 +112,10 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Only commits before this date will be returned
|
||||
*
|
||||
* @param timestamp
|
||||
* the timestamp
|
||||
* @return the gh commit query builder
|
||||
*/
|
||||
public GHCommitQueryBuilder until(long timestamp) {
|
||||
return until(new Date(timestamp));
|
||||
@@ -89,6 +123,8 @@ public class GHCommitQueryBuilder {
|
||||
|
||||
/**
|
||||
* Lists up the commits with the criteria built so far.
|
||||
*
|
||||
* @return the paged iterable
|
||||
*/
|
||||
public PagedIterable<GHCommit> list() {
|
||||
return req.asPagedIterable(repo.getApiTailUrl("commits"), GHCommit[].class, item -> item.wrapUp(repo));
|
||||
|
||||
Reference in New Issue
Block a user