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); } }