PullRequestListController: Remove unused GHPerson initialisation
The ghOwner parameter in getPullRequests has not been used since change
I2eaf45dcc5acf when the API version was bumped to 1.48-SNAPSHOT.
Remove the parameter, and consequently remove the now-unused GHPerson
initialisation at the only place where getPullRequests is called.
Change-Id: Id7d4307e362337cef6fec312f72c47f883722b3e
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
index 813094e..ef90d04 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/PullRequestListController.java
@@ -42,7 +42,6 @@
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevWalk;
import org.kohsuke.github.GHIssueState;
-import org.kohsuke.github.GHPerson;
import org.kohsuke.github.GHPullRequest;
import org.kohsuke.github.GHPullRequestCommitDetail;
import org.kohsuke.github.GHRepository;
@@ -126,21 +125,14 @@
private Map<String, List<GHPullRequest>> getPullRequests(
GitHubLogin hubLogin, String organisation, String repository)
throws IOException {
- GHPerson ghOwner;
- if (organisation.equals(hubLogin.getMyself().getLogin())) {
- ghOwner = hubLogin.getMyself();
- } else {
- ghOwner = hubLogin.getHub().getOrganization(organisation);
- }
return getPullRequests(
hubLogin,
- ghOwner,
projectsCache.byName(organisation + "/"
+ Strings.nullToEmpty(repository)));
}
private Map<String, List<GHPullRequest>> getPullRequests(GitHubLogin login,
- GHPerson ghOwner, Iterable<NameKey> repos) throws IOException {
+ Iterable<NameKey> repos) throws IOException {
int numPullRequests = 0;
Map<String, List<GHPullRequest>> allPullRequests = Maps.newHashMap();
try (ReviewDb db = schema.get()) {