Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,21 @@ public GHPullRequest getPullRequest(int number) throws IOException {
.wrapUp(this);
}

/**
* Retrieves all the pull requests of a particular state.
*
* @param state
* the state
* @return the pull requests
* @throws IOException
* the io exception
* @deprecated Use {@link #queryPullRequests()}
*/
@Deprecated
public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException {
return queryPullRequests().state(state).list().toList();
}

/**
* Retrieves pull requests.
*
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/org/kohsuke/github/GHPullRequestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,7 @@ public void getUserTest() throws IOException {
prSingle.getMergeable();
assertThat(prSingle.getUser().root(), notNullValue());

PagedIterable<GHPullRequest> ghPullRequests = getRepository().queryPullRequests()
.state(GHIssueState.OPEN)
.list();
List<GHPullRequest> ghPullRequests = getRepository().getPullRequests(GHIssueState.OPEN);
for (GHPullRequest pr : ghPullRequests) {
assertThat(pr.getUser().root(), notNullValue());
pr.getMergeable();
Expand Down