(title, body=None, assignee=None, milestone=None, labels=None)
Create an issue on github.com using the given parameters.
Create an issue on github.com using the given parameters.
Create an issue on github . com using the given parameters .
def make_github_issue(title, body=None, assignee=None, milestone=None, labels=None):
    '''Create an issue on github.com using the given parameters.'''
    # Our url to create issues via POST
    url = 'https://api.github.com/repos/%s/%s/issues' % (REPO_OWNER, REPO_NAME)
    # Create an authenticated session to create the issue
    session = requests.session()

    # Create our issue
    issue = {'title': title,
             'body': body,
             'assignee': assignee,
             'milestone': milestone,
             'labels': labels}

    # Add the issue to our repository
    r = session.post(url, json.dumps(issue), headers={"Authorization": "token {}".format(ACCESS_TOKEN)})
    if r.status_code == 201:
        print('Successfully created Issue "%s"' % title)
    else:
        print('Could not create Issue "%s"' % title)
        print('Response:', r.content)
def make_github_issue ( title , body = None , assignee = None , milestone = None , labels = None ) : # Our url to create issues via POST url = 'https://api.github.com/repos/%s/%s/issues' % ( REPO_OWNER , REPO_NAME ) # Create an authenticated session to create the issue session = requests . session ( ) # Create our issue issue = { 'title' : title , 'body' : body , 'assignee' : assignee , 'milestone' : milestone , 'labels' : labels } # Add the issue to our repository r = session . post ( url , json . dumps ( issue ) , headers = { "Authorization" : "token {}" . format ( ACCESS_TOKEN ) } ) if r . status_code == 201 : print ( 'Successfully created Issue "%s"' % title ) else : print ( 'Could not create Issue "%s"' % title ) print ( 'Response:' , r . content )