Class GHTeamBuilder

java.lang.Object
org.kohsuke.github.GHTeamBuilder

public class GHTeamBuilder extends Object
Creates a team. https://developer.github.com/v3/teams/#create-team
  • Field Details

    • builder

      protected final org.kohsuke.github.Requester builder
      The builder.
  • Constructor Details

    • GHTeamBuilder

      public GHTeamBuilder(GitHub root, String orgName, String name)
      Instantiates a new GH team builder.
      Parameters:
      root - the root
      orgName - the org name
      name - the name
  • Method Details

    • description

      public GHTeamBuilder description(String description)
      Description for this team.
      Parameters:
      description - description of team
      Returns:
      a builder to continue with building
    • maintainers

      public GHTeamBuilder maintainers(String... maintainers)
      Maintainers for this team.
      Parameters:
      maintainers - maintainers of team
      Returns:
      a builder to continue with building
    • repositories

      public GHTeamBuilder repositories(String... repoNames)
      Repository names to add this team to.
      Parameters:
      repoNames - repoNames to add team to
      Returns:
      a builder to continue with building
    • permission

      @Deprecated public GHTeamBuilder permission(GHOrganization.Permission permission)
      Deprecated.
      see https://docs.github.com/en/free-pro-team@latest/rest/teams/teams?apiVersion=2022-11-28#create-a-team
      The permission that new repositories will be added to the team with when none is specified.
      Parameters:
      permission - permssion to be applied
      Returns:
      a builder to continue with building
    • privacy

      public GHTeamBuilder privacy(GHTeam.Privacy privacy)
      Description for this team.
      Parameters:
      privacy - privacy of team
      Returns:
      a builder to continue with building
    • parentTeamId

      public GHTeamBuilder parentTeamId(long parentTeamId)
      Parent team id for this team.
      Parameters:
      parentTeamId - parentTeamId of team
      Returns:
      a builder to continue with building
    • create

      public GHTeam create() throws IOException
      Creates a team with all the parameters.
      Returns:
      the gh team
      Throws:
      IOException - if team cannot be created