Exemplo n.º 1
0
 /** Gets the collaborators on this repository. This set always appear to include the owner. */
 @WithBridgeMethods(Set.class)
 public GHPersonSet<GHUser> getCollaborators() throws IOException {
   return new GHPersonSet<GHUser>(
       GHUser.wrap(
           root.retrieve()
               .to("/repos/" + owner.login + "/" + name + "/collaborators", GHUser[].class),
           root));
 }
Exemplo n.º 2
0
 /**
  * Gets the names of the collaborators on this repository. This method deviates from the principle
  * of this library but it works a lot faster than {@link #getCollaborators()}.
  */
 public Set<String> getCollaboratorNames() throws IOException {
   Set<String> r = new HashSet<String>();
   for (GHUser u :
       GHUser.wrap(
           root.retrieve()
               .to("/repos/" + owner.login + "/" + name + "/collaborators", GHUser[].class),
           root)) r.add(u.login);
   return r;
 }