Skip to content

Commit

Permalink
Merge pull request #21 from cortexapps/ef/add-paging
Browse files Browse the repository at this point in the history
Add starting page option
  • Loading branch information
eyalfoni committed Dec 13, 2023
2 parents b304184 + 55e79ff commit 569dac4
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.kohsuke</groupId>
<artifactId>cortexapps-github-api</artifactId>
<version>1.317</version>
<version>1.318</version>
<name>GitHub API for Java</name>
<url>https://github-api.kohsuke.org/</url>
<description>GitHub API for Java</description>
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/kohsuke/github/GHCommitQueryBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ public GHCommitQueryBuilder until(long timestamp) {
return until(new Date(timestamp));
}

/**
* Page gh commit query builder.
*
* @param page
* the page
* @return the gh commit query builder
*/
public GHCommitQueryBuilder page(int page) {
req.with("page", page);
return this;
}

/**
* Lists up the commits with the criteria built so far.
*
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ public GHCommitSearchBuilder sort(Sort sort) {
return this;
}

/**
* Page gh commit search builder.
*
* @param page
* the page
* @return the gh commit search builder
*/
public GHCommitSearchBuilder page(int page) {
req.with("page", page);
return this;
}

/**
* The enum Sort.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/kohsuke/github/GHContentSearchBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ public GHContentSearchBuilder sort(GHContentSearchBuilder.Sort sort) {
return this;
}

/**
* Page gh content search builder.
*
* @param page
* the page
* @return the gh content search builder
*/
public GHContentSearchBuilder page(int page) {
req.with("page", page);
return this;
}

/**
* The enum Sort.
*/
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/kohsuke/github/GHIssueSearchBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ public GHIssueSearchBuilder sort(Sort sort) {
return this;
}

/**
* Page gh content search builder.
*
* @param page
* the page
* @return the gh content search builder
*/
public GHIssueSearchBuilder page(int page) {
req.with("page", page);
return this;
}

/**
* The enum Sort.
*/
Expand Down

0 comments on commit 569dac4

Please sign in to comment.