Skip to content

Commit 569dac4

Browse files
authored
Merge pull request #21 from cortexapps/ef/add-paging
Add starting page option
2 parents b304184 + 55e79ff commit 569dac4

File tree

5 files changed

+49
-1
lines changed

5 files changed

+49
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>org.kohsuke</groupId>
44
<artifactId>cortexapps-github-api</artifactId>
5-
<version>1.317</version>
5+
<version>1.318</version>
66
<name>GitHub API for Java</name>
77
<url>https://github-api.kohsuke.org/</url>
88
<description>GitHub API for Java</description>

src/main/java/org/kohsuke/github/GHCommitQueryBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ public GHCommitQueryBuilder until(long timestamp) {
128128
return until(new Date(timestamp));
129129
}
130130

131+
/**
132+
* Page gh commit query builder.
133+
*
134+
* @param page
135+
* the page
136+
* @return the gh commit query builder
137+
*/
138+
public GHCommitQueryBuilder page(int page) {
139+
req.with("page", page);
140+
return this;
141+
}
142+
131143
/**
132144
* Lists up the commits with the criteria built so far.
133145
*

src/main/java/org/kohsuke/github/GHCommitSearchBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ public GHCommitSearchBuilder sort(Sort sort) {
238238
return this;
239239
}
240240

241+
/**
242+
* Page gh commit search builder.
243+
*
244+
* @param page
245+
* the page
246+
* @return the gh commit search builder
247+
*/
248+
public GHCommitSearchBuilder page(int page) {
249+
req.with("page", page);
250+
return this;
251+
}
252+
241253
/**
242254
* The enum Sort.
243255
*/

src/main/java/org/kohsuke/github/GHContentSearchBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,18 @@ public GHContentSearchBuilder sort(GHContentSearchBuilder.Sort sort) {
182182
return this;
183183
}
184184

185+
/**
186+
* Page gh content search builder.
187+
*
188+
* @param page
189+
* the page
190+
* @return the gh content search builder
191+
*/
192+
public GHContentSearchBuilder page(int page) {
193+
req.with("page", page);
194+
return this;
195+
}
196+
185197
/**
186198
* The enum Sort.
187199
*/

src/main/java/org/kohsuke/github/GHIssueSearchBuilder.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ public GHIssueSearchBuilder sort(Sort sort) {
104104
return this;
105105
}
106106

107+
/**
108+
* Page gh content search builder.
109+
*
110+
* @param page
111+
* the page
112+
* @return the gh content search builder
113+
*/
114+
public GHIssueSearchBuilder page(int page) {
115+
req.with("page", page);
116+
return this;
117+
}
118+
107119
/**
108120
* The enum Sort.
109121
*/

0 commit comments

Comments
 (0)