public class GHOrganization extends GHPerson
| Modifier and Type | Class and Description |
|---|---|
static class |
GHOrganization.Permission |
avatar_url, blog, company, email, followers, following, gravatar_id, html_url, location, login, name, public_gists, public_reposcreated_at, id, updated_at, url| Constructor and Description |
|---|
GHOrganization() |
| Modifier and Type | Method and Description |
|---|---|
void |
conceal(GHUser u)
Conceals the membership.
|
GHHook |
createHook(String name,
Map<String,String> config,
Collection<GHEvent> events,
boolean active)
See https://api.github.com/hooks for possible names and their configuration scheme.
|
GHCreateRepositoryBuilder |
createRepository(String name)
Starts a builder that creates a new repository.
|
GHRepository |
createRepository(String name,
String description,
String homepage,
GHTeam team,
boolean isPublic)
Deprecated.
Use
createRepository(String) that uses a builder pattern to let you control every aspect. |
GHRepository |
createRepository(String name,
String description,
String homepage,
String team,
boolean isPublic)
Deprecated.
Use
createRepository(String) that uses a builder pattern to let you control every aspect. |
GHTeam |
createTeam(String name,
GHOrganization.Permission p,
Collection<GHRepository> repositories)
Creates a new team and assigns the repositories.
|
GHTeam |
createTeam(String name,
GHOrganization.Permission p,
GHRepository... repositories) |
GHHook |
createWebHook(URL url) |
GHHook |
createWebHook(URL url,
Collection<GHEvent> events) |
GHHook |
getHook(int id) |
List<GHHook> |
getHooks()
Retrieves the currently configured hooks.
|
List<GHUser> |
getMembers()
Deprecated.
use
listMembers() |
List<GHPullRequest> |
getPullRequests()
Gets all the open pull requests in this organizataion.
|
List<GHRepository> |
getRepositoriesWithOpenPullRequests()
List up repositories that has some open pull requests.
|
GHTeam |
getTeamByName(String name)
Finds a team that has the given name in its
GHTeam.getName() |
GHTeam |
getTeamBySlug(String slug)
Finds a team that has the given slug in its
GHTeam.getSlug() |
Map<String,GHTeam> |
getTeams()
Teams by their names.
|
boolean |
hasMember(GHUser user)
Checks if this organization has the specified user as a member.
|
boolean |
hasPublicMember(GHUser user)
Checks if this organization has the specified user as a public member.
|
PagedIterable<GHEventInfo> |
listEvents()
Lists events performed by a user (this includes private events if the caller is authenticated.
|
PagedIterable<GHUser> |
listMembers()
All the members of this organization.
|
PagedIterable<GHUser> |
listMembersWithFilter(String filter) |
PagedIterable<GHUser> |
listPublicMembers()
All the public members of this organization.
|
PagedIterable<GHRepository> |
listRepositories(int pageSize)
Lists up all the repositories using the specified page size.
|
PagedIterable<GHTeam> |
listTeams()
List up all the teams.
|
void |
publicize(GHUser u)
Publicizes the membership.
|
void |
remove(GHUser user)
Remove a member of the organisation - which will remove them from
all teams, and remove their access to the organization’s repositories.
|
getAvatarUrl, getBlog, getCompany, getCreatedAt, getEmail, getFollowersCount, getFollowingCount, getGravatarId, getHtmlUrl, getLocation, getLogin, getName, getPublicGistCount, getPublicRepoCount, getRepositories, getRepository, getUpdatedAt, iterateRepositories, listRepositories, populatepublic GHRepository createRepository(String name, String description, String homepage, String team, boolean isPublic) throws IOException
createRepository(String) that uses a builder pattern to let you control every aspect.IOExceptionpublic GHRepository createRepository(String name, String description, String homepage, GHTeam team, boolean isPublic) throws IOException
createRepository(String) that uses a builder pattern to let you control every aspect.IOExceptionpublic GHCreateRepositoryBuilder createRepository(String name) throws IOException
You use the returned builder to set various properties, then call GHCreateRepositoryBuilder.create()
to finally createa repository.
IOExceptionpublic Map<String,GHTeam> getTeams() throws IOException
IOExceptionpublic PagedIterable<GHTeam> listTeams() throws IOException
IOExceptionpublic GHTeam getTeamByName(String name) throws IOException
GHTeam.getName()IOExceptionpublic GHTeam getTeamBySlug(String slug) throws IOException
GHTeam.getSlug()IOExceptionpublic boolean hasMember(GHUser user)
public void remove(GHUser user) throws IOException
IOExceptionpublic boolean hasPublicMember(GHUser user)
public void publicize(GHUser u) throws IOException
IOExceptionpublic List<GHUser> getMembers() throws IOException
listMembers()IOExceptionpublic PagedIterable<GHUser> listMembers() throws IOException
IOExceptionpublic PagedIterable<GHUser> listPublicMembers() throws IOException
IOExceptionpublic PagedIterable<GHUser> listMembersWithFilter(String filter) throws IOException
IOExceptionpublic void conceal(GHUser u) throws IOException
IOExceptionpublic GHTeam createTeam(String name, GHOrganization.Permission p, Collection<GHRepository> repositories) throws IOException
IOExceptionpublic GHTeam createTeam(String name, GHOrganization.Permission p, GHRepository... repositories) throws IOException
IOExceptionpublic List<GHRepository> getRepositoriesWithOpenPullRequests() throws IOException
IOExceptionpublic List<GHPullRequest> getPullRequests() throws IOException
IOExceptionpublic PagedIterable<GHEventInfo> listEvents() throws IOException
listEvents in class GHPersonIOExceptionpublic PagedIterable<GHRepository> listRepositories(int pageSize)
listRepositories in class GHPersonpageSize - size for each page of items returned by GitHub. Maximum page size is 100.
Unlike GHPerson.getRepositories(), this does not wait until all the repositories are returned.public List<GHHook> getHooks() throws IOException
IOExceptionpublic GHHook getHook(int id) throws IOException
IOExceptionpublic GHHook createHook(String name, Map<String,String> config, Collection<GHEvent> events, boolean active) throws IOException
name - Type of the hook to be created. See https://api.github.com/hooks for possible names.config - The configuration hash.events - Can be null. Types of events to hook into.IOExceptionpublic GHHook createWebHook(URL url, Collection<GHEvent> events) throws IOException
IOExceptionpublic GHHook createWebHook(URL url) throws IOException
IOExceptionCopyright © 2017. All rights reserved.