Class GHTeam

  • All Implemented Interfaces:
    Refreshable

    public class GHTeam
    extends Object
    implements Refreshable
    A team in GitHub organization.
    Author:
    Kohsuke Kawaguchi
    • Field Detail

    • Constructor Detail

      • GHTeam

        public GHTeam()
    • Method Detail

      • getName

        public String getName()
        Gets name.
        Returns:
        the name
      • getPermission

        public String getPermission()
        Gets permission.
        Returns:
        the permission
      • getSlug

        public String getSlug()
        Gets slug.
        Returns:
        the slug
      • getDescription

        public String getDescription()
        Gets description.
        Returns:
        the description
      • setDescription

        public void setDescription​(String description)
                            throws IOException
        Sets description.
        Parameters:
        description - the description
        Throws:
        IOException - the io exception
      • getId

        public int getId()
        Gets id.
        Returns:
        the id
      • hasMember

        public boolean hasMember​(GHUser user)
        Checks if this team has the specified user as a member.
        Parameters:
        user - the user
        Returns:
        the boolean
      • listRepositories

        public PagedIterable<GHRepository> listRepositories()
        List repositories paged iterable.
        Returns:
        the paged iterable
      • add

        public void add​(GHUser u)
                 throws IOException
        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

        public void add​(GHUser user,
                        GHTeam.Role role)
                 throws IOException
        Adds a member to the team

        The user will be invited to the organization if required.

        Parameters:
        user - github user
        role - role for the new member
        Throws:
        IOException - the io exception
      • remove

        public void remove​(GHUser u)
                    throws IOException
        Removes a member to the team.
        Parameters:
        u - the u
        Throws:
        IOException - the io exception