{"action":"created","comment":{"url":"https://api.github.com/repos/gapfish/deployer/pulls/comments/211209118","pull_request_review_id":147580277,"id":211209118,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTIwOTExOA==","diff_hunk":"@@ -45,15 +45,22 @@ def in_commit\n   class << self\n     # NOTE: just for testing purposes this is a class method\n     def images(resources)\n-      fetch_images = lambda do |resource|\n-        resource['spec']['template']['spec']['containers'].map do |container|\n-          container.fetch('image')\n-        end\n+      resources.map do |resource|\n+        resource_kind = resource.fetch('kind')\n+        next unless %w(Deployment StatefulSet CronJob).include? resource_kind\n+        fetch_images(resource_kind, resource)\n+      end.compact.flatten\n+    end\n+\n+    def fetch_images(resource_kind, resource)\n+      containers = resource.dig('spec', 'template', 'spec', 'containers')\n+      if resource_kind == 'CronJob'","path":"lib/kube_resource_fetcher.rb","position":17,"original_position":17,"commit_id":"882eae32caeee142c7984fd652f1b412c34c5656","original_commit_id":"25288d6374c2eeb23fcb3853af54c50f15c2ef97","user":{"login":"IsaacOliveira","id":587635,"node_id":"MDQ6VXNlcjU4NzYzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/587635?v=4","gravatar_id":"","url":"https://api.github.com/users/IsaacOliveira","html_url":"https://github.com/IsaacOliveira","followers_url":"https://api.github.com/users/IsaacOliveira/followers","following_url":"https://api.github.com/users/IsaacOliveira/following{/other_user}","gists_url":"https://api.github.com/users/IsaacOliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/IsaacOliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IsaacOliveira/subscriptions","organizations_url":"https://api.github.com/users/IsaacOliveira/orgs","repos_url":"https://api.github.com/users/IsaacOliveira/repos","events_url":"https://api.github.com/users/IsaacOliveira/events{/privacy}","received_events_url":"https://api.github.com/users/IsaacOliveira/received_events","type":"User","site_admin":false},"body":"For rubocop","created_at":"2018-08-20T10:12:27Z","updated_at":"2018-08-20T10:12:27Z","html_url":"https://github.com/gapfish/deployer/pull/23#discussion_r211209118","pull_request_url":"https://api.github.com/repos/gapfish/deployer/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/comments/211209118"},"html":{"href":"https://github.com/gapfish/deployer/pull/23#discussion_r211209118"},"pull_request":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/23"}},"in_reply_to_id":210269267},"pull_request":{"url":"https://api.github.com/repos/gapfish/deployer/pulls/23","id":208562060,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTYyMDYw","html_url":"https://github.com/gapfish/deployer/pull/23","diff_url":"https://github.com/gapfish/deployer/pull/23.diff","patch_url":"https://github.com/gapfish/deployer/pull/23.patch","issue_url":"https://api.github.com/repos/gapfish/deployer/issues/23","number":23,"state":"open","locked":false,"title":"Cron jobs image updates","user":{"login":"IsaacOliveira","id":587635,"node_id":"MDQ6VXNlcjU4NzYzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/587635?v=4","gravatar_id":"","url":"https://api.github.com/users/IsaacOliveira","html_url":"https://github.com/IsaacOliveira","followers_url":"https://api.github.com/users/IsaacOliveira/followers","following_url":"https://api.github.com/users/IsaacOliveira/following{/other_user}","gists_url":"https://api.github.com/users/IsaacOliveira/gists{/gist_id}","starred_url":"https://api.github.com/users/IsaacOliveira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IsaacOliveira/subscriptions","organizations_url":"https://api.github.com/users/IsaacOliveira/orgs","repos_url":"https://api.github.com/users/IsaacOliveira/repos","events_url":"https://api.github.com/users/IsaacOliveira/events{/privacy}","received_events_url":"https://api.github.com/users/IsaacOliveira/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-15T13:27:18Z","updated_at":"2018-08-20T10:12:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6e1401e414de4b50155c79e5789cf67cd0ea104","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gapfish/deployer/pulls/23/commits","review_comments_url":"https://api.github.com/repos/gapfish/deployer/pulls/23/comments","review_comment_url":"https://api.github.com/repos/gapfish/deployer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gapfish/deployer/issues/23/comments","statuses_url":"https://api.github.com/repos/gapfish/deployer/statuses/882eae32caeee142c7984fd652f1b412c34c5656","head":{"label":"gapfish:cron_jobs_image_updates","ref":"cron_jobs_image_updates","sha":"882eae32caeee142c7984fd652f1b412c34c5656","user":{"login":"gapfish","id":3081347,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODEzNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3081347?v=4","gravatar_id":"","url":"https://api.github.com/users/gapfish","html_url":"https://github.com/gapfish","followers_url":"https://api.github.com/users/gapfish/followers","following_url":"https://api.github.com/users/gapfish/following{/other_user}","gists_url":"https://api.github.com/users/gapfish/gists{/gist_id}","starred_url":"https://api.github.com/users/gapfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gapfish/subscriptions","organizations_url":"https://api.github.com/users/gapfish/orgs","repos_url":"https://api.github.com/users/gapfish/repos","events_url":"https://api.github.com/users/gapfish/events{/privacy}","received_events_url":"https://api.github.com/users/gapfish/received_events","type":"Organization","site_admin":false},"repo":{"id":94317036,"node_id":"MDEwOlJlcG9zaXRvcnk5NDMxNzAzNg==","name":"deployer","full_name":"gapfish/deployer","owner":{"login":"gapfish","id":3081347,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODEzNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3081347?v=4","gravatar_id":"","url":"https://api.github.com/users/gapfish","html_url":"https://github.com/gapfish","followers_url":"https://api.github.com/users/gapfish/followers","following_url":"https://api.github.com/users/gapfish/following{/other_user}","gists_url":"https://api.github.com/users/gapfish/gists{/gist_id}","starred_url":"https://api.github.com/users/gapfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gapfish/subscriptions","organizations_url":"https://api.github.com/users/gapfish/orgs","repos_url":"https://api.github.com/users/gapfish/repos","events_url":"https://api.github.com/users/gapfish/events{/privacy}","received_events_url":"https://api.github.com/users/gapfish/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gapfish/deployer","description":"Deployment automation for applications on kubernetes.","fork":false,"url":"https://api.github.com/repos/gapfish/deployer","forks_url":"https://api.github.com/repos/gapfish/deployer/forks","keys_url":"https://api.github.com/repos/gapfish/deployer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gapfish/deployer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gapfish/deployer/teams","hooks_url":"https://api.github.com/repos/gapfish/deployer/hooks","issue_events_url":"https://api.github.com/repos/gapfish/deployer/issues/events{/number}","events_url":"https://api.github.com/repos/gapfish/deployer/events","assignees_url":"https://api.github.com/repos/gapfish/deployer/assignees{/user}","branches_url":"https://api.github.com/repos/gapfish/deployer/branches{/branch}","tags_url":"https://api.github.com/repos/gapfish/deployer/tags","blobs_url":"https://api.github.com/repos/gapfish/deployer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gapfish/deployer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gapfish/deployer/git/refs{/sha}","trees_url":"https://api.github.com/repos/gapfish/deployer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gapfish/deployer/statuses/{sha}","languages_url":"https://api.github.com/repos/gapfish/deployer/languages","stargazers_url":"https://api.github.com/repos/gapfish/deployer/stargazers","contributors_url":"https://api.github.com/repos/gapfish/deployer/contributors","subscribers_url":"https://api.github.com/repos/gapfish/deployer/subscribers","subscription_url":"https://api.github.com/repos/gapfish/deployer/subscription","commits_url":"https://api.github.com/repos/gapfish/deployer/commits{/sha}","git_commits_url":"https://api.github.com/repos/gapfish/deployer/git/commits{/sha}","comments_url":"https://api.github.com/repos/gapfish/deployer/comments{/number}","issue_comment_url":"https://api.github.com/repos/gapfish/deployer/issues/comments{/number}","contents_url":"https://api.github.com/repos/gapfish/deployer/contents/{+path}","compare_url":"https://api.github.com/repos/gapfish/deployer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gapfish/deployer/merges","archive_url":"https://api.github.com/repos/gapfish/deployer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gapfish/deployer/downloads","issues_url":"https://api.github.com/repos/gapfish/deployer/issues{/number}","pulls_url":"https://api.github.com/repos/gapfish/deployer/pulls{/number}","milestones_url":"https://api.github.com/repos/gapfish/deployer/milestones{/number}","notifications_url":"https://api.github.com/repos/gapfish/deployer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gapfish/deployer/labels{/name}","releases_url":"https://api.github.com/repos/gapfish/deployer/releases{/id}","deployments_url":"https://api.github.com/repos/gapfish/deployer/deployments","created_at":"2017-06-14T10:03:54Z","updated_at":"2017-07-19T11:15:35Z","pushed_at":"2018-08-20T10:08:25Z","git_url":"git://github.com/gapfish/deployer.git","ssh_url":"git@github.com:gapfish/deployer.git","clone_url":"https://github.com/gapfish/deployer.git","svn_url":"https://github.com/gapfish/deployer","homepage":"","size":2439,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"base":{"label":"gapfish:master","ref":"master","sha":"ffdc6a7babb9a2e19ea820729bae5357f69ec8c8","user":{"login":"gapfish","id":3081347,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODEzNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3081347?v=4","gravatar_id":"","url":"https://api.github.com/users/gapfish","html_url":"https://github.com/gapfish","followers_url":"https://api.github.com/users/gapfish/followers","following_url":"https://api.github.com/users/gapfish/following{/other_user}","gists_url":"https://api.github.com/users/gapfish/gists{/gist_id}","starred_url":"https://api.github.com/users/gapfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gapfish/subscriptions","organizations_url":"https://api.github.com/users/gapfish/orgs","repos_url":"https://api.github.com/users/gapfish/repos","events_url":"https://api.github.com/users/gapfish/events{/privacy}","received_events_url":"https://api.github.com/users/gapfish/received_events","type":"Organization","site_admin":false},"repo":{"id":94317036,"node_id":"MDEwOlJlcG9zaXRvcnk5NDMxNzAzNg==","name":"deployer","full_name":"gapfish/deployer","owner":{"login":"gapfish","id":3081347,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwODEzNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3081347?v=4","gravatar_id":"","url":"https://api.github.com/users/gapfish","html_url":"https://github.com/gapfish","followers_url":"https://api.github.com/users/gapfish/followers","following_url":"https://api.github.com/users/gapfish/following{/other_user}","gists_url":"https://api.github.com/users/gapfish/gists{/gist_id}","starred_url":"https://api.github.com/users/gapfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gapfish/subscriptions","organizations_url":"https://api.github.com/users/gapfish/orgs","repos_url":"https://api.github.com/users/gapfish/repos","events_url":"https://api.github.com/users/gapfish/events{/privacy}","received_events_url":"https://api.github.com/users/gapfish/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gapfish/deployer","description":"Deployment automation for applications on kubernetes.","fork":false,"url":"https://api.github.com/repos/gapfish/deployer","forks_url":"https://api.github.com/repos/gapfish/deployer/forks","keys_url":"https://api.github.com/repos/gapfish/deployer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gapfish/deployer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gapfish/deployer/teams","hooks_url":"https://api.github.com/repos/gapfish/deployer/hooks","issue_events_url":"https://api.github.com/repos/gapfish/deployer/issues/events{/number}","events_url":"https://api.github.com/repos/gapfish/deployer/events","assignees_url":"https://api.github.com/repos/gapfish/deployer/assignees{/user}","branches_url":"https://api.github.com/repos/gapfish/deployer/branches{/branch}","tags_url":"https://api.github.com/repos/gapfish/deployer/tags","blobs_url":"https://api.github.com/repos/gapfish/deployer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gapfish/deployer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gapfish/deployer/git/refs{/sha}","trees_url":"https://api.github.com/repos/gapfish/deployer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gapfish/deployer/statuses/{sha}","languages_url":"https://api.github.com/repos/gapfish/deployer/languages","stargazers_url":"https://api.github.com/repos/gapfish/deployer/stargazers","contributors_url":"https://api.github.com/repos/gapfish/deployer/contributors","subscribers_url":"https://api.github.com/repos/gapfish/deployer/subscribers","subscription_url":"https://api.github.com/repos/gapfish/deployer/subscription","commits_url":"https://api.github.com/repos/gapfish/deployer/commits{/sha}","git_commits_url":"https://api.github.com/repos/gapfish/deployer/git/commits{/sha}","comments_url":"https://api.github.com/repos/gapfish/deployer/comments{/number}","issue_comment_url":"https://api.github.com/repos/gapfish/deployer/issues/comments{/number}","contents_url":"https://api.github.com/repos/gapfish/deployer/contents/{+path}","compare_url":"https://api.github.com/repos/gapfish/deployer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gapfish/deployer/merges","archive_url":"https://api.github.com/repos/gapfish/deployer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gapfish/deployer/downloads","issues_url":"https://api.github.com/repos/gapfish/deployer/issues{/number}","pulls_url":"https://api.github.com/repos/gapfish/deployer/pulls{/number}","milestones_url":"https://api.github.com/repos/gapfish/deployer/milestones{/number}","notifications_url":"https://api.github.com/repos/gapfish/deployer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gapfish/deployer/labels{/name}","releases_url":"https://api.github.com/repos/gapfish/deployer/releases{/id}","deployments_url":"https://api.github.com/repos/gapfish/deployer/deployments","created_at":"2017-06-14T10:03:54Z","updated_at":"2017-07-19T11:15:35Z","pushed_at":"2018-08-20T10:08:25Z","git_url":"git://github.com/gapfish/deployer.git","ssh_url":"git@github.com:gapfish/deployer.git","clone_url":"https://github.com/gapfish/deployer.git","svn_url":"https://github.com/gapfish/deployer","homepage":"","size":2439,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/23"},"html":{"href":"https://github.com/gapfish/deployer/pull/23"},"issue":{"href":"https://api.github.com/repos/gapfish/deployer/issues/23"},"comments":{"href":"https://api.github.com/repos/gapfish/deployer/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gapfish/deployer/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/gapfish/deployer/statuses/882eae32caeee142c7984fd652f1b412c34c5656"}},"author_association":"NONE"}}
{"actor":{"display_login":"IsaacOliveira"}}