Skip to content

Instantly share code, notes, and snippets.

@jonbinney
Created June 3, 2013 00:44
Show Gist options
  • Select an option

  • Save jonbinney/5695547 to your computer and use it in GitHub Desktop.

Select an option

Save jonbinney/5695547 to your computer and use it in GitHub Desktop.
from github import Github
import sys
def print_usage():
print 'make_issue.py <username> <password> <organization> <repository> <issue_title> <issue_body>'
if len(sys.argv) != 7:
print_usage()
sys.exit(-1)
username, password, organization, repository, issue_title, issue_body = sys.argv[1:]
g = Github(username, password)
if organization == username:
org = g.get_user()
else:
org = g.get_organization(organization)
repo = org.get_repo(repository)
repo.create_issue(issue_title, issue_body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment