Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 98cf5eb

Browse filesBrowse files
authored
Revert removal of getPullRequests (hub4j#2049)
* Revert removal of getPullRequests Method was not marked as deprecated, but was removed. Adding it back to prevent breaks. Fixes hub4j#1957 * Update src/main/java/org/kohsuke/github/GHRepository.java
1 parent fea1001 commit 98cf5eb
Copy full SHA for 98cf5eb

File tree

Expand file treeCollapse file tree

2 files changed

+16
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-3
lines changed

‎src/main/java/org/kohsuke/github/GHRepository.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,21 @@ public GHPullRequest getPullRequest(int number) throws IOException {
15031503
.wrapUp(this);
15041504
}
15051505

1506+
/**
1507+
* Retrieves all the pull requests of a particular state.
1508+
*
1509+
* @param state
1510+
* the state
1511+
* @return the pull requests
1512+
* @throws IOException
1513+
* the io exception
1514+
* @deprecated Use {@link #queryPullRequests()}
1515+
*/
1516+
@Deprecated
1517+
public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException {
1518+
return queryPullRequests().state(state).list().toList();
1519+
}
1520+
15061521
/**
15071522
* Retrieves pull requests.
15081523
*

‎src/test/java/org/kohsuke/github/GHPullRequestTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/GHPullRequestTest.java
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,7 @@ public void getUserTest() throws IOException {
918918
prSingle.getMergeable();
919919
assertThat(prSingle.getUser().root(), notNullValue());
920920

921-
PagedIterable<GHPullRequest> ghPullRequests = getRepository().queryPullRequests()
922-
.state(GHIssueState.OPEN)
923-
.list();
921+
List<GHPullRequest> ghPullRequests = getRepository().getPullRequests(GHIssueState.OPEN);
924922
for (GHPullRequest pr : ghPullRequests) {
925923
assertThat(pr.getUser().root(), notNullValue());
926924
pr.getMergeable();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.