{"action":"created","comment":{"url":"https://api.github.com/repos/kubic-project/automation/pulls/comments/191722650","pull_request_review_id":124347155,"id":191722650,"diff_hunk":"@@ -2,21 +2,10 @@\n require \"yaml\"\n \n feature \"Remove a Node\" do\n-  let(:node_number) { environment[\"minions\"].count { |element| element[\"role\"] != \"admin\" } }\n-  let(:master_node_removable?) do\n-    environment[\"minions\"].count { |element| element[\"role\"] == \"master\" }.tap do |count|\n-      !count.zero? && count != 1\n-    end\n-  end\n-  let(:worker_node_removable?) do\n-    environment[\"minions\"].count { |element| element[\"role\"] == \"worker\" }.tap do |count|\n-      !count.zero? && count != 1\n-    end\n-  end\n   let(:node_number_removable) do\n     removable = node_number\n-    removable -= 1 unless master_node_removable?\n-    removable -= 1 unless worker_node_removable?\n+    removable -= master_node_number unless node_removable?(role: \"master\")\n+    removable -= worker_node_number unless node_removable?(role: \"worker\")","path":"velum-bootstrap/spec/features/07-node-remove.rb","position":20,"original_position":20,"commit_id":"f4911052f76f5b99116b1c6d542cec165a6361ea","original_commit_id":"f4911052f76f5b99116b1c6d542cec165a6361ea","user":{"login":"vitoravelino","id":188554,"avatar_url":"https://avatars0.githubusercontent.com/u/188554?v=4","gravatar_id":"","url":"https://api.github.com/users/vitoravelino","html_url":"https://github.com/vitoravelino","followers_url":"https://api.github.com/users/vitoravelino/followers","following_url":"https://api.github.com/users/vitoravelino/following{/other_user}","gists_url":"https://api.github.com/users/vitoravelino/gists{/gist_id}","starred_url":"https://api.github.com/users/vitoravelino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitoravelino/subscriptions","organizations_url":"https://api.github.com/users/vitoravelino/orgs","repos_url":"https://api.github.com/users/vitoravelino/repos","events_url":"https://api.github.com/users/vitoravelino/events{/privacy}","received_events_url":"https://api.github.com/users/vitoravelino/received_events","type":"User","site_admin":false},"body":"I mean `master_node_number` and/or  `worker_node_number`.","created_at":"2018-05-30T10:51:25Z","updated_at":"2018-05-30T10:51:26Z","html_url":"https://github.com/kubic-project/automation/pull/405#discussion_r191722650","pull_request_url":"https://api.github.com/repos/kubic-project/automation/pulls/405","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/comments/191722650"},"html":{"href":"https://github.com/kubic-project/automation/pull/405#discussion_r191722650"},"pull_request":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/405"}},"in_reply_to_id":191722515},"pull_request":{"url":"https://api.github.com/repos/kubic-project/automation/pulls/405","id":191366934,"html_url":"https://github.com/kubic-project/automation/pull/405","diff_url":"https://github.com/kubic-project/automation/pull/405.diff","patch_url":"https://github.com/kubic-project/automation/pull/405.patch","issue_url":"https://api.github.com/repos/kubic-project/automation/issues/405","number":405,"state":"open","locked":false,"title":"moar node removal fixes and some DRY cleanup","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars0.githubusercontent.com/u/5364817?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"body":"afterall there were still some flaws ... :crying_cat_face: ","created_at":"2018-05-30T08:08:39Z","updated_at":"2018-05-30T10:51:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0fff06adf69c4bbecbdab40256a127620b853b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubic-project/automation/pulls/405/commits","review_comments_url":"https://api.github.com/repos/kubic-project/automation/pulls/405/comments","review_comment_url":"https://api.github.com/repos/kubic-project/automation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubic-project/automation/issues/405/comments","statuses_url":"https://api.github.com/repos/kubic-project/automation/statuses/f4911052f76f5b99116b1c6d542cec165a6361ea","head":{"label":"MaximilianMeister:fix-removal","ref":"fix-removal","sha":"f4911052f76f5b99116b1c6d542cec165a6361ea","user":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars0.githubusercontent.com/u/5364817?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"repo":{"id":97573607,"name":"automation","full_name":"MaximilianMeister/automation","owner":{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars0.githubusercontent.com/u/5364817?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaximilianMeister/automation","description":"Infrastructure definitions and Jenkins Job definitions for Kubic CI","fork":true,"url":"https://api.github.com/repos/MaximilianMeister/automation","forks_url":"https://api.github.com/repos/MaximilianMeister/automation/forks","keys_url":"https://api.github.com/repos/MaximilianMeister/automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaximilianMeister/automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaximilianMeister/automation/teams","hooks_url":"https://api.github.com/repos/MaximilianMeister/automation/hooks","issue_events_url":"https://api.github.com/repos/MaximilianMeister/automation/issues/events{/number}","events_url":"https://api.github.com/repos/MaximilianMeister/automation/events","assignees_url":"https://api.github.com/repos/MaximilianMeister/automation/assignees{/user}","branches_url":"https://api.github.com/repos/MaximilianMeister/automation/branches{/branch}","tags_url":"https://api.github.com/repos/MaximilianMeister/automation/tags","blobs_url":"https://api.github.com/repos/MaximilianMeister/automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaximilianMeister/automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaximilianMeister/automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaximilianMeister/automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaximilianMeister/automation/statuses/{sha}","languages_url":"https://api.github.com/repos/MaximilianMeister/automation/languages","stargazers_url":"https://api.github.com/repos/MaximilianMeister/automation/stargazers","contributors_url":"https://api.github.com/repos/MaximilianMeister/automation/contributors","subscribers_url":"https://api.github.com/repos/MaximilianMeister/automation/subscribers","subscription_url":"https://api.github.com/repos/MaximilianMeister/automation/subscription","commits_url":"https://api.github.com/repos/MaximilianMeister/automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaximilianMeister/automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaximilianMeister/automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaximilianMeister/automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaximilianMeister/automation/contents/{+path}","compare_url":"https://api.github.com/repos/MaximilianMeister/automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaximilianMeister/automation/merges","archive_url":"https://api.github.com/repos/MaximilianMeister/automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaximilianMeister/automation/downloads","issues_url":"https://api.github.com/repos/MaximilianMeister/automation/issues{/number}","pulls_url":"https://api.github.com/repos/MaximilianMeister/automation/pulls{/number}","milestones_url":"https://api.github.com/repos/MaximilianMeister/automation/milestones{/number}","notifications_url":"https://api.github.com/repos/MaximilianMeister/automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaximilianMeister/automation/labels{/name}","releases_url":"https://api.github.com/repos/MaximilianMeister/automation/releases{/id}","deployments_url":"https://api.github.com/repos/MaximilianMeister/automation/deployments","created_at":"2017-07-18T08:27:13Z","updated_at":"2017-07-18T08:28:25Z","pushed_at":"2018-05-30T08:06:29Z","git_url":"git://github.com/MaximilianMeister/automation.git","ssh_url":"git@github.com:MaximilianMeister/automation.git","clone_url":"https://github.com/MaximilianMeister/automation.git","svn_url":"https://github.com/MaximilianMeister/automation","homepage":null,"size":682,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubic-project:master","ref":"master","sha":"3290aba3a7a20e29b150fed73373bcab7bc42670","user":{"login":"kubic-project","id":25507587,"avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"repo":{"id":96799275,"name":"automation","full_name":"kubic-project/automation","owner":{"login":"kubic-project","id":25507587,"avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubic-project/automation","description":"Dev tooling, Test tooling, Infrastructure Definitions and Jenkins Job definitions","fork":false,"url":"https://api.github.com/repos/kubic-project/automation","forks_url":"https://api.github.com/repos/kubic-project/automation/forks","keys_url":"https://api.github.com/repos/kubic-project/automation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubic-project/automation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubic-project/automation/teams","hooks_url":"https://api.github.com/repos/kubic-project/automation/hooks","issue_events_url":"https://api.github.com/repos/kubic-project/automation/issues/events{/number}","events_url":"https://api.github.com/repos/kubic-project/automation/events","assignees_url":"https://api.github.com/repos/kubic-project/automation/assignees{/user}","branches_url":"https://api.github.com/repos/kubic-project/automation/branches{/branch}","tags_url":"https://api.github.com/repos/kubic-project/automation/tags","blobs_url":"https://api.github.com/repos/kubic-project/automation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubic-project/automation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubic-project/automation/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubic-project/automation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubic-project/automation/statuses/{sha}","languages_url":"https://api.github.com/repos/kubic-project/automation/languages","stargazers_url":"https://api.github.com/repos/kubic-project/automation/stargazers","contributors_url":"https://api.github.com/repos/kubic-project/automation/contributors","subscribers_url":"https://api.github.com/repos/kubic-project/automation/subscribers","subscription_url":"https://api.github.com/repos/kubic-project/automation/subscription","commits_url":"https://api.github.com/repos/kubic-project/automation/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubic-project/automation/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubic-project/automation/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubic-project/automation/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubic-project/automation/contents/{+path}","compare_url":"https://api.github.com/repos/kubic-project/automation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubic-project/automation/merges","archive_url":"https://api.github.com/repos/kubic-project/automation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubic-project/automation/downloads","issues_url":"https://api.github.com/repos/kubic-project/automation/issues{/number}","pulls_url":"https://api.github.com/repos/kubic-project/automation/pulls{/number}","milestones_url":"https://api.github.com/repos/kubic-project/automation/milestones{/number}","notifications_url":"https://api.github.com/repos/kubic-project/automation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubic-project/automation/labels{/name}","releases_url":"https://api.github.com/repos/kubic-project/automation/releases{/id}","deployments_url":"https://api.github.com/repos/kubic-project/automation/deployments","created_at":"2017-07-10T16:35:06Z","updated_at":"2018-05-29T22:33:38Z","pushed_at":"2018-05-30T08:08:40Z","git_url":"git://github.com/kubic-project/automation.git","ssh_url":"git@github.com:kubic-project/automation.git","clone_url":"https://github.com/kubic-project/automation.git","svn_url":"https://github.com/kubic-project/automation","homepage":"","size":807,"stargazers_count":22,"watchers_count":22,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":24,"license":null,"forks":25,"open_issues":24,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/405"},"html":{"href":"https://github.com/kubic-project/automation/pull/405"},"issue":{"href":"https://api.github.com/repos/kubic-project/automation/issues/405"},"comments":{"href":"https://api.github.com/repos/kubic-project/automation/issues/405/comments"},"review_comments":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/405/comments"},"review_comment":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubic-project/automation/pulls/405/commits"},"statuses":{"href":"https://api.github.com/repos/kubic-project/automation/statuses/f4911052f76f5b99116b1c6d542cec165a6361ea"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"vitoravelino"}}