def list_team_repos(team_name, profile='github', ignore_cache=False):
 cached_team = get_team(team_name, profile=profile)
 if (not cached_team):
  log.error('Team {0} does not exist.'.format(team_name))
  return False
 if (cached_team.get('repos') and (not ignore_cache)):
  return cached_team.get('repos')
 try:
  client = _get_client(profile)
  organization = client.get_organization(_get_config_value(profile, 'org_name'))
  team = organization.get_team(cached_team['id'])
 except UnknownObjectException as e:
  log.exception('Resource not found: {0}'.format(cached_team['id']))
 try:
  repos = {}
  for repo in team.get_repos():
   permission = 'pull'
   if repo.permissions.admin:
    permission = 'admin'
   elif repo.permissions.push:
    permission = 'push'
   repos[repo.name.lower()] = {'permission': permission}
  cached_team['repos'] = repos
  return repos
 except UnknownObjectException as e:
  log.exception('Resource not found: {0}'.format(cached_team['id']))
  return []

def list_team_repos ( team_name , profile = 'github' , ignore_cache = False ) : cached_team = get_team ( team_name , profile = profile ) if ( not cached_team ) : log . error ( 'Team {0} does not exist.' . format ( team_name ) ) return False if ( cached_team . get ( 'repos' ) and ( not ignore_cache ) ) : return cached_team . get ( 'repos' ) try : client = _get_client ( profile ) organization = client . get_organization ( _get_config_value ( profile , 'org_name' ) ) team = organization . get_team ( cached_team [ 'id' ] ) except UnknownObjectException as e : log . exception ( 'Resource not found: {0}' . format ( cached_team [ 'id' ] ) ) try : repos = { } for repo in team . get_repos ( ) : permission = 'pull' if repo . permissions . admin : permission = 'admin' elif repo . permissions . push : permission = 'push' repos [ repo . name . lower ( ) ] = { 'permission' : permission } cached_team [ 'repos' ] = repos return repos except UnknownObjectException as e : log . exception ( 'Resource not found: {0}' . format ( cached_team [ 'id' ] ) ) return [ ]
gets the repo details for a given team as a dict from repo_name to repo details .