java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHTeam
- All Implemented Interfaces:
Refreshable
A team in GitHub organization.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe Enum Privacy.static enumMember's role in a team. -
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(GHRepository r) Add.voidadd(GHRepository r, GHOrganization.RepositoryRole permission) Add.voidAdds a member to the team.voidadd(GHUser user, GHTeam.Role role) Adds a member to the teamconnectToExternalGroup(long group_id) Connect an external group to the teamConnect an external group to the teamcreateDiscussion(String title) Begins the creation of a new instance.voiddelete()Deletes this team.voidRemove the connection of the team to an external groupbooleanEquals.Gets description.getDiscussion(long discussionNumber) Gets a single discussion by ID.Get the external groups connected to the teamGets the html url.Gets members.getName()Gets name.Gets organization.Gets permission.Gets the privacy state.Gets repositories.getSlug()Gets slug.inthashCode()Hash code.booleanChecks if this team has the specified user as a member.Retrieves the teams that are children of this team.Retrieves the discussions.Retrieves the current members.listMembers(String role) List members with specified role paged iterable.listMembers(GHTeam.Role role) List members with specified role paged iterable.List repositories paged iterable.voidrefresh()Refresh.voidRemove.voidRemoves a member to the team.voidsetDescription(String description) Sets description.voidsetPrivacy(GHTeam.Privacy privacy) Updates the team's privacy setting.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kohsuke.github.Refreshable
refresh
-
Constructor Details
-
GHTeam
public GHTeam()Create default GHTeam instance
-
-
Method Details
-
getName
Gets name.- Returns:
- the name
-
getPermission
Gets permission.- Returns:
- the permission
-
getSlug
Gets slug.- Returns:
- the slug
-
getDescription
Gets description.- Returns:
- the description
-
getPrivacy
Gets the privacy state.- Returns:
- the privacy state.
-
setDescription
Sets description.- Parameters:
description- the description- Throws:
IOException- the io exception
-
setPrivacy
Updates the team's privacy setting.- Parameters:
privacy- the privacy- Throws:
IOException- the io exception
-
listDiscussions
Retrieves the discussions.- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
listMembers
List members with specified role paged iterable.- Parameters:
role- the role- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
listMembers
List members with specified role paged iterable.- Parameters:
role- the role- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
getDiscussion
Gets a single discussion by ID.- Parameters:
discussionNumber- id of the discussion that we want to query for- Returns:
- the discussion
- Throws:
IOException- the io exception- See Also:
-
listMembers
Retrieves the current members.- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
listChildTeams
Retrieves the teams that are children of this team.- Returns:
- the paged iterable
- Throws:
IOException- the io exception
-
getMembers
Gets members.- Returns:
- the members
- Throws:
IOException- the io exception
-
hasMember
Checks if this team has the specified user as a member.- Parameters:
user- the user- Returns:
- the boolean
-
getRepositories
Gets repositories.- Returns:
- the repositories
- Throws:
IOException- the io exception
-
listRepositories
List repositories paged iterable.- Returns:
- the paged iterable
-
add
Adds a member to the team.The user will be invited to the organization if required.
- Parameters:
u- the u- Throws:
IOException- the io exception- Since:
- 1.59
-
add
Adds a member to the teamThe user will be invited to the organization if required.
- Parameters:
user- github userrole- role for the new member- Throws:
IOException- the io exception
-
remove
Removes a member to the team.- Parameters:
u- the u- Throws:
IOException- the io exception
-
add
Add.- Parameters:
r- the r- Throws:
IOException- the io exception
-
add
Add.- Parameters:
r- the rpermission- the permission- Throws:
IOException- the io exception
-
remove
Remove.- Parameters:
r- the r- Throws:
IOException- the io exception
-
delete
Deletes this team.- Throws:
IOException- the io exception
-
createDiscussion
Begins the creation of a new instance. Consumer must callAbstractBuilder.done()to commit changes.- Parameters:
title- title of the discussion to be created- Returns:
- a
GHDiscussion.Creator - Throws:
IOException- the io exception
-
getExternalGroups
Get the external groups connected to the team- Returns:
- the external groups
- Throws:
IOException- the io exception- See Also:
-
connectToExternalGroup
Connect an external group to the team- Parameters:
group- the group to connect- Returns:
- the external group
- Throws:
IOException- in case of failure- See Also:
-
connectToExternalGroup
Connect an external group to the team- Parameters:
group_id- the identifier of the group to connect- Returns:
- the external group
- Throws:
IOException- in case of failure- See Also:
-
deleteExternalGroupConnection
Remove the connection of the team to an external group- Throws:
IOException- in case of failure- See Also:
-
getOrganization
Gets organization.- Returns:
- the organization
- Throws:
IOException- the io exception
-
refresh
Refresh.- Specified by:
refreshin interfaceRefreshable- Throws:
IOException- Signals that an I/O exception has occurred.
-
getHtmlUrl
Gets the html url.- Returns:
- the html url
-
equals
Equals. -
hashCode
public int hashCode()Hash code.
-