{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/atomic/pulls/comments/81755631","pull_request_review_id":2710302,"id":81755631,"diff_hunk":"@@ -122,24 +129,29 @@ def push(self):\n         if self.args.verify_ssl is None:\n             self.args.verify_ssl = False\n \n-        if not self.args.username:\n-            self.args.username = util.input(\"Registry Username: \")\n-\n-        if not self.args.password:\n-            self.args.password = getpass.getpass(\"Registry Password: \")\n-\n         if (self.args.satellite | self.args.pulp):\n+            prompt()\n             if not self.args.url:\n                 self.args.url = util.input(\"URL: \")\n \n+        sign = True if self.args.sign_by else False\n+\n+        registry, _, _ = util.decompose(self.image)\n+        if sign and not self.args.satellite and not self.args.pulp:\n+            # Check if any local tokens exist\n+            if registry not in [x for x in self.load_local_tokens()]:\n+                # If we find a token for the registry, we don't\n+                # prompt for a username or password\n+                prompt()\n+","path":"Atomic/push.py","position":38,"original_position":38,"commit_id":"7da6785421dbb4682cd5b8a76860dcc7b3c3d602","original_commit_id":"7da6785421dbb4682cd5b8a76860dcc7b3c3d602","user":{"login":"rhatdan","id":2000835,"avatar_url":"https://avatars.githubusercontent.com/u/2000835?v=3","gravatar_id":"","url":"https://api.github.com/users/rhatdan","html_url":"https://github.com/rhatdan","followers_url":"https://api.github.com/users/rhatdan/followers","following_url":"https://api.github.com/users/rhatdan/following{/other_user}","gists_url":"https://api.github.com/users/rhatdan/gists{/gist_id}","starred_url":"https://api.github.com/users/rhatdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhatdan/subscriptions","organizations_url":"https://api.github.com/users/rhatdan/orgs","repos_url":"https://api.github.com/users/rhatdan/repos","events_url":"https://api.github.com/users/rhatdan/events{/privacy}","received_events_url":"https://api.github.com/users/rhatdan/received_events","type":"User","site_admin":false},"body":"Why not have this block to after the satellite and pulp checks are run.","created_at":"2016-10-04T13:27:52Z","updated_at":"2016-10-04T13:27:52Z","html_url":"https://github.com/projectatomic/atomic/pull/675#discussion_r81755631","pull_request_url":"https://api.github.com/repos/projectatomic/atomic/pulls/675","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/comments/81755631"},"html":{"href":"https://github.com/projectatomic/atomic/pull/675#discussion_r81755631"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/675"}}},"pull_request":{"url":"https://api.github.com/repos/projectatomic/atomic/pulls/675","id":87891603,"html_url":"https://github.com/projectatomic/atomic/pull/675","diff_url":"https://github.com/projectatomic/atomic/pull/675.diff","patch_url":"https://github.com/projectatomic/atomic/pull/675.patch","issue_url":"https://api.github.com/repos/projectatomic/atomic/issues/675","number":675,"state":"open","locked":false,"title":"Atomic/push.py: Don't prompt for password if token found","user":{"login":"baude","id":8824535,"avatar_url":"https://avatars.githubusercontent.com/u/8824535?v=3","gravatar_id":"","url":"https://api.github.com/users/baude","html_url":"https://github.com/baude","followers_url":"https://api.github.com/users/baude/followers","following_url":"https://api.github.com/users/baude/following{/other_user}","gists_url":"https://api.github.com/users/baude/gists{/gist_id}","starred_url":"https://api.github.com/users/baude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baude/subscriptions","organizations_url":"https://api.github.com/users/baude/orgs","repos_url":"https://api.github.com/users/baude/repos","events_url":"https://api.github.com/users/baude/events{/privacy}","received_events_url":"https://api.github.com/users/baude/received_events","type":"User","site_admin":false},"body":"If the user has a token for the registry, we assume the token\r\nis good and do not prompt for a username or password.","created_at":"2016-10-04T13:16:10Z","updated_at":"2016-10-04T13:28:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e855c858243196709da186a7a2377f503d657119","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/atomic/pulls/675/commits","review_comments_url":"https://api.github.com/repos/projectatomic/atomic/pulls/675/comments","review_comment_url":"https://api.github.com/repos/projectatomic/atomic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/atomic/issues/675/comments","statuses_url":"https://api.github.com/repos/projectatomic/atomic/statuses/7da6785421dbb4682cd5b8a76860dcc7b3c3d602","head":{"label":"baude:push_no_prompt","ref":"push_no_prompt","sha":"7da6785421dbb4682cd5b8a76860dcc7b3c3d602","user":{"login":"baude","id":8824535,"avatar_url":"https://avatars.githubusercontent.com/u/8824535?v=3","gravatar_id":"","url":"https://api.github.com/users/baude","html_url":"https://github.com/baude","followers_url":"https://api.github.com/users/baude/followers","following_url":"https://api.github.com/users/baude/following{/other_user}","gists_url":"https://api.github.com/users/baude/gists{/gist_id}","starred_url":"https://api.github.com/users/baude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baude/subscriptions","organizations_url":"https://api.github.com/users/baude/orgs","repos_url":"https://api.github.com/users/baude/repos","events_url":"https://api.github.com/users/baude/events{/privacy}","received_events_url":"https://api.github.com/users/baude/received_events","type":"User","site_admin":false},"repo":{"id":40921469,"name":"atomic","full_name":"baude/atomic","owner":{"login":"baude","id":8824535,"avatar_url":"https://avatars.githubusercontent.com/u/8824535?v=3","gravatar_id":"","url":"https://api.github.com/users/baude","html_url":"https://github.com/baude","followers_url":"https://api.github.com/users/baude/followers","following_url":"https://api.github.com/users/baude/following{/other_user}","gists_url":"https://api.github.com/users/baude/gists{/gist_id}","starred_url":"https://api.github.com/users/baude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baude/subscriptions","organizations_url":"https://api.github.com/users/baude/orgs","repos_url":"https://api.github.com/users/baude/repos","events_url":"https://api.github.com/users/baude/events{/privacy}","received_events_url":"https://api.github.com/users/baude/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baude/atomic","description":"Atomic Run Tool for installing/running/managing container images.","fork":true,"url":"https://api.github.com/repos/baude/atomic","forks_url":"https://api.github.com/repos/baude/atomic/forks","keys_url":"https://api.github.com/repos/baude/atomic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baude/atomic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baude/atomic/teams","hooks_url":"https://api.github.com/repos/baude/atomic/hooks","issue_events_url":"https://api.github.com/repos/baude/atomic/issues/events{/number}","events_url":"https://api.github.com/repos/baude/atomic/events","assignees_url":"https://api.github.com/repos/baude/atomic/assignees{/user}","branches_url":"https://api.github.com/repos/baude/atomic/branches{/branch}","tags_url":"https://api.github.com/repos/baude/atomic/tags","blobs_url":"https://api.github.com/repos/baude/atomic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baude/atomic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baude/atomic/git/refs{/sha}","trees_url":"https://api.github.com/repos/baude/atomic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baude/atomic/statuses/{sha}","languages_url":"https://api.github.com/repos/baude/atomic/languages","stargazers_url":"https://api.github.com/repos/baude/atomic/stargazers","contributors_url":"https://api.github.com/repos/baude/atomic/contributors","subscribers_url":"https://api.github.com/repos/baude/atomic/subscribers","subscription_url":"https://api.github.com/repos/baude/atomic/subscription","commits_url":"https://api.github.com/repos/baude/atomic/commits{/sha}","git_commits_url":"https://api.github.com/repos/baude/atomic/git/commits{/sha}","comments_url":"https://api.github.com/repos/baude/atomic/comments{/number}","issue_comment_url":"https://api.github.com/repos/baude/atomic/issues/comments{/number}","contents_url":"https://api.github.com/repos/baude/atomic/contents/{+path}","compare_url":"https://api.github.com/repos/baude/atomic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baude/atomic/merges","archive_url":"https://api.github.com/repos/baude/atomic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baude/atomic/downloads","issues_url":"https://api.github.com/repos/baude/atomic/issues{/number}","pulls_url":"https://api.github.com/repos/baude/atomic/pulls{/number}","milestones_url":"https://api.github.com/repos/baude/atomic/milestones{/number}","notifications_url":"https://api.github.com/repos/baude/atomic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baude/atomic/labels{/name}","releases_url":"https://api.github.com/repos/baude/atomic/releases{/id}","deployments_url":"https://api.github.com/repos/baude/atomic/deployments","created_at":"2015-08-17T19:12:19Z","updated_at":"2015-08-17T19:12:19Z","pushed_at":"2016-10-04T13:16:02Z","git_url":"git://github.com/baude/atomic.git","ssh_url":"git@github.com:baude/atomic.git","clone_url":"https://github.com/baude/atomic.git","svn_url":"https://github.com/baude/atomic","homepage":null,"size":4074,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"api_mount"}},"base":{"label":"projectatomic:master","ref":"master","sha":"d7af4a1307d01f48d3f03739e944ef460b066255","user":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"repo":{"id":29267754,"name":"atomic","full_name":"projectatomic/atomic","owner":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectatomic/atomic","description":"Atomic Run Tool for installing/running/managing container images.","fork":false,"url":"https://api.github.com/repos/projectatomic/atomic","forks_url":"https://api.github.com/repos/projectatomic/atomic/forks","keys_url":"https://api.github.com/repos/projectatomic/atomic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectatomic/atomic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectatomic/atomic/teams","hooks_url":"https://api.github.com/repos/projectatomic/atomic/hooks","issue_events_url":"https://api.github.com/repos/projectatomic/atomic/issues/events{/number}","events_url":"https://api.github.com/repos/projectatomic/atomic/events","assignees_url":"https://api.github.com/repos/projectatomic/atomic/assignees{/user}","branches_url":"https://api.github.com/repos/projectatomic/atomic/branches{/branch}","tags_url":"https://api.github.com/repos/projectatomic/atomic/tags","blobs_url":"https://api.github.com/repos/projectatomic/atomic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectatomic/atomic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectatomic/atomic/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectatomic/atomic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectatomic/atomic/statuses/{sha}","languages_url":"https://api.github.com/repos/projectatomic/atomic/languages","stargazers_url":"https://api.github.com/repos/projectatomic/atomic/stargazers","contributors_url":"https://api.github.com/repos/projectatomic/atomic/contributors","subscribers_url":"https://api.github.com/repos/projectatomic/atomic/subscribers","subscription_url":"https://api.github.com/repos/projectatomic/atomic/subscription","commits_url":"https://api.github.com/repos/projectatomic/atomic/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectatomic/atomic/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectatomic/atomic/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectatomic/atomic/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectatomic/atomic/contents/{+path}","compare_url":"https://api.github.com/repos/projectatomic/atomic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectatomic/atomic/merges","archive_url":"https://api.github.com/repos/projectatomic/atomic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectatomic/atomic/downloads","issues_url":"https://api.github.com/repos/projectatomic/atomic/issues{/number}","pulls_url":"https://api.github.com/repos/projectatomic/atomic/pulls{/number}","milestones_url":"https://api.github.com/repos/projectatomic/atomic/milestones{/number}","notifications_url":"https://api.github.com/repos/projectatomic/atomic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectatomic/atomic/labels{/name}","releases_url":"https://api.github.com/repos/projectatomic/atomic/releases{/id}","deployments_url":"https://api.github.com/repos/projectatomic/atomic/deployments","created_at":"2015-01-14T21:54:06Z","updated_at":"2016-09-29T20:08:52Z","pushed_at":"2016-10-04T13:16:10Z","git_url":"git://github.com/projectatomic/atomic.git","ssh_url":"git@github.com:projectatomic/atomic.git","clone_url":"https://github.com/projectatomic/atomic.git","svn_url":"https://github.com/projectatomic/atomic","homepage":null,"size":4410,"stargazers_count":214,"watchers_count":214,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"open_issues_count":41,"forks":97,"open_issues":41,"watchers":214,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/675"},"html":{"href":"https://github.com/projectatomic/atomic/pull/675"},"issue":{"href":"https://api.github.com/repos/projectatomic/atomic/issues/675"},"comments":{"href":"https://api.github.com/repos/projectatomic/atomic/issues/675/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/675/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/atomic/pulls/675/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/atomic/statuses/7da6785421dbb4682cd5b8a76860dcc7b3c3d602"}}}}
{"actor":{"display_login":"rhatdan"}}