Skip to content

Commit

Permalink
Remove extra constructor from GHPullRequestSearchBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseman authored Nov 13, 2023
1 parent a82c15e commit 586f89e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions src/main/java/org/kohsuke/github/GHPullRequestSearchBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ public class GHPullRequestSearchBuilder extends GHSearchBuilder<GHPullRequest> {
super(root, PullRequestSearchResult.class);
}

/**
* Instantiates a new GH search builder from repository.
*
* @param repository
* the gh repository
*/
GHPullRequestSearchBuilder(GHRepository repository) {
super(repository.root(), PullRequestSearchResult.class);
this.repo(repository);
}

/**
* Repository gh pull request search builder.
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,7 @@ public GHPullRequestQueryBuilder queryPullRequests() {
* @return gh pull request search builder for current repository
*/
public GHPullRequestSearchBuilder searchPullRequests() {
return new GHPullRequestSearchBuilder(this);
return new GHPullRequestSearchBuilder(this.root()).repo(this);
}

/**
Expand Down

0 comments on commit 586f89e

Please sign in to comment.