{"action":"created","comment":{"url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/comments/239910258","pull_request_review_id":182827263,"id":239910258,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTkxMDI1OA==","diff_hunk":"@@ -0,0 +1,139 @@\n+<?php\n+\n+namespace Algolia\\AlgoliaSearch\\Controller\\Adminhtml\\Support;\n+\n+use Algolia\\AlgoliaSearch\\Helper\\SupportHelper;\n+use Magento\\Backend\\App\\Action\\Context;\n+use Magento\\Framework\\Controller\\Result\\Redirect;\n+use Magento\\Framework\\Controller\\ResultFactory;\n+use Magento\\Framework\\View\\Result\\Page;\n+\n+class Contact extends AbstractAction\n+{\n+    private $supportHelper;\n+\n+    public function __construct(Context $context, ResultFactory $resultFactory, SupportHelper $supportHelper)\n+    {\n+        parent::__construct($context, $resultFactory);\n+\n+        $this->supportHelper = $supportHelper;\n+    }\n+\n+    /**\n+     * @throws \\Zend_Db_Statement_Exception\n+     *\n+     * @return Redirect | Page\n+     */\n+    public function execute()\n+    {\n+        if ($this->supportHelper->isExtensionSupportEnabled() === false) {\n+            $this->messageManager->addErrorMessage('Your Algolia app is not eligible for e-mail support.');\n+\n+            $resultRedirect = $this->resultRedirectFactory->create();\n+            $resultRedirect->setPath('*/*/index');\n+\n+            return $resultRedirect;\n+        }\n+\n+        $params = $this->getRequest()->getParams();\n+        if ($this->isFormSubmitted($params) && $data = $this->validateForm($params)) {","path":"Controller/Adminhtml/Support/Contact.php","position":39,"original_position":39,"commit_id":"2cf12a89cda49091c705e6af84c19b3af97da3b1","original_commit_id":"2cf12a89cda49091c705e6af84c19b3af97da3b1","user":{"login":"bsuravech","id":7048136,"node_id":"MDQ6VXNlcjcwNDgxMzY=","avatar_url":"https://avatars3.githubusercontent.com/u/7048136?v=4","gravatar_id":"","url":"https://api.github.com/users/bsuravech","html_url":"https://github.com/bsuravech","followers_url":"https://api.github.com/users/bsuravech/followers","following_url":"https://api.github.com/users/bsuravech/following{/other_user}","gists_url":"https://api.github.com/users/bsuravech/gists{/gist_id}","starred_url":"https://api.github.com/users/bsuravech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsuravech/subscriptions","organizations_url":"https://api.github.com/users/bsuravech/orgs","repos_url":"https://api.github.com/users/bsuravech/repos","events_url":"https://api.github.com/users/bsuravech/events{/privacy}","received_events_url":"https://api.github.com/users/bsuravech/received_events","type":"User","site_admin":false},"body":"I agree with @damcou and having the post action be separated from the view controller. \r\n\r\nYou could probably store the form values in session if you wanted to preserve form values on invalidation redirect. You'd pull the default data from session if it's been applied. ","created_at":"2018-12-07T18:56:46Z","updated_at":"2018-12-07T18:56:47Z","html_url":"https://github.com/algolia/algoliasearch-magento-2/pull/606#discussion_r239910258","pull_request_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/comments/239910258"},"html":{"href":"https://github.com/algolia/algoliasearch-magento-2/pull/606#discussion_r239910258"},"pull_request":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606"}},"in_reply_to_id":239475580},"pull_request":{"url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606","id":229643362,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NjQzMzYy","html_url":"https://github.com/algolia/algoliasearch-magento-2/pull/606","diff_url":"https://github.com/algolia/algoliasearch-magento-2/pull/606.diff","patch_url":"https://github.com/algolia/algoliasearch-magento-2/pull/606.patch","issue_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/606","number":606,"state":"open","locked":false,"title":"Support page","user":{"login":"JanPetr","id":1058144,"node_id":"MDQ6VXNlcjEwNTgxNDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1058144?v=4","gravatar_id":"","url":"https://api.github.com/users/JanPetr","html_url":"https://github.com/JanPetr","followers_url":"https://api.github.com/users/JanPetr/followers","following_url":"https://api.github.com/users/JanPetr/following{/other_user}","gists_url":"https://api.github.com/users/JanPetr/gists{/gist_id}","starred_url":"https://api.github.com/users/JanPetr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanPetr/subscriptions","organizations_url":"https://api.github.com/users/JanPetr/orgs","repos_url":"https://api.github.com/users/JanPetr/repos","events_url":"https://api.github.com/users/JanPetr/events{/privacy}","received_events_url":"https://api.github.com/users/JanPetr/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-09T10:04:00Z","updated_at":"2018-12-07T18:56:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca468424a0a83144c97f13de1719dc2aff4c9a4a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606/commits","review_comments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606/comments","review_comment_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/606/comments","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/statuses/2cf12a89cda49091c705e6af84c19b3af97da3b1","head":{"label":"algolia:feat/support_page","ref":"feat/support_page","sha":"2cf12a89cda49091c705e6af84c19b3af97da3b1","user":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":54131069,"node_id":"MDEwOlJlcG9zaXRvcnk1NDEzMTA2OQ==","name":"algoliasearch-magento-2","full_name":"algolia/algoliasearch-magento-2","private":false,"owner":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/algolia/algoliasearch-magento-2","description":"Algolia Search integration for Magento 2","fork":false,"url":"https://api.github.com/repos/algolia/algoliasearch-magento-2","forks_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/forks","keys_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/teams","hooks_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/hooks","issue_events_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/events","assignees_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/tags","blobs_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/languages","stargazers_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/stargazers","contributors_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/contributors","subscribers_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/subscribers","subscription_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/subscription","commits_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/merges","archive_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/downloads","issues_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/labels{/name}","releases_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/deployments","created_at":"2016-03-17T15:48:56Z","updated_at":"2018-11-27T16:45:27Z","pushed_at":"2018-12-06T13:39:32Z","git_url":"git://github.com/algolia/algoliasearch-magento-2.git","ssh_url":"git@github.com:algolia/algoliasearch-magento-2.git","clone_url":"https://github.com/algolia/algoliasearch-magento-2.git","svn_url":"https://github.com/algolia/algoliasearch-magento-2","homepage":"https://community.algolia.com/magento","size":13064,"stargazers_count":94,"watchers_count":94,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":64,"open_issues":40,"watchers":94,"default_branch":"master"}},"base":{"label":"algolia:develop","ref":"develop","sha":"bc56751df9091100e2746815bfaf9eab1e8518ea","user":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":54131069,"node_id":"MDEwOlJlcG9zaXRvcnk1NDEzMTA2OQ==","name":"algoliasearch-magento-2","full_name":"algolia/algoliasearch-magento-2","private":false,"owner":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/algolia/algoliasearch-magento-2","description":"Algolia Search integration for Magento 2","fork":false,"url":"https://api.github.com/repos/algolia/algoliasearch-magento-2","forks_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/forks","keys_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/teams","hooks_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/hooks","issue_events_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/events","assignees_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/tags","blobs_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/languages","stargazers_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/stargazers","contributors_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/contributors","subscribers_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/subscribers","subscription_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/subscription","commits_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/merges","archive_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/downloads","issues_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/labels{/name}","releases_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/algoliasearch-magento-2/deployments","created_at":"2016-03-17T15:48:56Z","updated_at":"2018-11-27T16:45:27Z","pushed_at":"2018-12-06T13:39:32Z","git_url":"git://github.com/algolia/algoliasearch-magento-2.git","ssh_url":"git@github.com:algolia/algoliasearch-magento-2.git","clone_url":"https://github.com/algolia/algoliasearch-magento-2.git","svn_url":"https://github.com/algolia/algoliasearch-magento-2","homepage":"https://community.algolia.com/magento","size":13064,"stargazers_count":94,"watchers_count":94,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":64,"open_issues":40,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606"},"html":{"href":"https://github.com/algolia/algoliasearch-magento-2/pull/606"},"issue":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/606"},"comments":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/issues/606/comments"},"review_comments":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606/comments"},"review_comment":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/pulls/606/commits"},"statuses":{"href":"https://api.github.com/repos/algolia/algoliasearch-magento-2/statuses/2cf12a89cda49091c705e6af84c19b3af97da3b1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bsuravech"}}