{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/test-automation/pulls/comments/93920931","pull_request_review_id":14452331,"id":93920931,"diff_hunk":"@@ -0,0 +1,92 @@\n+import os.path\n+\n+from fabric.api import task, cd, path, run, runs_once, roles, sudo\n+\n+import utils\n+import config\n+\n+@task\n+def session_analytics(*args):\n+    'Adds the session_analytics extension to the instance in pg-latest'\n+    # TODO: Requires hstore, do we install it automatically?\n+    utils.add_github_to_known_hosts() # make sure ssh doesn't prompt\n+    repo = config.paths['session-repo']\n+    prefix = config.paths['pg-latest']\n+\n+    if len(args) == 0:\n+        git_ref = 'master'\n+    else:\n+        git_ref = args[0]\n+\n+    run('rm -rf {} || true'.format(repo)) # -f because git write-protects files\n+    run('git clone -q git@github.com:citusdata/session_analytics.git {}'.format(repo))\n+    with cd(repo), path('{}/bin'.format(prefix)):\n+        run('git checkout {}'.format(git_ref))\n+        run('make install')\n+\n+    # TODO: What if the server isn't running?\n+    with cd(prefix):\n+        run('bin/psql -c \"CREATE EXTENSION session_analytics;\"')\n+\n+@task\n+def hll():\n+    'Adds the hll extension to the instance in pg-latest'","path":"fabfile/add.py","position":33,"original_position":33,"commit_id":"bfd2927003ce63648ea55ba2cef812b1e37bb6f3","original_commit_id":"bfd2927003ce63648ea55ba2cef812b1e37bb6f3","user":{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"body":"These comments (docstrings) are automatically grabbed by `fab --list` and are the way documentation works in Python. Moving them to before the function definition would make `fab --list` far less useful and isn't very pythonic at all.","created_at":"2016-12-27T11:08:39Z","updated_at":"2016-12-27T11:08:39Z","html_url":"https://github.com/citusdata/test-automation/pull/10#discussion_r93920931","pull_request_url":"https://api.github.com/repos/citusdata/test-automation/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/comments/93920931"},"html":{"href":"https://github.com/citusdata/test-automation/pull/10#discussion_r93920931"},"pull_request":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/test-automation/pulls/10","id":98306946,"html_url":"https://github.com/citusdata/test-automation/pull/10","diff_url":"https://github.com/citusdata/test-automation/pull/10.diff","patch_url":"https://github.com/citusdata/test-automation/pull/10.patch","issue_url":"https://api.github.com/repos/citusdata/test-automation/issues/10","number":10,"state":"open","locked":false,"title":"The initial PR","user":{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"body":"Will eventually contain the results of checking all these boxes: https://github.com/citusdata/test-automation/issues/1","created_at":"2016-12-16T10:00:26Z","updated_at":"2016-12-27T11:08:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f130ca5ae4ce465bc4d75a6ac4858ce78639cd1","assignee":{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/citusdata/test-automation/milestones/1","html_url":"https://github.com/citusdata/test-automation/milestone/1","labels_url":"https://api.github.com/repos/citusdata/test-automation/milestones/1/labels","id":2198826,"number":1,"title":"6.1","description":"","creator":{"login":"lithp","id":466333,"avatar_url":"https://avatars.githubusercontent.com/u/466333?v=3","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":1,"state":"open","created_at":"2016-12-15T14:24:40Z","updated_at":"2016-12-26T13:21:08Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/citusdata/test-automation/pulls/10/commits","review_comments_url":"https://api.github.com/repos/citusdata/test-automation/pulls/10/comments","review_comment_url":"https://api.github.com/repos/citusdata/test-automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/test-automation/issues/10/comments","statuses_url":"https://api.github.com/repos/citusdata/test-automation/statuses/bfd2927003ce63648ea55ba2cef812b1e37bb6f3","head":{"label":"citusdata:master","ref":"master","sha":"bfd2927003ce63648ea55ba2cef812b1e37bb6f3","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":76336560,"name":"test-automation","full_name":"citusdata/test-automation","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/test-automation","description":"Tools for making our tests easier to run","fork":false,"url":"https://api.github.com/repos/citusdata/test-automation","forks_url":"https://api.github.com/repos/citusdata/test-automation/forks","keys_url":"https://api.github.com/repos/citusdata/test-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/test-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/test-automation/teams","hooks_url":"https://api.github.com/repos/citusdata/test-automation/hooks","issue_events_url":"https://api.github.com/repos/citusdata/test-automation/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/test-automation/events","assignees_url":"https://api.github.com/repos/citusdata/test-automation/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/test-automation/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/test-automation/tags","blobs_url":"https://api.github.com/repos/citusdata/test-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/test-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/test-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/test-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/test-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/test-automation/languages","stargazers_url":"https://api.github.com/repos/citusdata/test-automation/stargazers","contributors_url":"https://api.github.com/repos/citusdata/test-automation/contributors","subscribers_url":"https://api.github.com/repos/citusdata/test-automation/subscribers","subscription_url":"https://api.github.com/repos/citusdata/test-automation/subscription","commits_url":"https://api.github.com/repos/citusdata/test-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/test-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/test-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/test-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/test-automation/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/test-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/test-automation/merges","archive_url":"https://api.github.com/repos/citusdata/test-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/test-automation/downloads","issues_url":"https://api.github.com/repos/citusdata/test-automation/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/test-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/test-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/test-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/test-automation/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/test-automation/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/test-automation/deployments","created_at":"2016-12-13T08:02:28Z","updated_at":"2016-12-19T17:03:20Z","pushed_at":"2016-12-26T16:01:05Z","git_url":"git://github.com/citusdata/test-automation.git","ssh_url":"git@github.com:citusdata/test-automation.git","clone_url":"https://github.com/citusdata/test-automation.git","svn_url":"https://github.com/citusdata/test-automation","homepage":null,"size":872,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"citusdata:empty_branch","ref":"empty_branch","sha":"d7a8188aeab7768118a639402ebfbee058ca1299","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":76336560,"name":"test-automation","full_name":"citusdata/test-automation","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/test-automation","description":"Tools for making our tests easier to run","fork":false,"url":"https://api.github.com/repos/citusdata/test-automation","forks_url":"https://api.github.com/repos/citusdata/test-automation/forks","keys_url":"https://api.github.com/repos/citusdata/test-automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/test-automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/test-automation/teams","hooks_url":"https://api.github.com/repos/citusdata/test-automation/hooks","issue_events_url":"https://api.github.com/repos/citusdata/test-automation/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/test-automation/events","assignees_url":"https://api.github.com/repos/citusdata/test-automation/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/test-automation/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/test-automation/tags","blobs_url":"https://api.github.com/repos/citusdata/test-automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/test-automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/test-automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/test-automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/test-automation/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/test-automation/languages","stargazers_url":"https://api.github.com/repos/citusdata/test-automation/stargazers","contributors_url":"https://api.github.com/repos/citusdata/test-automation/contributors","subscribers_url":"https://api.github.com/repos/citusdata/test-automation/subscribers","subscription_url":"https://api.github.com/repos/citusdata/test-automation/subscription","commits_url":"https://api.github.com/repos/citusdata/test-automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/test-automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/test-automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/test-automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/test-automation/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/test-automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/test-automation/merges","archive_url":"https://api.github.com/repos/citusdata/test-automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/test-automation/downloads","issues_url":"https://api.github.com/repos/citusdata/test-automation/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/test-automation/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/test-automation/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/test-automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/test-automation/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/test-automation/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/test-automation/deployments","created_at":"2016-12-13T08:02:28Z","updated_at":"2016-12-19T17:03:20Z","pushed_at":"2016-12-26T16:01:05Z","git_url":"git://github.com/citusdata/test-automation.git","ssh_url":"git@github.com:citusdata/test-automation.git","clone_url":"https://github.com/citusdata/test-automation.git","svn_url":"https://github.com/citusdata/test-automation","homepage":null,"size":872,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/10"},"html":{"href":"https://github.com/citusdata/test-automation/pull/10"},"issue":{"href":"https://api.github.com/repos/citusdata/test-automation/issues/10"},"comments":{"href":"https://api.github.com/repos/citusdata/test-automation/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/test-automation/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/test-automation/statuses/bfd2927003ce63648ea55ba2cef812b1e37bb6f3"}}}}
{"actor":{"display_login":"lithp"}}