{"action":"created","comment":{"url":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments/92136341","pull_request_review_id":12644477,"id":92136341,"diff_hunk":"@@ -0,0 +1,211 @@\n+<?php\n+\n+namespace Keboola\\DockerBundle\\Docker;\n+\n+use Keboola\\Gelf\\ServerFactory;\n+use Keboola\\Syrup\\Exception\\ApplicationException;\n+use Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException;\n+\n+class Component\n+{\n+    /**\n+     * @var string\n+     */\n+    private $id;\n+\n+    /**\n+     * @var array\n+     */\n+    private $data;\n+\n+    /**\n+     * @var string\n+     */\n+    private $networkType;\n+\n+    /**\n+     * Component constructor.\n+     * @param array $componentData Component data as returned by Storage API\n+     */\n+    public function __construct(array $componentData)\n+    {\n+        $this->id = empty($componentData['id']) ? '' : $componentData['id'];\n+        $data = empty($componentData['data']) ? [] : $componentData['data'];\n+        try {\n+            $this->data = (new Configuration\\Component())->parse(['config' => $data]);\n+        } catch (InvalidConfigurationException $e) {\n+            throw new ApplicationException(\"Image definition is empty or invalid: \" . $e->getMessage(), $e, $data);\n+        }\n+        $this->networkType = $this->data['network'];\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function getId()\n+    {\n+        return $this->id;\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    private function getSanitizedComponentId()\n+    {\n+        return preg_replace('/[^a-zA-Z0-9-]/i', '-', $this->getId());\n+    }\n+\n+    /**\n+     * @return string\n+     */\n+    public function getConfigurationFormat()","path":"Docker/Component.php","position":61,"original_position":61,"commit_id":"d021ab5a79601924bf98f8af6bd304d711d1055c","original_commit_id":"d021ab5a79601924bf98f8af6bd304d711d1055c","user":{"login":"odinuv","id":4319320,"avatar_url":"https://avatars.githubusercontent.com/u/4319320?v=3","gravatar_id":"","url":"https://api.github.com/users/odinuv","html_url":"https://github.com/odinuv","followers_url":"https://api.github.com/users/odinuv/followers","following_url":"https://api.github.com/users/odinuv/following{/other_user}","gists_url":"https://api.github.com/users/odinuv/gists{/gist_id}","starred_url":"https://api.github.com/users/odinuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinuv/subscriptions","organizations_url":"https://api.github.com/users/odinuv/orgs","repos_url":"https://api.github.com/users/odinuv/repos","events_url":"https://api.github.com/users/odinuv/events{/privacy}","received_events_url":"https://api.github.com/users/odinuv/received_events","type":"User","site_admin":false},"body":"no tak je to jakoze immutable, takze kdyz to jednou projde, tak to musi fungovat, ale vypada to divne :)","created_at":"2016-12-13T10:16:33Z","updated_at":"2016-12-13T10:16:33Z","html_url":"https://github.com/keboola/docker-bundle/pull/101#discussion_r92136341","pull_request_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments/92136341"},"html":{"href":"https://github.com/keboola/docker-bundle/pull/101#discussion_r92136341"},"pull_request":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101","id":95710888,"html_url":"https://github.com/keboola/docker-bundle/pull/101","diff_url":"https://github.com/keboola/docker-bundle/pull/101.diff","patch_url":"https://github.com/keboola/docker-bundle/pull/101.patch","issue_url":"https://api.github.com/repos/keboola/docker-bundle/issues/101","number":101,"state":"open","locked":false,"title":"add inject_environment parameter","user":{"login":"odinuv","id":4319320,"avatar_url":"https://avatars.githubusercontent.com/u/4319320?v=3","gravatar_id":"","url":"https://api.github.com/users/odinuv","html_url":"https://github.com/odinuv","followers_url":"https://api.github.com/users/odinuv/followers","following_url":"https://api.github.com/users/odinuv/following{/other_user}","gists_url":"https://api.github.com/users/odinuv/gists{/gist_id}","starred_url":"https://api.github.com/users/odinuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinuv/subscriptions","organizations_url":"https://api.github.com/users/odinuv/orgs","repos_url":"https://api.github.com/users/odinuv/repos","events_url":"https://api.github.com/users/odinuv/events{/privacy}","received_events_url":"https://api.github.com/users/odinuv/received_events","type":"User","site_admin":false},"body":"feat: add inject_environment parameter to enable injecting configuration to environment (for processors)\r\nrefactor: create environment instance separately for each image\r\nrefactor: replace obsolete image docker-custom-php with docker-custom-php","created_at":"2016-11-29T15:13:01Z","updated_at":"2016-12-13T10:16:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8b4f3b0b9fd54fe253f126c22d014cb7047a538","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/commits","review_comments_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/comments","review_comment_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/issues/101/comments","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/d021ab5a79601924bf98f8af6bd304d711d1055c","head":{"label":"keboola:inject_environment","ref":"inject_environment","sha":"d021ab5a79601924bf98f8af6bd304d711d1055c","user":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":28211637,"name":"docker-bundle","full_name":"keboola/docker-bundle","owner":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/docker-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/keboola/docker-bundle","forks_url":"https://api.github.com/repos/keboola/docker-bundle/forks","keys_url":"https://api.github.com/repos/keboola/docker-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/docker-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/docker-bundle/teams","hooks_url":"https://api.github.com/repos/keboola/docker-bundle/hooks","issue_events_url":"https://api.github.com/repos/keboola/docker-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/docker-bundle/events","assignees_url":"https://api.github.com/repos/keboola/docker-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/docker-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/docker-bundle/tags","blobs_url":"https://api.github.com/repos/keboola/docker-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/docker-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/docker-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/docker-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/docker-bundle/languages","stargazers_url":"https://api.github.com/repos/keboola/docker-bundle/stargazers","contributors_url":"https://api.github.com/repos/keboola/docker-bundle/contributors","subscribers_url":"https://api.github.com/repos/keboola/docker-bundle/subscribers","subscription_url":"https://api.github.com/repos/keboola/docker-bundle/subscription","commits_url":"https://api.github.com/repos/keboola/docker-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/docker-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/docker-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/docker-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/docker-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/docker-bundle/merges","archive_url":"https://api.github.com/repos/keboola/docker-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/docker-bundle/downloads","issues_url":"https://api.github.com/repos/keboola/docker-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/docker-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/docker-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/docker-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/docker-bundle/labels{/name}","releases_url":"https://api.github.com/repos/keboola/docker-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/docker-bundle/deployments","created_at":"2014-12-19T02:55:47Z","updated_at":"2016-10-25T06:16:25Z","pushed_at":"2016-12-12T17:45:19Z","git_url":"git://github.com/keboola/docker-bundle.git","ssh_url":"git@github.com:keboola/docker-bundle.git","clone_url":"https://github.com/keboola/docker-bundle.git","svn_url":"https://github.com/keboola/docker-bundle","homepage":null,"size":1540,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":3,"default_branch":"master"}},"base":{"label":"keboola:master","ref":"master","sha":"1db73cae3f4ec2a0dec96e89690bf45254b4c365","user":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":28211637,"name":"docker-bundle","full_name":"keboola/docker-bundle","owner":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/docker-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/keboola/docker-bundle","forks_url":"https://api.github.com/repos/keboola/docker-bundle/forks","keys_url":"https://api.github.com/repos/keboola/docker-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/docker-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/docker-bundle/teams","hooks_url":"https://api.github.com/repos/keboola/docker-bundle/hooks","issue_events_url":"https://api.github.com/repos/keboola/docker-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/docker-bundle/events","assignees_url":"https://api.github.com/repos/keboola/docker-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/docker-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/docker-bundle/tags","blobs_url":"https://api.github.com/repos/keboola/docker-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/docker-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/docker-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/docker-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/docker-bundle/languages","stargazers_url":"https://api.github.com/repos/keboola/docker-bundle/stargazers","contributors_url":"https://api.github.com/repos/keboola/docker-bundle/contributors","subscribers_url":"https://api.github.com/repos/keboola/docker-bundle/subscribers","subscription_url":"https://api.github.com/repos/keboola/docker-bundle/subscription","commits_url":"https://api.github.com/repos/keboola/docker-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/docker-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/docker-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/docker-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/docker-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/docker-bundle/merges","archive_url":"https://api.github.com/repos/keboola/docker-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/docker-bundle/downloads","issues_url":"https://api.github.com/repos/keboola/docker-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/docker-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/docker-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/docker-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/docker-bundle/labels{/name}","releases_url":"https://api.github.com/repos/keboola/docker-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/docker-bundle/deployments","created_at":"2014-12-19T02:55:47Z","updated_at":"2016-10-25T06:16:25Z","pushed_at":"2016-12-12T17:45:19Z","git_url":"git://github.com/keboola/docker-bundle.git","ssh_url":"git@github.com:keboola/docker-bundle.git","clone_url":"https://github.com/keboola/docker-bundle.git","svn_url":"https://github.com/keboola/docker-bundle","homepage":null,"size":1540,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101"},"html":{"href":"https://github.com/keboola/docker-bundle/pull/101"},"issue":{"href":"https://api.github.com/repos/keboola/docker-bundle/issues/101"},"comments":{"href":"https://api.github.com/repos/keboola/docker-bundle/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/keboola/docker-bundle/statuses/d021ab5a79601924bf98f8af6bd304d711d1055c"}}}}
{"actor":{"display_login":"odinuv"}}