Skip to content

Instantly share code, notes, and snippets.

@jacobian
Created December 7, 2011 21:53
Show Gist options
  • Select an option

  • Save jacobian/1444869 to your computer and use it in GitHub Desktop.

Select an option

Save jacobian/1444869 to your computer and use it in GitHub Desktop.

Revisions

  1. jacobian created this gist Dec 7, 2011.
    12 changes: 12 additions & 0 deletions pullhook.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    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).
    )