{"action":"created","comment":{"url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/comments/66771214","id":66771214,"diff_hunk":"@@ -0,0 +1,24 @@\n+package com.github.vdemeester.macchiato.compose.infrastructure.docker;\n+\n+import com.github.dockerjava.api.DockerClient;\n+import com.github.dockerjava.api.exception.NotFoundException;\n+import com.github.dockerjava.core.command.PullImageResultCallback;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+class ImagePuller {\n+\n+    final static Logger LOGGER = LoggerFactory.getLogger(ContainerBuilder.class);\n+\n+    boolean pullImageIfNotExists(DockerClient dockerClient, String image) {\n+        boolean imageExists = true;\n+        try {\n+            dockerClient.inspectImageCmd(image).exec();\n+        } catch (NotFoundException e) {\n+            LOGGER.info(\"Pulling image '\"+image+\"'\");\n+            dockerClient.pullImageCmd(image).withTag(\"latest\").exec(new PullImageResultCallback()).awaitSuccess();","path":"macchiato-compose-core/src/main/java/com/github/vdemeester/macchiato/compose/infrastructure/docker/ImagePuller.java","position":19,"original_position":19,"commit_id":"b0c1df799b7c95d81141ca2df4d787cde5c6dfb7","original_commit_id":"b0c1df799b7c95d81141ca2df4d787cde5c6dfb7","user":{"login":"ksouf","id":5889462,"avatar_url":"https://avatars.githubusercontent.com/u/5889462?v=3","gravatar_id":"","url":"https://api.github.com/users/ksouf","html_url":"https://github.com/ksouf","followers_url":"https://api.github.com/users/ksouf/followers","following_url":"https://api.github.com/users/ksouf/following{/other_user}","gists_url":"https://api.github.com/users/ksouf/gists{/gist_id}","starred_url":"https://api.github.com/users/ksouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksouf/subscriptions","organizations_url":"https://api.github.com/users/ksouf/orgs","repos_url":"https://api.github.com/users/ksouf/repos","events_url":"https://api.github.com/users/ksouf/events{/privacy}","received_events_url":"https://api.github.com/users/ksouf/received_events","type":"User","site_admin":false},"body":"later alors :)\r\n","created_at":"2016-06-13T10:36:02Z","updated_at":"2016-06-13T10:36:02Z","html_url":"https://github.com/vdemeester/macchiato-compose/pull/5#discussion_r66771214","pull_request_url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/comments/66771214"},"html":{"href":"https://github.com/vdemeester/macchiato-compose/pull/5#discussion_r66771214"},"pull_request":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5","id":64952190,"html_url":"https://github.com/vdemeester/macchiato-compose/pull/5","diff_url":"https://github.com/vdemeester/macchiato-compose/pull/5.diff","patch_url":"https://github.com/vdemeester/macchiato-compose/pull/5.patch","issue_url":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/5","number":5,"state":"open","locked":false,"title":"refactoring project class","user":{"login":"ksouf","id":5889462,"avatar_url":"https://avatars.githubusercontent.com/u/5889462?v=3","gravatar_id":"","url":"https://api.github.com/users/ksouf","html_url":"https://github.com/ksouf","followers_url":"https://api.github.com/users/ksouf/followers","following_url":"https://api.github.com/users/ksouf/following{/other_user}","gists_url":"https://api.github.com/users/ksouf/gists{/gist_id}","starred_url":"https://api.github.com/users/ksouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksouf/subscriptions","organizations_url":"https://api.github.com/users/ksouf/orgs","repos_url":"https://api.github.com/users/ksouf/repos","events_url":"https://api.github.com/users/ksouf/events{/privacy}","received_events_url":"https://api.github.com/users/ksouf/received_events","type":"User","site_admin":false},"body":"extract some resposbilites into new classes\r\nvalidation at constructors of fields","created_at":"2016-04-01T14:24:05Z","updated_at":"2016-06-13T10:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dd572e10336db445d719f1f878c02140dded050","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5/commits","review_comments_url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5/comments","review_comment_url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/5/comments","statuses_url":"https://api.github.com/repos/vdemeester/macchiato-compose/statuses/b0c1df799b7c95d81141ca2df4d787cde5c6dfb7","head":{"label":"ksouf:reponsability-refactoring","ref":"reponsability-refactoring","sha":"b0c1df799b7c95d81141ca2df4d787cde5c6dfb7","user":{"login":"ksouf","id":5889462,"avatar_url":"https://avatars.githubusercontent.com/u/5889462?v=3","gravatar_id":"","url":"https://api.github.com/users/ksouf","html_url":"https://github.com/ksouf","followers_url":"https://api.github.com/users/ksouf/followers","following_url":"https://api.github.com/users/ksouf/following{/other_user}","gists_url":"https://api.github.com/users/ksouf/gists{/gist_id}","starred_url":"https://api.github.com/users/ksouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksouf/subscriptions","organizations_url":"https://api.github.com/users/ksouf/orgs","repos_url":"https://api.github.com/users/ksouf/repos","events_url":"https://api.github.com/users/ksouf/events{/privacy}","received_events_url":"https://api.github.com/users/ksouf/received_events","type":"User","site_admin":false},"repo":{"id":54626914,"name":"macchiato-compose","full_name":"ksouf/macchiato-compose","owner":{"login":"ksouf","id":5889462,"avatar_url":"https://avatars.githubusercontent.com/u/5889462?v=3","gravatar_id":"","url":"https://api.github.com/users/ksouf","html_url":"https://github.com/ksouf","followers_url":"https://api.github.com/users/ksouf/followers","following_url":"https://api.github.com/users/ksouf/following{/other_user}","gists_url":"https://api.github.com/users/ksouf/gists{/gist_id}","starred_url":"https://api.github.com/users/ksouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksouf/subscriptions","organizations_url":"https://api.github.com/users/ksouf/orgs","repos_url":"https://api.github.com/users/ksouf/repos","events_url":"https://api.github.com/users/ksouf/events{/privacy}","received_events_url":"https://api.github.com/users/ksouf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ksouf/macchiato-compose","description":" An experimental java library providing Compose-like functionality","fork":true,"url":"https://api.github.com/repos/ksouf/macchiato-compose","forks_url":"https://api.github.com/repos/ksouf/macchiato-compose/forks","keys_url":"https://api.github.com/repos/ksouf/macchiato-compose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ksouf/macchiato-compose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ksouf/macchiato-compose/teams","hooks_url":"https://api.github.com/repos/ksouf/macchiato-compose/hooks","issue_events_url":"https://api.github.com/repos/ksouf/macchiato-compose/issues/events{/number}","events_url":"https://api.github.com/repos/ksouf/macchiato-compose/events","assignees_url":"https://api.github.com/repos/ksouf/macchiato-compose/assignees{/user}","branches_url":"https://api.github.com/repos/ksouf/macchiato-compose/branches{/branch}","tags_url":"https://api.github.com/repos/ksouf/macchiato-compose/tags","blobs_url":"https://api.github.com/repos/ksouf/macchiato-compose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ksouf/macchiato-compose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ksouf/macchiato-compose/git/refs{/sha}","trees_url":"https://api.github.com/repos/ksouf/macchiato-compose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ksouf/macchiato-compose/statuses/{sha}","languages_url":"https://api.github.com/repos/ksouf/macchiato-compose/languages","stargazers_url":"https://api.github.com/repos/ksouf/macchiato-compose/stargazers","contributors_url":"https://api.github.com/repos/ksouf/macchiato-compose/contributors","subscribers_url":"https://api.github.com/repos/ksouf/macchiato-compose/subscribers","subscription_url":"https://api.github.com/repos/ksouf/macchiato-compose/subscription","commits_url":"https://api.github.com/repos/ksouf/macchiato-compose/commits{/sha}","git_commits_url":"https://api.github.com/repos/ksouf/macchiato-compose/git/commits{/sha}","comments_url":"https://api.github.com/repos/ksouf/macchiato-compose/comments{/number}","issue_comment_url":"https://api.github.com/repos/ksouf/macchiato-compose/issues/comments{/number}","contents_url":"https://api.github.com/repos/ksouf/macchiato-compose/contents/{+path}","compare_url":"https://api.github.com/repos/ksouf/macchiato-compose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ksouf/macchiato-compose/merges","archive_url":"https://api.github.com/repos/ksouf/macchiato-compose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ksouf/macchiato-compose/downloads","issues_url":"https://api.github.com/repos/ksouf/macchiato-compose/issues{/number}","pulls_url":"https://api.github.com/repos/ksouf/macchiato-compose/pulls{/number}","milestones_url":"https://api.github.com/repos/ksouf/macchiato-compose/milestones{/number}","notifications_url":"https://api.github.com/repos/ksouf/macchiato-compose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ksouf/macchiato-compose/labels{/name}","releases_url":"https://api.github.com/repos/ksouf/macchiato-compose/releases{/id}","deployments_url":"https://api.github.com/repos/ksouf/macchiato-compose/deployments","created_at":"2016-03-24T08:33:05Z","updated_at":"2016-04-01T14:22:51Z","pushed_at":"2016-04-02T13:57:56Z","git_url":"git://github.com/ksouf/macchiato-compose.git","ssh_url":"git@github.com:ksouf/macchiato-compose.git","clone_url":"https://github.com/ksouf/macchiato-compose.git","svn_url":"https://github.com/ksouf/macchiato-compose","homepage":"","size":90,"stargazers_count":0,"watchers_count":0,"language":"Cucumber","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":"master"}},"base":{"label":"vdemeester:master","ref":"master","sha":"16aaab1bbb989e606813395ee0cb8cd651c8c62d","user":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"repo":{"id":51500712,"name":"macchiato-compose","full_name":"vdemeester/macchiato-compose","owner":{"login":"vdemeester","id":6508,"avatar_url":"https://avatars.githubusercontent.com/u/6508?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemeester","html_url":"https://github.com/vdemeester","followers_url":"https://api.github.com/users/vdemeester/followers","following_url":"https://api.github.com/users/vdemeester/following{/other_user}","gists_url":"https://api.github.com/users/vdemeester/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemeester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemeester/subscriptions","organizations_url":"https://api.github.com/users/vdemeester/orgs","repos_url":"https://api.github.com/users/vdemeester/repos","events_url":"https://api.github.com/users/vdemeester/events{/privacy}","received_events_url":"https://api.github.com/users/vdemeester/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vdemeester/macchiato-compose","description":" An experimental java library providing Compose-like functionality","fork":false,"url":"https://api.github.com/repos/vdemeester/macchiato-compose","forks_url":"https://api.github.com/repos/vdemeester/macchiato-compose/forks","keys_url":"https://api.github.com/repos/vdemeester/macchiato-compose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vdemeester/macchiato-compose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vdemeester/macchiato-compose/teams","hooks_url":"https://api.github.com/repos/vdemeester/macchiato-compose/hooks","issue_events_url":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/events{/number}","events_url":"https://api.github.com/repos/vdemeester/macchiato-compose/events","assignees_url":"https://api.github.com/repos/vdemeester/macchiato-compose/assignees{/user}","branches_url":"https://api.github.com/repos/vdemeester/macchiato-compose/branches{/branch}","tags_url":"https://api.github.com/repos/vdemeester/macchiato-compose/tags","blobs_url":"https://api.github.com/repos/vdemeester/macchiato-compose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vdemeester/macchiato-compose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vdemeester/macchiato-compose/git/refs{/sha}","trees_url":"https://api.github.com/repos/vdemeester/macchiato-compose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vdemeester/macchiato-compose/statuses/{sha}","languages_url":"https://api.github.com/repos/vdemeester/macchiato-compose/languages","stargazers_url":"https://api.github.com/repos/vdemeester/macchiato-compose/stargazers","contributors_url":"https://api.github.com/repos/vdemeester/macchiato-compose/contributors","subscribers_url":"https://api.github.com/repos/vdemeester/macchiato-compose/subscribers","subscription_url":"https://api.github.com/repos/vdemeester/macchiato-compose/subscription","commits_url":"https://api.github.com/repos/vdemeester/macchiato-compose/commits{/sha}","git_commits_url":"https://api.github.com/repos/vdemeester/macchiato-compose/git/commits{/sha}","comments_url":"https://api.github.com/repos/vdemeester/macchiato-compose/comments{/number}","issue_comment_url":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/comments{/number}","contents_url":"https://api.github.com/repos/vdemeester/macchiato-compose/contents/{+path}","compare_url":"https://api.github.com/repos/vdemeester/macchiato-compose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vdemeester/macchiato-compose/merges","archive_url":"https://api.github.com/repos/vdemeester/macchiato-compose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vdemeester/macchiato-compose/downloads","issues_url":"https://api.github.com/repos/vdemeester/macchiato-compose/issues{/number}","pulls_url":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls{/number}","milestones_url":"https://api.github.com/repos/vdemeester/macchiato-compose/milestones{/number}","notifications_url":"https://api.github.com/repos/vdemeester/macchiato-compose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vdemeester/macchiato-compose/labels{/name}","releases_url":"https://api.github.com/repos/vdemeester/macchiato-compose/releases{/id}","deployments_url":"https://api.github.com/repos/vdemeester/macchiato-compose/deployments","created_at":"2016-02-11T07:42:41Z","updated_at":"2016-03-30T10:28:24Z","pushed_at":"2016-04-03T12:25:39Z","git_url":"git://github.com/vdemeester/macchiato-compose.git","ssh_url":"git@github.com:vdemeester/macchiato-compose.git","clone_url":"https://github.com/vdemeester/macchiato-compose.git","svn_url":"https://github.com/vdemeester/macchiato-compose","homepage":"","size":82,"stargazers_count":0,"watchers_count":0,"language":"Cucumber","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5"},"html":{"href":"https://github.com/vdemeester/macchiato-compose/pull/5"},"issue":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/5"},"comments":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/vdemeester/macchiato-compose/statuses/b0c1df799b7c95d81141ca2df4d787cde5c6dfb7"}}}}
{"actor":{"display_login":"ksouf"}}