Display repository private/public label Label private vs. public repositories in list selection of those to be imported into Gerrit. Change-Id: I79baaab30840433bd60253eae025c703b21f7ef1
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 42beed0..941a74e 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
@@ -71,6 +71,7 @@ "description", new JsonPrimitive( Strings.nullToEmpty(ghRepository.getDescription()))); + repository.add("private", new JsonPrimitive(ghRepository.isPrivate())); jsonRepos.add(repository); numRepos++; }
diff --git a/github-plugin/src/main/resources/static/repositories.html b/github-plugin/src/main/resources/static/repositories.html index a3bfa0e..7757149 100644 --- a/github-plugin/src/main/resources/static/repositories.html +++ b/github-plugin/src/main/resources/static/repositories.html
@@ -67,6 +67,7 @@ <script type="text/template" id="repo-sync-template"> <li> <input class="keycheckbox" type="checkbox" name="repo_<%= index %>" /> + <span class="private_<%= repo.private %>"><%= repo.private ? "PRIVATE":"PUBLIC" %></span> <label class="repository"><%= repo.organisation %> / <b><%= repo.name %></b></label> <input type="hidden" name="repo_<%= index %>_organisation" value="<%= repo.organisation %>" /> <input type="hidden" class="name" name="repo_<%= index %>_repository" value="<%= repo.name %>" />