{"action":"created","comment":{"url":"https://api.github.com/repos/gushphp/gush/pulls/comments/42313619","id":42313619,"diff_hunk":"@@ -45,26 +46,41 @@ class GitHubAdapter extends BaseAdapter implements IssueTracker, SupportsDynamic\n     protected $client;\n \n     /**\n-     * @var string\n-     */\n-    protected $authenticationType = Client::AUTH_HTTP_PASSWORD;\n-\n-    /**\n      * @var array\n      */\n     protected $config;\n \n     /**\n-     * @var \\Gush\\Config\n+     * @var Config\n      */\n     protected $globalConfig;\n \n     /**\n      * @param array  $config\n      * @param Config $globalConfig\n+     *\n+     * @throws UserException\n      */\n     public function __construct(array $config, Config $globalConfig)\n     {\n+        if (!isset($config['base_url'], $config['repo_domain_url'])) {\n+            throw new UserException(\n+                'Your GitHub adapter configuration is invalid. Please run \"core:configure\".'\n+            );\n+        }\n+\n+        if (!isset($config['authentication']['token'])) {\n+            throw new UserException(\n+                [\n+                    'Your GitHub adapter configuration seems to be outdated.',\n+                    'For better security Gush will now always generate an personal access-token '.\n+                    'instead of storing your password.',\n+                    'Please run \"core:configure\" to update you configuration, then remove any old '.","path":"src/ThirdParty/Github/GitHubAdapter.php","position":47,"original_position":47,"commit_id":"077d86cea13511e16888c137031f4534d679b4ac","original_commit_id":"077d86cea13511e16888c137031f4534d679b4ac","user":{"login":"cordoval","id":328359,"avatar_url":"https://avatars.githubusercontent.com/u/328359?v=3","gravatar_id":"","url":"https://api.github.com/users/cordoval","html_url":"https://github.com/cordoval","followers_url":"https://api.github.com/users/cordoval/followers","following_url":"https://api.github.com/users/cordoval/following{/other_user}","gists_url":"https://api.github.com/users/cordoval/gists{/gist_id}","starred_url":"https://api.github.com/users/cordoval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cordoval/subscriptions","organizations_url":"https://api.github.com/users/cordoval/orgs","repos_url":"https://api.github.com/users/cordoval/repos","events_url":"https://api.github.com/users/cordoval/events{/privacy}","received_events_url":"https://api.github.com/users/cordoval/received_events","type":"User","site_admin":false},"body":"there is a typo here you -> your","created_at":"2015-10-17T20:08:44Z","updated_at":"2015-10-17T20:08:44Z","html_url":"https://github.com/gushphp/gush/pull/512#discussion_r42313619","pull_request_url":"https://api.github.com/repos/gushphp/gush/pulls/512","_links":{"self":{"href":"https://api.github.com/repos/gushphp/gush/pulls/comments/42313619"},"html":{"href":"https://github.com/gushphp/gush/pull/512#discussion_r42313619"},"pull_request":{"href":"https://api.github.com/repos/gushphp/gush/pulls/512"}}},"pull_request":{"url":"https://api.github.com/repos/gushphp/gush/pulls/512","id":47983956,"html_url":"https://github.com/gushphp/gush/pull/512","diff_url":"https://github.com/gushphp/gush/pull/512.diff","patch_url":"https://github.com/gushphp/gush/pull/512.patch","issue_url":"https://api.github.com/repos/gushphp/gush/issues/512","number":512,"state":"open","locked":false,"title":"[Github] Always generate token for authentication","user":{"login":"sstok","id":904790,"avatar_url":"https://avatars.githubusercontent.com/u/904790?v=3","gravatar_id":"","url":"https://api.github.com/users/sstok","html_url":"https://github.com/sstok","followers_url":"https://api.github.com/users/sstok/followers","following_url":"https://api.github.com/users/sstok/following{/other_user}","gists_url":"https://api.github.com/users/sstok/gists{/gist_id}","starred_url":"https://api.github.com/users/sstok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstok/subscriptions","organizations_url":"https://api.github.com/users/sstok/orgs","repos_url":"https://api.github.com/users/sstok/repos","events_url":"https://api.github.com/users/sstok/events{/privacy}","received_events_url":"https://api.github.com/users/sstok/received_events","type":"User","site_admin":false},"body":"|Q            |A  |\r\n|---          |---|\r\n|Fixed Tickets|   |\r\n|License      |MIT|\r\n                   \r\nThis got lost when removing the 2.0 branch of the GitHub adapter.\r\n\r\nDon't store the password but always generate token. BC breaks in the configuration format, but only for one adapter and it fixes security :+1:","created_at":"2015-10-17T10:17:25Z","updated_at":"2015-10-17T20:08:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f05c4bb3de42e1d9a3a05980f801081331c70b75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gushphp/gush/pulls/512/commits","review_comments_url":"https://api.github.com/repos/gushphp/gush/pulls/512/comments","review_comment_url":"https://api.github.com/repos/gushphp/gush/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gushphp/gush/issues/512/comments","statuses_url":"https://api.github.com/repos/gushphp/gush/statuses/077d86cea13511e16888c137031f4534d679b4ac","head":{"label":"sstok:feature-github-always-use-token","ref":"feature-github-always-use-token","sha":"077d86cea13511e16888c137031f4534d679b4ac","user":{"login":"sstok","id":904790,"avatar_url":"https://avatars.githubusercontent.com/u/904790?v=3","gravatar_id":"","url":"https://api.github.com/users/sstok","html_url":"https://github.com/sstok","followers_url":"https://api.github.com/users/sstok/followers","following_url":"https://api.github.com/users/sstok/following{/other_user}","gists_url":"https://api.github.com/users/sstok/gists{/gist_id}","starred_url":"https://api.github.com/users/sstok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstok/subscriptions","organizations_url":"https://api.github.com/users/sstok/orgs","repos_url":"https://api.github.com/users/sstok/repos","events_url":"https://api.github.com/users/sstok/events{/privacy}","received_events_url":"https://api.github.com/users/sstok/received_events","type":"User","site_admin":false},"repo":{"id":19689159,"name":"gush","full_name":"sstok/gush","owner":{"login":"sstok","id":904790,"avatar_url":"https://avatars.githubusercontent.com/u/904790?v=3","gravatar_id":"","url":"https://api.github.com/users/sstok","html_url":"https://github.com/sstok","followers_url":"https://api.github.com/users/sstok/followers","following_url":"https://api.github.com/users/sstok/following{/other_user}","gists_url":"https://api.github.com/users/sstok/gists{/gist_id}","starred_url":"https://api.github.com/users/sstok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstok/subscriptions","organizations_url":"https://api.github.com/users/sstok/orgs","repos_url":"https://api.github.com/users/sstok/repos","events_url":"https://api.github.com/users/sstok/events{/privacy}","received_events_url":"https://api.github.com/users/sstok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sstok/gush","description":"Open Source & Enterprise FAST project maintainance/contributing","fork":true,"url":"https://api.github.com/repos/sstok/gush","forks_url":"https://api.github.com/repos/sstok/gush/forks","keys_url":"https://api.github.com/repos/sstok/gush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sstok/gush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sstok/gush/teams","hooks_url":"https://api.github.com/repos/sstok/gush/hooks","issue_events_url":"https://api.github.com/repos/sstok/gush/issues/events{/number}","events_url":"https://api.github.com/repos/sstok/gush/events","assignees_url":"https://api.github.com/repos/sstok/gush/assignees{/user}","branches_url":"https://api.github.com/repos/sstok/gush/branches{/branch}","tags_url":"https://api.github.com/repos/sstok/gush/tags","blobs_url":"https://api.github.com/repos/sstok/gush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sstok/gush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sstok/gush/git/refs{/sha}","trees_url":"https://api.github.com/repos/sstok/gush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sstok/gush/statuses/{sha}","languages_url":"https://api.github.com/repos/sstok/gush/languages","stargazers_url":"https://api.github.com/repos/sstok/gush/stargazers","contributors_url":"https://api.github.com/repos/sstok/gush/contributors","subscribers_url":"https://api.github.com/repos/sstok/gush/subscribers","subscription_url":"https://api.github.com/repos/sstok/gush/subscription","commits_url":"https://api.github.com/repos/sstok/gush/commits{/sha}","git_commits_url":"https://api.github.com/repos/sstok/gush/git/commits{/sha}","comments_url":"https://api.github.com/repos/sstok/gush/comments{/number}","issue_comment_url":"https://api.github.com/repos/sstok/gush/issues/comments{/number}","contents_url":"https://api.github.com/repos/sstok/gush/contents/{+path}","compare_url":"https://api.github.com/repos/sstok/gush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sstok/gush/merges","archive_url":"https://api.github.com/repos/sstok/gush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sstok/gush/downloads","issues_url":"https://api.github.com/repos/sstok/gush/issues{/number}","pulls_url":"https://api.github.com/repos/sstok/gush/pulls{/number}","milestones_url":"https://api.github.com/repos/sstok/gush/milestones{/number}","notifications_url":"https://api.github.com/repos/sstok/gush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sstok/gush/labels{/name}","releases_url":"https://api.github.com/repos/sstok/gush/releases{/id}","created_at":"2014-05-12T07:09:35Z","updated_at":"2015-05-07T10:15:10Z","pushed_at":"2015-10-17T12:40:53Z","git_url":"git://github.com/sstok/gush.git","ssh_url":"git@github.com:sstok/gush.git","clone_url":"https://github.com/sstok/gush.git","svn_url":"https://github.com/sstok/gush","homepage":"http://gushphp.org","size":4083,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gushphp:master","ref":"master","sha":"983bd2c95f1f857c750a8dda350aa5f91c3b0dbc","user":{"login":"gushphp","id":6666950,"avatar_url":"https://avatars.githubusercontent.com/u/6666950?v=3","gravatar_id":"","url":"https://api.github.com/users/gushphp","html_url":"https://github.com/gushphp","followers_url":"https://api.github.com/users/gushphp/followers","following_url":"https://api.github.com/users/gushphp/following{/other_user}","gists_url":"https://api.github.com/users/gushphp/gists{/gist_id}","starred_url":"https://api.github.com/users/gushphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gushphp/subscriptions","organizations_url":"https://api.github.com/users/gushphp/orgs","repos_url":"https://api.github.com/users/gushphp/repos","events_url":"https://api.github.com/users/gushphp/events{/privacy}","received_events_url":"https://api.github.com/users/gushphp/received_events","type":"Organization","site_admin":false},"repo":{"id":16789051,"name":"gush","full_name":"gushphp/gush","owner":{"login":"gushphp","id":6666950,"avatar_url":"https://avatars.githubusercontent.com/u/6666950?v=3","gravatar_id":"","url":"https://api.github.com/users/gushphp","html_url":"https://github.com/gushphp","followers_url":"https://api.github.com/users/gushphp/followers","following_url":"https://api.github.com/users/gushphp/following{/other_user}","gists_url":"https://api.github.com/users/gushphp/gists{/gist_id}","starred_url":"https://api.github.com/users/gushphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gushphp/subscriptions","organizations_url":"https://api.github.com/users/gushphp/orgs","repos_url":"https://api.github.com/users/gushphp/repos","events_url":"https://api.github.com/users/gushphp/events{/privacy}","received_events_url":"https://api.github.com/users/gushphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gushphp/gush","description":"Project Maintenance & Contributing Automation","fork":false,"url":"https://api.github.com/repos/gushphp/gush","forks_url":"https://api.github.com/repos/gushphp/gush/forks","keys_url":"https://api.github.com/repos/gushphp/gush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gushphp/gush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gushphp/gush/teams","hooks_url":"https://api.github.com/repos/gushphp/gush/hooks","issue_events_url":"https://api.github.com/repos/gushphp/gush/issues/events{/number}","events_url":"https://api.github.com/repos/gushphp/gush/events","assignees_url":"https://api.github.com/repos/gushphp/gush/assignees{/user}","branches_url":"https://api.github.com/repos/gushphp/gush/branches{/branch}","tags_url":"https://api.github.com/repos/gushphp/gush/tags","blobs_url":"https://api.github.com/repos/gushphp/gush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gushphp/gush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gushphp/gush/git/refs{/sha}","trees_url":"https://api.github.com/repos/gushphp/gush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gushphp/gush/statuses/{sha}","languages_url":"https://api.github.com/repos/gushphp/gush/languages","stargazers_url":"https://api.github.com/repos/gushphp/gush/stargazers","contributors_url":"https://api.github.com/repos/gushphp/gush/contributors","subscribers_url":"https://api.github.com/repos/gushphp/gush/subscribers","subscription_url":"https://api.github.com/repos/gushphp/gush/subscription","commits_url":"https://api.github.com/repos/gushphp/gush/commits{/sha}","git_commits_url":"https://api.github.com/repos/gushphp/gush/git/commits{/sha}","comments_url":"https://api.github.com/repos/gushphp/gush/comments{/number}","issue_comment_url":"https://api.github.com/repos/gushphp/gush/issues/comments{/number}","contents_url":"https://api.github.com/repos/gushphp/gush/contents/{+path}","compare_url":"https://api.github.com/repos/gushphp/gush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gushphp/gush/merges","archive_url":"https://api.github.com/repos/gushphp/gush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gushphp/gush/downloads","issues_url":"https://api.github.com/repos/gushphp/gush/issues{/number}","pulls_url":"https://api.github.com/repos/gushphp/gush/pulls{/number}","milestones_url":"https://api.github.com/repos/gushphp/gush/milestones{/number}","notifications_url":"https://api.github.com/repos/gushphp/gush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gushphp/gush/labels{/name}","releases_url":"https://api.github.com/repos/gushphp/gush/releases{/id}","created_at":"2014-02-13T02:14:36Z","updated_at":"2015-10-14T19:42:04Z","pushed_at":"2015-10-17T18:20:58Z","git_url":"git://github.com/gushphp/gush.git","ssh_url":"git@github.com:gushphp/gush.git","clone_url":"https://github.com/gushphp/gush.git","svn_url":"https://github.com/gushphp/gush","homepage":"http://gushphp.org","size":6298,"stargazers_count":245,"watchers_count":245,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":17,"forks":42,"open_issues":17,"watchers":245,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gushphp/gush/pulls/512"},"html":{"href":"https://github.com/gushphp/gush/pull/512"},"issue":{"href":"https://api.github.com/repos/gushphp/gush/issues/512"},"comments":{"href":"https://api.github.com/repos/gushphp/gush/issues/512/comments"},"review_comments":{"href":"https://api.github.com/repos/gushphp/gush/pulls/512/comments"},"review_comment":{"href":"https://api.github.com/repos/gushphp/gush/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gushphp/gush/pulls/512/commits"},"statuses":{"href":"https://api.github.com/repos/gushphp/gush/statuses/077d86cea13511e16888c137031f4534d679b4ac"}}}}