{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/vip-cli/pulls/comments/67581464","id":67581464,"diff_hunk":"@@ -23,6 +25,45 @@ if (!!is_vip) {\n \t\t.command( 'api', 'Authenticated API requests' );\n \n \tprogram\n+\t\t.command( 'db <site>' )\n+\t\t.description( 'Connect to a given VIP Go database' )\n+\t\t.action( site => {\n+\t\t\tutils.site( site, s => {\n+\t\t\t\tvar ays = s.environment_name == \"production\" ? 'This is the database for PRODUCTION. Are you sure?' : 'Are you sure?';\n+","path":"bin/vip.js","position":19,"original_position":19,"commit_id":"9c09b98f22d4057ed10fe7f37542437e69d853b6","original_commit_id":"9c09b98f22d4057ed10fe7f37542437e69d853b6","user":{"login":"nickdaugherty","id":1103700,"avatar_url":"https://avatars.githubusercontent.com/u/1103700?v=3","gravatar_id":"","url":"https://api.github.com/users/nickdaugherty","html_url":"https://github.com/nickdaugherty","followers_url":"https://api.github.com/users/nickdaugherty/followers","following_url":"https://api.github.com/users/nickdaugherty/following{/other_user}","gists_url":"https://api.github.com/users/nickdaugherty/gists{/gist_id}","starred_url":"https://api.github.com/users/nickdaugherty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickdaugherty/subscriptions","organizations_url":"https://api.github.com/users/nickdaugherty/orgs","repos_url":"https://api.github.com/users/nickdaugherty/repos","events_url":"https://api.github.com/users/nickdaugherty/events{/privacy}","received_events_url":"https://api.github.com/users/nickdaugherty/received_events","type":"User","site_admin":false},"body":"Since searching by domain can return multiple results, and the first one is not guaranteed to be the right one every time, I wonder if we should return an array from `utils.site`, then present the options to the user here, and make them pick which one they meant. \r\n\r\nOf course if there is only one result, we can assume that one.","created_at":"2016-06-17T22:01:04Z","updated_at":"2016-06-17T22:01:04Z","html_url":"https://github.com/Automattic/vip-cli/pull/6#discussion_r67581464","pull_request_url":"https://api.github.com/repos/Automattic/vip-cli/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/comments/67581464"},"html":{"href":"https://github.com/Automattic/vip-cli/pull/6#discussion_r67581464"},"pull_request":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/vip-cli/pulls/6","id":74295359,"html_url":"https://github.com/Automattic/vip-cli/pull/6","diff_url":"https://github.com/Automattic/vip-cli/pull/6.diff","patch_url":"https://github.com/Automattic/vip-cli/pull/6.patch","issue_url":"https://api.github.com/repos/Automattic/vip-cli/issues/6","number":6,"state":"open","locked":false,"title":"Add `vip db <site>` command.","user":{"login":"joshbetz","id":300429,"avatar_url":"https://avatars.githubusercontent.com/u/300429?v=3","gravatar_id":"","url":"https://api.github.com/users/joshbetz","html_url":"https://github.com/joshbetz","followers_url":"https://api.github.com/users/joshbetz/followers","following_url":"https://api.github.com/users/joshbetz/following{/other_user}","gists_url":"https://api.github.com/users/joshbetz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshbetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshbetz/subscriptions","organizations_url":"https://api.github.com/users/joshbetz/orgs","repos_url":"https://api.github.com/users/joshbetz/repos","events_url":"https://api.github.com/users/joshbetz/events{/privacy}","received_events_url":"https://api.github.com/users/joshbetz/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-17T19:46:56Z","updated_at":"2016-06-17T22:01:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de8ac31e74818c4b6b761864aee4028511f38631","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/vip-cli/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Automattic/vip-cli/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Automattic/vip-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/vip-cli/issues/6/comments","statuses_url":"https://api.github.com/repos/Automattic/vip-cli/statuses/9c09b98f22d4057ed10fe7f37542437e69d853b6","head":{"label":"Automattic:add/vip-db","ref":"add/vip-db","sha":"9c09b98f22d4057ed10fe7f37542437e69d853b6","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":47140297,"name":"vip-cli","full_name":"Automattic/vip-cli","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/vip-cli","description":"CLI Tools for WordPress.com VIP","fork":false,"url":"https://api.github.com/repos/Automattic/vip-cli","forks_url":"https://api.github.com/repos/Automattic/vip-cli/forks","keys_url":"https://api.github.com/repos/Automattic/vip-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/vip-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/vip-cli/teams","hooks_url":"https://api.github.com/repos/Automattic/vip-cli/hooks","issue_events_url":"https://api.github.com/repos/Automattic/vip-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/vip-cli/events","assignees_url":"https://api.github.com/repos/Automattic/vip-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/vip-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/vip-cli/tags","blobs_url":"https://api.github.com/repos/Automattic/vip-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/vip-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/vip-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/vip-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/vip-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/vip-cli/languages","stargazers_url":"https://api.github.com/repos/Automattic/vip-cli/stargazers","contributors_url":"https://api.github.com/repos/Automattic/vip-cli/contributors","subscribers_url":"https://api.github.com/repos/Automattic/vip-cli/subscribers","subscription_url":"https://api.github.com/repos/Automattic/vip-cli/subscription","commits_url":"https://api.github.com/repos/Automattic/vip-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/vip-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/vip-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/vip-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/vip-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/vip-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/vip-cli/merges","archive_url":"https://api.github.com/repos/Automattic/vip-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/vip-cli/downloads","issues_url":"https://api.github.com/repos/Automattic/vip-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/vip-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/vip-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/vip-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/vip-cli/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/vip-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/vip-cli/deployments","created_at":"2015-11-30T19:15:19Z","updated_at":"2016-06-06T20:48:52Z","pushed_at":"2016-06-17T20:59:51Z","git_url":"git://github.com/Automattic/vip-cli.git","ssh_url":"git@github.com:Automattic/vip-cli.git","clone_url":"https://github.com/Automattic/vip-cli.git","svn_url":"https://github.com/Automattic/vip-cli","homepage":null,"size":12,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"03a053598c9fb7b1833205003784f5b647ab8b21","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":47140297,"name":"vip-cli","full_name":"Automattic/vip-cli","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/vip-cli","description":"CLI Tools for WordPress.com VIP","fork":false,"url":"https://api.github.com/repos/Automattic/vip-cli","forks_url":"https://api.github.com/repos/Automattic/vip-cli/forks","keys_url":"https://api.github.com/repos/Automattic/vip-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/vip-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/vip-cli/teams","hooks_url":"https://api.github.com/repos/Automattic/vip-cli/hooks","issue_events_url":"https://api.github.com/repos/Automattic/vip-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/vip-cli/events","assignees_url":"https://api.github.com/repos/Automattic/vip-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/vip-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/vip-cli/tags","blobs_url":"https://api.github.com/repos/Automattic/vip-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/vip-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/vip-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/vip-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/vip-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/vip-cli/languages","stargazers_url":"https://api.github.com/repos/Automattic/vip-cli/stargazers","contributors_url":"https://api.github.com/repos/Automattic/vip-cli/contributors","subscribers_url":"https://api.github.com/repos/Automattic/vip-cli/subscribers","subscription_url":"https://api.github.com/repos/Automattic/vip-cli/subscription","commits_url":"https://api.github.com/repos/Automattic/vip-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/vip-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/vip-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/vip-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/vip-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/vip-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/vip-cli/merges","archive_url":"https://api.github.com/repos/Automattic/vip-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/vip-cli/downloads","issues_url":"https://api.github.com/repos/Automattic/vip-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/vip-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/vip-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/vip-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/vip-cli/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/vip-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/vip-cli/deployments","created_at":"2015-11-30T19:15:19Z","updated_at":"2016-06-06T20:48:52Z","pushed_at":"2016-06-17T20:59:51Z","git_url":"git://github.com/Automattic/vip-cli.git","ssh_url":"git@github.com:Automattic/vip-cli.git","clone_url":"https://github.com/Automattic/vip-cli.git","svn_url":"https://github.com/Automattic/vip-cli","homepage":null,"size":12,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/6"},"html":{"href":"https://github.com/Automattic/vip-cli/pull/6"},"issue":{"href":"https://api.github.com/repos/Automattic/vip-cli/issues/6"},"comments":{"href":"https://api.github.com/repos/Automattic/vip-cli/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/vip-cli/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/vip-cli/statuses/9c09b98f22d4057ed10fe7f37542437e69d853b6"}}}}
{"actor":{"display_login":"nickdaugherty"}}