{"action":"created","comment":{"url":"https://api.github.com/repos/github/hub/pulls/comments/35129590","id":35129590,"diff_hunk":"@@ -117,6 +117,25 @@ Feature: OAuth authentication\n     Then the output should not contain \"github.com password for mislav\"\n     And the file \"../home/.config/hub\" should contain \"oauth_token: OTOKEN\"\n \n+  Scenario: Credentials from GITHUB_TOKEN\n+    Given the GitHub API server:\n+      \"\"\"\n+      post('/authorizations') {\n+        assert_basic_auth 'mislav', 'kitty'\n+        json :token => 'OTOKEN'\n+      }\n+      get('/user') {\n+        json :login => 'mislav'\n+      }\n+      post('/user/repos') {\n+        json :full_name => 'mislav/dotfiles'\n+      }\n+      \"\"\"\n+    Given $GITHUB_TOKEN is \"feline0123\"\n+    When I successfully run `hub create`\n+    Then the output should not contain \"github.com password\"\n+    And the file \"../home/.config/hub\" should contain \"oauth_token: feline0123\"","path":"features/authentication.feature","position":21,"original_position":21,"commit_id":"9c0b2e1ead43b0a11f3dc129b4165829833a7d33","original_commit_id":"9c0b2e1ead43b0a11f3dc129b4165829833a7d33","user":{"login":"mislav","id":887,"avatar_url":"https://avatars.githubusercontent.com/u/887?v=3","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true},"body":"The token provided by environment variable should **never** result in `~/.config/hub` changing.","created_at":"2015-07-21T17:28:39Z","updated_at":"2015-07-21T17:28:39Z","html_url":"https://github.com/github/hub/pull/953#discussion_r35129590","pull_request_url":"https://api.github.com/repos/github/hub/pulls/953","_links":{"self":{"href":"https://api.github.com/repos/github/hub/pulls/comments/35129590"},"html":{"href":"https://github.com/github/hub/pull/953#discussion_r35129590"},"pull_request":{"href":"https://api.github.com/repos/github/hub/pulls/953"}}},"pull_request":{"url":"https://api.github.com/repos/github/hub/pulls/953","id":39615836,"html_url":"https://github.com/github/hub/pull/953","diff_url":"https://github.com/github/hub/pull/953.diff","patch_url":"https://github.com/github/hub/pull/953.patch","issue_url":"https://api.github.com/repos/github/hub/issues/953","number":953,"state":"open","locked":false,"title":"config: if GITHUB_TOKEN is set, do not attempt to create one","user":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":false},"body":"Fixes #463 and #948.\r\n\r\nI looked for tests, but couldn't find any for config.\r\n\r\n/cc @jingweno @mislav ","created_at":"2015-07-09T18:52:57Z","updated_at":"2015-07-21T17:28:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48bb0e3d0637e0cf9bb0ecc36cb2f1107d97b5bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/github/hub/pulls/953/commits","review_comments_url":"https://api.github.com/repos/github/hub/pulls/953/comments","review_comment_url":"https://api.github.com/repos/github/hub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/hub/issues/953/comments","statuses_url":"https://api.github.com/repos/github/hub/statuses/9c0b2e1ead43b0a11f3dc129b4165829833a7d33","head":{"label":"parkr:GITHUB_TOKEN","ref":"GITHUB_TOKEN","sha":"9c0b2e1ead43b0a11f3dc129b4165829833a7d33","user":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":false},"repo":{"id":38833701,"name":"hub","full_name":"parkr/hub","owner":{"login":"parkr","id":237985,"avatar_url":"https://avatars.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parkr/hub","description":"hub helps you win at git.","fork":true,"url":"https://api.github.com/repos/parkr/hub","forks_url":"https://api.github.com/repos/parkr/hub/forks","keys_url":"https://api.github.com/repos/parkr/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parkr/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parkr/hub/teams","hooks_url":"https://api.github.com/repos/parkr/hub/hooks","issue_events_url":"https://api.github.com/repos/parkr/hub/issues/events{/number}","events_url":"https://api.github.com/repos/parkr/hub/events","assignees_url":"https://api.github.com/repos/parkr/hub/assignees{/user}","branches_url":"https://api.github.com/repos/parkr/hub/branches{/branch}","tags_url":"https://api.github.com/repos/parkr/hub/tags","blobs_url":"https://api.github.com/repos/parkr/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parkr/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parkr/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/parkr/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parkr/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/parkr/hub/languages","stargazers_url":"https://api.github.com/repos/parkr/hub/stargazers","contributors_url":"https://api.github.com/repos/parkr/hub/contributors","subscribers_url":"https://api.github.com/repos/parkr/hub/subscribers","subscription_url":"https://api.github.com/repos/parkr/hub/subscription","commits_url":"https://api.github.com/repos/parkr/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/parkr/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/parkr/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/parkr/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/parkr/hub/contents/{+path}","compare_url":"https://api.github.com/repos/parkr/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parkr/hub/merges","archive_url":"https://api.github.com/repos/parkr/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parkr/hub/downloads","issues_url":"https://api.github.com/repos/parkr/hub/issues{/number}","pulls_url":"https://api.github.com/repos/parkr/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/parkr/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/parkr/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parkr/hub/labels{/name}","releases_url":"https://api.github.com/repos/parkr/hub/releases{/id}","created_at":"2015-07-09T16:59:16Z","updated_at":"2015-07-09T16:59:17Z","pushed_at":"2015-07-09T23:48:30Z","git_url":"git://github.com/parkr/hub.git","ssh_url":"git@github.com:parkr/hub.git","clone_url":"https://github.com/parkr/hub.git","svn_url":"https://github.com/parkr/hub","homepage":"http://hub.github.com/","size":3520,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"ca7939be58e765cf0d3df60d4277efd441ff04fd","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":401025,"name":"hub","full_name":"github/hub","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/hub","description":"hub helps you win at git.","fork":false,"url":"https://api.github.com/repos/github/hub","forks_url":"https://api.github.com/repos/github/hub/forks","keys_url":"https://api.github.com/repos/github/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/hub/teams","hooks_url":"https://api.github.com/repos/github/hub/hooks","issue_events_url":"https://api.github.com/repos/github/hub/issues/events{/number}","events_url":"https://api.github.com/repos/github/hub/events","assignees_url":"https://api.github.com/repos/github/hub/assignees{/user}","branches_url":"https://api.github.com/repos/github/hub/branches{/branch}","tags_url":"https://api.github.com/repos/github/hub/tags","blobs_url":"https://api.github.com/repos/github/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/github/hub/languages","stargazers_url":"https://api.github.com/repos/github/hub/stargazers","contributors_url":"https://api.github.com/repos/github/hub/contributors","subscribers_url":"https://api.github.com/repos/github/hub/subscribers","subscription_url":"https://api.github.com/repos/github/hub/subscription","commits_url":"https://api.github.com/repos/github/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/hub/contents/{+path}","compare_url":"https://api.github.com/repos/github/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/hub/merges","archive_url":"https://api.github.com/repos/github/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/hub/downloads","issues_url":"https://api.github.com/repos/github/hub/issues{/number}","pulls_url":"https://api.github.com/repos/github/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/github/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/github/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/hub/labels{/name}","releases_url":"https://api.github.com/repos/github/hub/releases{/id}","created_at":"2009-12-05T22:15:25Z","updated_at":"2015-07-21T16:31:28Z","pushed_at":"2015-07-20T21:31:58Z","git_url":"git://github.com/github/hub.git","ssh_url":"git@github.com:github/hub.git","clone_url":"https://github.com/github/hub.git","svn_url":"https://github.com/github/hub","homepage":"http://hub.github.com/","size":7539,"stargazers_count":6784,"watchers_count":6784,"language":"Go","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":588,"mirror_url":null,"open_issues_count":149,"forks":588,"open_issues":149,"watchers":6784,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/hub/pulls/953"},"html":{"href":"https://github.com/github/hub/pull/953"},"issue":{"href":"https://api.github.com/repos/github/hub/issues/953"},"comments":{"href":"https://api.github.com/repos/github/hub/issues/953/comments"},"review_comments":{"href":"https://api.github.com/repos/github/hub/pulls/953/comments"},"review_comment":{"href":"https://api.github.com/repos/github/hub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/hub/pulls/953/commits"},"statuses":{"href":"https://api.github.com/repos/github/hub/statuses/9c0b2e1ead43b0a11f3dc129b4165829833a7d33"}}}}