{"action":"created","comment":{"url":"https://api.github.com/repos/magento-engcom/msi/pulls/comments/198064977","pull_request_review_id":131920029,"id":198064977,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODA2NDk3Nw==","diff_hunk":"@@ -0,0 +1,62 @@\n+<?php\n+/**\n+ * Copyright © Magento, Inc. All rights reserved.\n+ * See COPYING.txt for license details.\n+ */\n+declare(strict_types=1);\n+\n+namespace Magento\\Inventory\\Model\\Stock\\Validator\\SalesChannel;\n+\n+use Magento\\Framework\\Validation\\ValidationResult;\n+use Magento\\Framework\\Validation\\ValidationResultFactory;\n+use Magento\\Store\\Model\\StoreManagerInterface;\n+use Magento\\InventorySalesApi\\Api\\Data\\SalesChannelInterface;\n+use Magento\\InventoryApi\\Model\\SalesChannelValidatorInterface;\n+\n+/**\n+ * Check that website code is valid\n+ */\n+class WebsiteCodeValidator implements SalesChannelValidatorInterface\n+{\n+    /**\n+     * @var ValidationResultFactory\n+     */\n+    private $validationResultFactory;\n+    /**","path":"app/code/Magento/Inventory/Model/Stock/Validator/SalesChannel/WebsiteCodeValidator.php","position":25,"original_position":25,"commit_id":"62d02d2716a641a20a35081f20b28ce3e5bc1f99","original_commit_id":"62d02d2716a641a20a35081f20b28ce3e5bc1f99","user":{"login":"naydav","id":537688,"node_id":"MDQ6VXNlcjUzNzY4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/537688?v=4","gravatar_id":"","url":"https://api.github.com/users/naydav","html_url":"https://github.com/naydav","followers_url":"https://api.github.com/users/naydav/followers","following_url":"https://api.github.com/users/naydav/following{/other_user}","gists_url":"https://api.github.com/users/naydav/gists{/gist_id}","starred_url":"https://api.github.com/users/naydav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naydav/subscriptions","organizations_url":"https://api.github.com/users/naydav/orgs","repos_url":"https://api.github.com/users/naydav/repos","events_url":"https://api.github.com/users/naydav/events{/privacy}","received_events_url":"https://api.github.com/users/naydav/received_events","type":"User","site_admin":false},"body":"Missed new line","created_at":"2018-06-26T08:58:40Z","updated_at":"2018-06-26T08:59:15Z","html_url":"https://github.com/magento-engcom/msi/pull/1430#discussion_r198064977","pull_request_url":"https://api.github.com/repos/magento-engcom/msi/pulls/1430","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/comments/198064977"},"html":{"href":"https://github.com/magento-engcom/msi/pull/1430#discussion_r198064977"},"pull_request":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/1430"}}},"pull_request":{"url":"https://api.github.com/repos/magento-engcom/msi/pulls/1430","id":196745587,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NzQ1NTg3","html_url":"https://github.com/magento-engcom/msi/pull/1430","diff_url":"https://github.com/magento-engcom/msi/pull/1430.diff","patch_url":"https://github.com/magento-engcom/msi/pull/1430.patch","issue_url":"https://api.github.com/repos/magento-engcom/msi/issues/1430","number":1430,"state":"open","locked":false,"title":"[+] added validation of sales channel;","user":{"login":"AlexandrKozyr","id":9674839,"node_id":"MDQ6VXNlcjk2NzQ4Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9674839?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandrKozyr","html_url":"https://github.com/AlexandrKozyr","followers_url":"https://api.github.com/users/AlexandrKozyr/followers","following_url":"https://api.github.com/users/AlexandrKozyr/following{/other_user}","gists_url":"https://api.github.com/users/AlexandrKozyr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandrKozyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandrKozyr/subscriptions","organizations_url":"https://api.github.com/users/AlexandrKozyr/orgs","repos_url":"https://api.github.com/users/AlexandrKozyr/repos","events_url":"https://api.github.com/users/AlexandrKozyr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandrKozyr/received_events","type":"User","site_admin":false},"body":"<!---\r\n    Thank you for contributing to Magento.\r\n    To help us process this pull request we recommend that you add the following information:\r\n     - Summary of the pull request,\r\n     - Issue(s) related to the changes made,\r\n     - Manual testing scenarios,\r\n-->\r\n\r\n<!--- Please provide a general summary of the Pull Request in the Title above -->\r\n\r\n### Description\r\nthis pull request fixed issue #1401 \r\nWhat done :\r\n1. added valdiation for SalesChannel on stock save\r\n2. added webapi tests for this validation\r\n\r\n### Fixed Issues (if relevant)\r\n<!---\r\n    If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.\r\n    There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.\r\n-->\r\n1. magento-engcom/msi#1401: \"No such entity.\" is displayed instead of Stocks Grid when user input for 'sales_channels' extension attribute is not validated\r\n\r\n### Manual testing scenarios\r\n<!---\r\n    Please provide a set of unambiguous steps to test the proposed code change.\r\n    Giving us manual testing scenarios will help with the processing and validation process.\r\n-->\r\n1. according to main issue;\r\n\r\n### Contribution checklist\r\n - [ ] Pull request has a meaningful description of its purpose\r\n - [ ] All commits are accompanied by meaningful commit messages\r\n - [ ] All new or changed code is covered with unit/integration tests (if applicable)\r\n - [ ] All automated tests passed successfully (all builds on Travis CI are green)\r\n","created_at":"2018-06-22T13:56:09Z","updated_at":"2018-06-26T08:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d2b82f68720b16c775c3b4d46179e72a7e56e85","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":972242474,"node_id":"MDU6TGFiZWw5NzIyNDI0NzQ=","url":"https://api.github.com/repos/magento-engcom/msi/labels/Dare%20to%20Share","name":"Dare to Share","color":"d93f0b","default":false},{"id":784022572,"node_id":"MDU6TGFiZWw3ODQwMjI1NzI=","url":"https://api.github.com/repos/magento-engcom/msi/labels/QA%20Passed","name":"QA Passed","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/magento-engcom/msi/pulls/1430/commits","review_comments_url":"https://api.github.com/repos/magento-engcom/msi/pulls/1430/comments","review_comment_url":"https://api.github.com/repos/magento-engcom/msi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magento-engcom/msi/issues/1430/comments","statuses_url":"https://api.github.com/repos/magento-engcom/msi/statuses/62d02d2716a641a20a35081f20b28ce3e5bc1f99","head":{"label":"magento-engcom:1401_website_validation","ref":"1401_website_validation","sha":"62d02d2716a641a20a35081f20b28ce3e5bc1f99","user":{"login":"magento-engcom","id":25439648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NDM5NjQ4","avatar_url":"https://avatars0.githubusercontent.com/u/25439648?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom","html_url":"https://github.com/magento-engcom","followers_url":"https://api.github.com/users/magento-engcom/followers","following_url":"https://api.github.com/users/magento-engcom/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom/orgs","repos_url":"https://api.github.com/users/magento-engcom/repos","events_url":"https://api.github.com/users/magento-engcom/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom/received_events","type":"Organization","site_admin":false},"repo":{"id":91593797,"node_id":"MDEwOlJlcG9zaXRvcnk5MTU5Mzc5Nw==","name":"msi","full_name":"magento-engcom/msi","owner":{"login":"magento-engcom","id":25439648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NDM5NjQ4","avatar_url":"https://avatars0.githubusercontent.com/u/25439648?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom","html_url":"https://github.com/magento-engcom","followers_url":"https://api.github.com/users/magento-engcom/followers","following_url":"https://api.github.com/users/magento-engcom/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom/orgs","repos_url":"https://api.github.com/users/magento-engcom/repos","events_url":"https://api.github.com/users/magento-engcom/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magento-engcom/msi","description":"Development of the MSI Project. See updated list of issues on the ZenHub board","fork":true,"url":"https://api.github.com/repos/magento-engcom/msi","forks_url":"https://api.github.com/repos/magento-engcom/msi/forks","keys_url":"https://api.github.com/repos/magento-engcom/msi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magento-engcom/msi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magento-engcom/msi/teams","hooks_url":"https://api.github.com/repos/magento-engcom/msi/hooks","issue_events_url":"https://api.github.com/repos/magento-engcom/msi/issues/events{/number}","events_url":"https://api.github.com/repos/magento-engcom/msi/events","assignees_url":"https://api.github.com/repos/magento-engcom/msi/assignees{/user}","branches_url":"https://api.github.com/repos/magento-engcom/msi/branches{/branch}","tags_url":"https://api.github.com/repos/magento-engcom/msi/tags","blobs_url":"https://api.github.com/repos/magento-engcom/msi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magento-engcom/msi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magento-engcom/msi/git/refs{/sha}","trees_url":"https://api.github.com/repos/magento-engcom/msi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magento-engcom/msi/statuses/{sha}","languages_url":"https://api.github.com/repos/magento-engcom/msi/languages","stargazers_url":"https://api.github.com/repos/magento-engcom/msi/stargazers","contributors_url":"https://api.github.com/repos/magento-engcom/msi/contributors","subscribers_url":"https://api.github.com/repos/magento-engcom/msi/subscribers","subscription_url":"https://api.github.com/repos/magento-engcom/msi/subscription","commits_url":"https://api.github.com/repos/magento-engcom/msi/commits{/sha}","git_commits_url":"https://api.github.com/repos/magento-engcom/msi/git/commits{/sha}","comments_url":"https://api.github.com/repos/magento-engcom/msi/comments{/number}","issue_comment_url":"https://api.github.com/repos/magento-engcom/msi/issues/comments{/number}","contents_url":"https://api.github.com/repos/magento-engcom/msi/contents/{+path}","compare_url":"https://api.github.com/repos/magento-engcom/msi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magento-engcom/msi/merges","archive_url":"https://api.github.com/repos/magento-engcom/msi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magento-engcom/msi/downloads","issues_url":"https://api.github.com/repos/magento-engcom/msi/issues{/number}","pulls_url":"https://api.github.com/repos/magento-engcom/msi/pulls{/number}","milestones_url":"https://api.github.com/repos/magento-engcom/msi/milestones{/number}","notifications_url":"https://api.github.com/repos/magento-engcom/msi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magento-engcom/msi/labels{/name}","releases_url":"https://api.github.com/repos/magento-engcom/msi/releases{/id}","deployments_url":"https://api.github.com/repos/magento-engcom/msi/deployments","created_at":"2017-05-17T15:47:14Z","updated_at":"2018-06-25T14:49:46Z","pushed_at":"2018-06-26T08:50:34Z","git_url":"git://github.com/magento-engcom/msi.git","ssh_url":"git@github.com:magento-engcom/msi.git","clone_url":"https://github.com/magento-engcom/msi.git","svn_url":"https://github.com/magento-engcom/msi","homepage":"https://app.zenhub.com/workspace/o/magento-engcom/msi/boards?repos=91593797","size":445710,"stargazers_count":103,"watchers_count":103,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":202,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":39,"open_issues":202,"watchers":103,"default_branch":"2.3-develop"}},"base":{"label":"magento-engcom:2.3-develop","ref":"2.3-develop","sha":"247714ded794dfd3abc1e928adb6bf46a0d0e0f6","user":{"login":"magento-engcom","id":25439648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NDM5NjQ4","avatar_url":"https://avatars0.githubusercontent.com/u/25439648?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom","html_url":"https://github.com/magento-engcom","followers_url":"https://api.github.com/users/magento-engcom/followers","following_url":"https://api.github.com/users/magento-engcom/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom/orgs","repos_url":"https://api.github.com/users/magento-engcom/repos","events_url":"https://api.github.com/users/magento-engcom/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom/received_events","type":"Organization","site_admin":false},"repo":{"id":91593797,"node_id":"MDEwOlJlcG9zaXRvcnk5MTU5Mzc5Nw==","name":"msi","full_name":"magento-engcom/msi","owner":{"login":"magento-engcom","id":25439648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NDM5NjQ4","avatar_url":"https://avatars0.githubusercontent.com/u/25439648?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom","html_url":"https://github.com/magento-engcom","followers_url":"https://api.github.com/users/magento-engcom/followers","following_url":"https://api.github.com/users/magento-engcom/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom/orgs","repos_url":"https://api.github.com/users/magento-engcom/repos","events_url":"https://api.github.com/users/magento-engcom/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/magento-engcom/msi","description":"Development of the MSI Project. See updated list of issues on the ZenHub board","fork":true,"url":"https://api.github.com/repos/magento-engcom/msi","forks_url":"https://api.github.com/repos/magento-engcom/msi/forks","keys_url":"https://api.github.com/repos/magento-engcom/msi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magento-engcom/msi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magento-engcom/msi/teams","hooks_url":"https://api.github.com/repos/magento-engcom/msi/hooks","issue_events_url":"https://api.github.com/repos/magento-engcom/msi/issues/events{/number}","events_url":"https://api.github.com/repos/magento-engcom/msi/events","assignees_url":"https://api.github.com/repos/magento-engcom/msi/assignees{/user}","branches_url":"https://api.github.com/repos/magento-engcom/msi/branches{/branch}","tags_url":"https://api.github.com/repos/magento-engcom/msi/tags","blobs_url":"https://api.github.com/repos/magento-engcom/msi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magento-engcom/msi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magento-engcom/msi/git/refs{/sha}","trees_url":"https://api.github.com/repos/magento-engcom/msi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magento-engcom/msi/statuses/{sha}","languages_url":"https://api.github.com/repos/magento-engcom/msi/languages","stargazers_url":"https://api.github.com/repos/magento-engcom/msi/stargazers","contributors_url":"https://api.github.com/repos/magento-engcom/msi/contributors","subscribers_url":"https://api.github.com/repos/magento-engcom/msi/subscribers","subscription_url":"https://api.github.com/repos/magento-engcom/msi/subscription","commits_url":"https://api.github.com/repos/magento-engcom/msi/commits{/sha}","git_commits_url":"https://api.github.com/repos/magento-engcom/msi/git/commits{/sha}","comments_url":"https://api.github.com/repos/magento-engcom/msi/comments{/number}","issue_comment_url":"https://api.github.com/repos/magento-engcom/msi/issues/comments{/number}","contents_url":"https://api.github.com/repos/magento-engcom/msi/contents/{+path}","compare_url":"https://api.github.com/repos/magento-engcom/msi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magento-engcom/msi/merges","archive_url":"https://api.github.com/repos/magento-engcom/msi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magento-engcom/msi/downloads","issues_url":"https://api.github.com/repos/magento-engcom/msi/issues{/number}","pulls_url":"https://api.github.com/repos/magento-engcom/msi/pulls{/number}","milestones_url":"https://api.github.com/repos/magento-engcom/msi/milestones{/number}","notifications_url":"https://api.github.com/repos/magento-engcom/msi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magento-engcom/msi/labels{/name}","releases_url":"https://api.github.com/repos/magento-engcom/msi/releases{/id}","deployments_url":"https://api.github.com/repos/magento-engcom/msi/deployments","created_at":"2017-05-17T15:47:14Z","updated_at":"2018-06-25T14:49:46Z","pushed_at":"2018-06-26T08:50:34Z","git_url":"git://github.com/magento-engcom/msi.git","ssh_url":"git@github.com:magento-engcom/msi.git","clone_url":"https://github.com/magento-engcom/msi.git","svn_url":"https://github.com/magento-engcom/msi","homepage":"https://app.zenhub.com/workspace/o/magento-engcom/msi/boards?repos=91593797","size":445710,"stargazers_count":103,"watchers_count":103,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":202,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":39,"open_issues":202,"watchers":103,"default_branch":"2.3-develop"}},"_links":{"self":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/1430"},"html":{"href":"https://github.com/magento-engcom/msi/pull/1430"},"issue":{"href":"https://api.github.com/repos/magento-engcom/msi/issues/1430"},"comments":{"href":"https://api.github.com/repos/magento-engcom/msi/issues/1430/comments"},"review_comments":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/1430/comments"},"review_comment":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magento-engcom/msi/pulls/1430/commits"},"statuses":{"href":"https://api.github.com/repos/magento-engcom/msi/statuses/62d02d2716a641a20a35081f20b28ce3e5bc1f99"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"naydav"}}