parameters: (auth, filename='etc/default_tickets.csv')
docstring: Creates tickets in Github issues.
docstring_summary: Creates tickets in Github issues.
docstring_tokens: Creates tickets in Github issues .
function: def create_tickets(auth, filename='etc/default_tickets.csv'):
      """
      Creates tickets in Github issues.
      """
      url = 'https://api.github.com/repos/%s/issues' % get_repo_path()
  
      with open(filename) as f:
          tickets = list(csv.DictReader(f))
  
      print 'Creating %i tickets' % len(tickets)
  
      for ticket in tickets:
          print 'Creating ticket "%s"' % ticket['title']
  
          if ticket['labels']:
              ticket['labels'] = ticket['labels'].split(',')
          else:
              ticket['labels'] = []
  
          ticket['labels'].append('Default Ticket')
  
          data = json.dumps(ticket)
  
          requests.post(url, data=data, auth=auth)
function_tokens: def create_tickets ( auth , filename = 'etc/default_tickets.csv' ) : url = 'https://api.github.com/repos/%s/issues' % get_repo_path ( ) with open ( filename ) as f : tickets = list ( csv . DictReader ( f ) ) print 'Creating %i tickets' % len ( tickets ) for ticket in tickets : print 'Creating ticket "%s"' % ticket [ 'title' ] if ticket [ 'labels' ] : ticket [ 'labels' ] = ticket [ 'labels' ] . split ( ',' ) else : ticket [ 'labels' ] = [ ] ticket [ 'labels' ] . append ( 'Default Ticket' ) data = json . dumps ( ticket ) requests . post ( url , data = data , auth = auth )