/** * Finds a team that has the given slug in its {@link GHTeam#getSlug()} */ public GHTeam getTeamBySlug(String slug) throws IOException { for (GHTeam t : listTeams()) { if(t.getSlug().equals(slug)) return t; } return null; }
/** * Finds a team that has the given name in its {@link GHTeam#getName()} */ public GHTeam getTeamByName(String name) throws IOException { for (GHTeam t : listTeams()) { if(t.getName().equals(name)) return t; } return null; }
/** * Finds a team that has the given slug in its {@link GHTeam#getSlug()} */ public GHTeam getTeamBySlug(String slug) throws IOException { for (GHTeam t : listTeams()) { if(t.getSlug().equals(slug)) return t; } return null; }
/** * Teams by their names. */ public Map<String,GHTeam> getTeams() throws IOException { Map<String,GHTeam> r = new TreeMap<String, GHTeam>(); for (GHTeam t : listTeams()) { r.put(t.getName(),t); } return r; }
/** * Teams by their names. */ public Map<String,GHTeam> getTeams() throws IOException { Map<String,GHTeam> r = new TreeMap<String, GHTeam>(); for (GHTeam t : listTeams()) { r.put(t.getName(),t); } return r; }
/** * Teams by their names. */ public Map<String,GHTeam> getTeams() throws IOException { Map<String,GHTeam> r = new TreeMap<String, GHTeam>(); for (GHTeam t : listTeams()) { r.put(t.getName(),t); } return r; }
/** * Finds a team that has the given name in its {@link GHTeam#getName()} */ public GHTeam getTeamByName(String name) throws IOException { for (GHTeam t : listTeams()) { if(t.getName().equals(name)) return t; } return null; }
/** * Finds a team that has the given name in its {@link GHTeam#getName()} */ public GHTeam getTeamByName(String name) throws IOException { for (GHTeam t : listTeams()) { if(t.getName().equals(name)) return t; } return null; }
public List<GHTeam> listTeams() { if (this.teams == null) { try { this.teams = organization.listTeams().asList(); } catch (Throwable t) { logger.warn("No teams found for organization '{}'.", organization.getLogin()); this.teams = Collections.<GHTeam>emptyList(); } } return this.teams; }