{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/28","repository_url":"https://api.github.com/repos/PrestaShop/prestonbot","labels_url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/28/comments","events_url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/28/events","html_url":"https://github.com/PrestaShop/prestonbot/issues/28","id":191331486,"number":28,"title":"[Refacto] Create a GitHubEvent Resolver","user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-23T17:10:15Z","updated_at":"2016-11-23T17:55:56Z","closed_at":null,"body":"an ex here => https://github.com/symfony/symfony/pull/18510\r\n\r\nPros:\r\n* reduce the logic in controllers\r\n* fail fast in case of security breach\r\n\r\nSome inspiration here: https://github.com/Swop/github-webhook-bundle\r\n\r\nping @Swop: I'd like to use your bundle *but* keep my [own parser](https://github.com/Lp-digital/github-event-parser) of Json response (it fits more to my needs), any idea? Or I rely only on the library and I use only the signature validator."},"comment":{"url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/comments/262587162","html_url":"https://github.com/PrestaShop/prestonbot/issues/28#issuecomment-262587162","issue_url":"https://api.github.com/repos/PrestaShop/prestonbot/issues/28","id":262587162,"user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T17:55:56Z","updated_at":"2016-11-23T17:55:56Z","body":"Be careful of licences, my parser is GPL3 and yours is MIT... I was also thinking about bridging ahahah !\r\n\r\nThe easy way: I provide a bundle that bridge with yours and I rewrite the 3 listeners. So, using your bundle and completing with mine will allow some like that:\r\n\r\n```php\r\n<?php\r\n\r\nnamespace AppBundle\\Controller;\r\n\r\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\r\nuse Lpdigital\\Github\\EventType\\GithubEventInterface;\r\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\r\nuse Swop\\Bundle\\GitHubWebHookBundle\\Annotation\\GitHubWebHook;\r\n\r\nclass DefaultController extends Controller\r\n{\r\n    /**\r\n     * @Route(\"/webhook\", name=\"webhook\")\r\n     *\r\n     * @GitHubWebHook(eventType=\"push\")\r\n     * @GitHubWebHook(eventType=\"pull_request\")\r\n     */\r\n    public function indexAction(GithubEventInterface $gitHubEvent)\r\n    {\r\n        $eventName = $gitHubEvent::name();\r\n\r\n        return ['status' => 'success'];\r\n    }\r\n}\r\n```\r\n\r\nAlso I should provide the payload in all cases, I will complete my interface :)"}}
{"actor":{"display_login":"mickaelandrieu"}}