def add_team_repo(repo_name, team_name, profile='github', permission=None):
 team = get_team(team_name, profile=profile)
 if (not team):
  log.error('Team {0} does not exist'.format(team_name))
  return False
 try:
  client = _get_client(profile)
  organization = client.get_organization(_get_config_value(profile, 'org_name'))
  team = organization.get_team(team['id'])
  repo = organization.get_repo(repo_name)
 except UnknownObjectException as e:
  log.exception('Resource not found: {0}'.format(team['id']))
  return False
 params = None
 if (permission is not None):
  params = {'permission': permission}
 (headers, data) = team._requester.requestJsonAndCheck('PUT', ((team.url + '/repos/') + repo._identity), input=params)
 list_team_repos(team_name, profile=profile, ignore_cache=True)
 return True

def add_team_repo ( repo_name , team_name , profile = 'github' , permission = None ) : team = get_team ( team_name , profile = profile ) if ( not team ) : log . error ( 'Team {0} does not exist' . format ( team_name ) ) return False try : client = _get_client ( profile ) organization = client . get_organization ( _get_config_value ( profile , 'org_name' ) ) team = organization . get_team ( team [ 'id' ] ) repo = organization . get_repo ( repo_name ) except UnknownObjectException as e : log . exception ( 'Resource not found: {0}' . format ( team [ 'id' ] ) ) return False params = None if ( permission is not None ) : params = { 'permission' : permission } ( headers , data ) = team . _requester . requestJsonAndCheck ( 'PUT' , ( ( team . url + '/repos/' ) + repo . _identity ) , input = params ) list_team_repos ( team_name , profile = profile , ignore_cache = True ) return True
adds a repository to a team with team_name .