commit | 566ad9d32b98ca1a7281862a340295241c01333c | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Fri Jun 26 09:25:18 2015 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed Sep 16 10:08:37 2015 +0100 |
tree | 0b980dfe559663929853f1e4147856cf73dccbc1 | |
parent | 33e72996b650844180251eaa877466e7785ff25c [diff] |
BugFix on latest GitHub API: list repos from private repos In order to list repos that belong to one of the user's private organisation, we do need to explicitly request /user/orgs REST API otherwise even if have the Scope "read:org" the private organisations are not returned by /users/<user>/orgs REST API. Change-Id: I711f20a90cf4ebb15322cce8baff3ce63eae30e6
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/RepositoriesListController.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/RepositoriesListController.java index 87cc52e..087c138 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/RepositoriesListController.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/RepositoriesListController.java
@@ -96,7 +96,7 @@ return hubLogin.getMyself().listRepositories(config.repositoryListPageSize); } else { GHOrganization ghOrganisation = - hubLogin.getMyself().getOrganizations().byLogin(organisation); + hubLogin.getMyself().getAllOrganizations().byLogin(organisation); return ghOrganisation.listRepositories(config.repositoryListPageSize); } }