{"action":"created","comment":{"url":"https://api.github.com/repos/SUSE/connect/pulls/comments/188256706","pull_request_review_id":120195515,"id":188256706,"diff_hunk":"@@ -287,51 +287,75 @@\n \n       allow(subject).to receive(:show_product).and_return product\n       allow(subject).to receive(:register_product).and_return true\n+      allow(subject).to receive(:announce_system)\n       SUSE::Connect::GlobalLogger.instance.log = string_logger\n     end\n \n     after do\n       SUSE::Connect::GlobalLogger.instance.log = default_logger\n     end\n \n-    it 'should call announce if system not registered' do\n-      expect(subject).to receive(:announce_system)\n-      subject.register!\n-    end\n+    context 'when the system is not registered' do\n+      it 'announces the system' do\n+        expect(subject).to receive(:announce_system)\n+        subject.register!\n+      end\n \n-    it 'should not call announce but update on api if system registered' do\n-      allow(System).to receive_messages(credentials?: true)\n-      expect(subject).not_to receive(:announce_system)\n-      expect(subject).to receive(:update_system)\n-      subject.register!\n-    end\n+      it 'writes credentials file' do\n+        allow(System).to receive_messages(credentials?: false)\n+        allow(subject).to receive_messages(announce_system: %w[lg pw])\n+        expect(Credentials).to receive(:new).with('lg', 'pw', Credentials::GLOBAL_CREDENTIALS_FILE).and_call_original","path":"spec/connect/client_spec.rb","position":null,"original_position":31,"commit_id":"3084d6787c06007eff48446fe06a81a323935489","original_commit_id":"fef8aef5eb42de598aa868f2c498447d2715c00e","user":{"login":"lagartoflojo","id":2944,"avatar_url":"https://avatars1.githubusercontent.com/u/2944?v=4","gravatar_id":"","url":"https://api.github.com/users/lagartoflojo","html_url":"https://github.com/lagartoflojo","followers_url":"https://api.github.com/users/lagartoflojo/followers","following_url":"https://api.github.com/users/lagartoflojo/following{/other_user}","gists_url":"https://api.github.com/users/lagartoflojo/gists{/gist_id}","starred_url":"https://api.github.com/users/lagartoflojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagartoflojo/subscriptions","organizations_url":"https://api.github.com/users/lagartoflojo/orgs","repos_url":"https://api.github.com/users/lagartoflojo/repos","events_url":"https://api.github.com/users/lagartoflojo/events{/privacy}","received_events_url":"https://api.github.com/users/lagartoflojo/received_events","type":"User","site_admin":false},"body":"Fixed!","created_at":"2018-05-15T11:47:24Z","updated_at":"2018-05-15T11:47:24Z","html_url":"https://github.com/SUSE/connect/pull/365#discussion_r188256706","pull_request_url":"https://api.github.com/repos/SUSE/connect/pulls/365","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SUSE/connect/pulls/comments/188256706"},"html":{"href":"https://github.com/SUSE/connect/pull/365#discussion_r188256706"},"pull_request":{"href":"https://api.github.com/repos/SUSE/connect/pulls/365"}},"in_reply_to_id":188238529},"pull_request":{"url":"https://api.github.com/repos/SUSE/connect/pulls/365","id":186386641,"html_url":"https://github.com/SUSE/connect/pull/365","diff_url":"https://github.com/SUSE/connect/pull/365.diff","patch_url":"https://github.com/SUSE/connect/pull/365.patch","issue_url":"https://api.github.com/repos/SUSE/connect/issues/365","number":365,"state":"open","locked":false,"title":"Skip non-mirrored products when registering","user":{"login":"lagartoflojo","id":2944,"avatar_url":"https://avatars1.githubusercontent.com/u/2944?v=4","gravatar_id":"","url":"https://api.github.com/users/lagartoflojo","html_url":"https://github.com/lagartoflojo","followers_url":"https://api.github.com/users/lagartoflojo/followers","following_url":"https://api.github.com/users/lagartoflojo/following{/other_user}","gists_url":"https://api.github.com/users/lagartoflojo/gists{/gist_id}","starred_url":"https://api.github.com/users/lagartoflojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagartoflojo/subscriptions","organizations_url":"https://api.github.com/users/lagartoflojo/orgs","repos_url":"https://api.github.com/users/lagartoflojo/repos","events_url":"https://api.github.com/users/lagartoflojo/events{/privacy}","received_events_url":"https://api.github.com/users/lagartoflojo/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-07T15:36:34Z","updated_at":"2018-05-15T11:47:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e8cc90ee7ac3b22cdb136bf5d7e5dd198ac9d9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SUSE/connect/pulls/365/commits","review_comments_url":"https://api.github.com/repos/SUSE/connect/pulls/365/comments","review_comment_url":"https://api.github.com/repos/SUSE/connect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SUSE/connect/issues/365/comments","statuses_url":"https://api.github.com/repos/SUSE/connect/statuses/3084d6787c06007eff48446fe06a81a323935489","head":{"label":"SUSE:210-skip-unavailable","ref":"210-skip-unavailable","sha":"3084d6787c06007eff48446fe06a81a323935489","user":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":16274443,"name":"connect","full_name":"SUSE/connect","owner":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE/connect","description":"SUSEConnect Client","fork":false,"url":"https://api.github.com/repos/SUSE/connect","forks_url":"https://api.github.com/repos/SUSE/connect/forks","keys_url":"https://api.github.com/repos/SUSE/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/connect/teams","hooks_url":"https://api.github.com/repos/SUSE/connect/hooks","issue_events_url":"https://api.github.com/repos/SUSE/connect/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/connect/events","assignees_url":"https://api.github.com/repos/SUSE/connect/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/connect/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/connect/tags","blobs_url":"https://api.github.com/repos/SUSE/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/connect/languages","stargazers_url":"https://api.github.com/repos/SUSE/connect/stargazers","contributors_url":"https://api.github.com/repos/SUSE/connect/contributors","subscribers_url":"https://api.github.com/repos/SUSE/connect/subscribers","subscription_url":"https://api.github.com/repos/SUSE/connect/subscription","commits_url":"https://api.github.com/repos/SUSE/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/connect/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/connect/merges","archive_url":"https://api.github.com/repos/SUSE/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/connect/downloads","issues_url":"https://api.github.com/repos/SUSE/connect/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/connect/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/connect/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/connect/deployments","created_at":"2014-01-27T09:21:26Z","updated_at":"2018-05-07T13:08:38Z","pushed_at":"2018-05-15T11:47:10Z","git_url":"git://github.com/SUSE/connect.git","ssh_url":"git@github.com:SUSE/connect.git","clone_url":"https://github.com/SUSE/connect.git","svn_url":"https://github.com/SUSE/connect","homepage":"https://scc.suse.com","size":1952,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":3,"watchers":7,"default_branch":"master"}},"base":{"label":"SUSE:master","ref":"master","sha":"4370ef6661cc1c499e687aaa1928b239eb493d0b","user":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":16274443,"name":"connect","full_name":"SUSE/connect","owner":{"login":"SUSE","id":1067733,"avatar_url":"https://avatars0.githubusercontent.com/u/1067733?v=4","gravatar_id":"","url":"https://api.github.com/users/SUSE","html_url":"https://github.com/SUSE","followers_url":"https://api.github.com/users/SUSE/followers","following_url":"https://api.github.com/users/SUSE/following{/other_user}","gists_url":"https://api.github.com/users/SUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/SUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SUSE/subscriptions","organizations_url":"https://api.github.com/users/SUSE/orgs","repos_url":"https://api.github.com/users/SUSE/repos","events_url":"https://api.github.com/users/SUSE/events{/privacy}","received_events_url":"https://api.github.com/users/SUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SUSE/connect","description":"SUSEConnect Client","fork":false,"url":"https://api.github.com/repos/SUSE/connect","forks_url":"https://api.github.com/repos/SUSE/connect/forks","keys_url":"https://api.github.com/repos/SUSE/connect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SUSE/connect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SUSE/connect/teams","hooks_url":"https://api.github.com/repos/SUSE/connect/hooks","issue_events_url":"https://api.github.com/repos/SUSE/connect/issues/events{/number}","events_url":"https://api.github.com/repos/SUSE/connect/events","assignees_url":"https://api.github.com/repos/SUSE/connect/assignees{/user}","branches_url":"https://api.github.com/repos/SUSE/connect/branches{/branch}","tags_url":"https://api.github.com/repos/SUSE/connect/tags","blobs_url":"https://api.github.com/repos/SUSE/connect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SUSE/connect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SUSE/connect/git/refs{/sha}","trees_url":"https://api.github.com/repos/SUSE/connect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SUSE/connect/statuses/{sha}","languages_url":"https://api.github.com/repos/SUSE/connect/languages","stargazers_url":"https://api.github.com/repos/SUSE/connect/stargazers","contributors_url":"https://api.github.com/repos/SUSE/connect/contributors","subscribers_url":"https://api.github.com/repos/SUSE/connect/subscribers","subscription_url":"https://api.github.com/repos/SUSE/connect/subscription","commits_url":"https://api.github.com/repos/SUSE/connect/commits{/sha}","git_commits_url":"https://api.github.com/repos/SUSE/connect/git/commits{/sha}","comments_url":"https://api.github.com/repos/SUSE/connect/comments{/number}","issue_comment_url":"https://api.github.com/repos/SUSE/connect/issues/comments{/number}","contents_url":"https://api.github.com/repos/SUSE/connect/contents/{+path}","compare_url":"https://api.github.com/repos/SUSE/connect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SUSE/connect/merges","archive_url":"https://api.github.com/repos/SUSE/connect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SUSE/connect/downloads","issues_url":"https://api.github.com/repos/SUSE/connect/issues{/number}","pulls_url":"https://api.github.com/repos/SUSE/connect/pulls{/number}","milestones_url":"https://api.github.com/repos/SUSE/connect/milestones{/number}","notifications_url":"https://api.github.com/repos/SUSE/connect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SUSE/connect/labels{/name}","releases_url":"https://api.github.com/repos/SUSE/connect/releases{/id}","deployments_url":"https://api.github.com/repos/SUSE/connect/deployments","created_at":"2014-01-27T09:21:26Z","updated_at":"2018-05-07T13:08:38Z","pushed_at":"2018-05-15T11:47:10Z","git_url":"git://github.com/SUSE/connect.git","ssh_url":"git@github.com:SUSE/connect.git","clone_url":"https://github.com/SUSE/connect.git","svn_url":"https://github.com/SUSE/connect","homepage":"https://scc.suse.com","size":1952,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SUSE/connect/pulls/365"},"html":{"href":"https://github.com/SUSE/connect/pull/365"},"issue":{"href":"https://api.github.com/repos/SUSE/connect/issues/365"},"comments":{"href":"https://api.github.com/repos/SUSE/connect/issues/365/comments"},"review_comments":{"href":"https://api.github.com/repos/SUSE/connect/pulls/365/comments"},"review_comment":{"href":"https://api.github.com/repos/SUSE/connect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SUSE/connect/pulls/365/commits"},"statuses":{"href":"https://api.github.com/repos/SUSE/connect/statuses/3084d6787c06007eff48446fe06a81a323935489"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lagartoflojo"}}