Skip to content

Instantly share code, notes, and snippets.

@jacobian
Created December 7, 2011 21:53
Show Gist options
  • Save jacobian/1444869 to your computer and use it in GitHub Desktop.
Save jacobian/1444869 to your computer and use it in GitHub Desktop.
Github pull request hook
data = {
"active": true,
"config": {"url": "http://postbin.ep.io/33/"},
"name": "trac",
"events": ['pull_request', 'issue_comment', 'issues'],
}
requests.post('https://api.github.com/repos/django/django/hooks',
auth = (USERNAME, PASSWORD),
headers = {'Content-Type':'application/json'},
data = json.dumps(data).
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment