{"action":"created","comment":{"url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/comments/227414048","pull_request_review_id":167447129,"id":227414048,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzQxNDA0OA==","diff_hunk":"@@ -105,4 +109,22 @@ public function destroy(array $params)\n             // TODO LoginSessionEntity、AccountEntityが存在しなかった場合のエラー処理を追加する\n         }\n     }\n+\n+    /**\n+     * バリデーションを行う\n+     *\n+     * @param array $requestArray\n+     * @throws ValidationException\n+     */\n+    private function validateAccountValue(array $requestArray)\n+    {\n+        $validator = \\Validator::make($requestArray, [","path":"app/Services/AccountScenario.php","position":34,"original_position":34,"commit_id":"d2c55c0abcb9fdb343cbdcd3c90e83f52b6ba620","original_commit_id":"d2c55c0abcb9fdb343cbdcd3c90e83f52b6ba620","user":{"login":"keitakn","id":11032365,"node_id":"MDQ6VXNlcjExMDMyMzY1","avatar_url":"https://avatars3.githubusercontent.com/u/11032365?v=4","gravatar_id":"","url":"https://api.github.com/users/keitakn","html_url":"https://github.com/keitakn","followers_url":"https://api.github.com/users/keitakn/followers","following_url":"https://api.github.com/users/keitakn/following{/other_user}","gists_url":"https://api.github.com/users/keitakn/gists{/gist_id}","starred_url":"https://api.github.com/users/keitakn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keitakn/subscriptions","organizations_url":"https://api.github.com/users/keitakn/orgs","repos_url":"https://api.github.com/users/keitakn/repos","events_url":"https://api.github.com/users/keitakn/events{/privacy}","received_events_url":"https://api.github.com/users/keitakn/received_events","type":"User","site_admin":false},"body":"まだ途中だったらごめんなんだけど、必須かどうかを判定する `required` は必ず入れるとして↓\r\n\r\n```\r\n        $validator = \\Validator::make($requestArray, [\r\n            'accessToken' => 'required|alpha_num|min:40|max:64',\r\n            'permanentId' => 'required|integer|min:1|max:4294967294',\r\n        ]);\r\n```\r\n\r\nこんな感じに定義するのはどうだろう🐱？？\r\n\r\nアクセストークンの型定義に関しては [公式ドキュメント](https://qiita.com/api/v2/docs) に `/^[0-9a-f]{40}$/` って書いてあったんだけど、実際にはQiitaから64桁の値が返ってきてるような気がしたから、こういう定義にしてあって、`permanentId` に関しては多分連番だろうから [DBのINT型の最大値](http://www.cgis.biz/others/mysql/16/) を入れてる感じ！（結構おおげさな気もするけど・・・）\r\n\r\npermanentIdに関してはマイナスの数値とか小数点が入るのを防げばいいから、最低限こんな感じで定義しておけば良いかなって思った！","created_at":"2018-10-23T14:18:23Z","updated_at":"2018-10-23T14:37:15Z","html_url":"https://github.com/nekochans/qiita-stocker-backend/pull/42#discussion_r227414048","pull_request_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/comments/227414048"},"html":{"href":"https://github.com/nekochans/qiita-stocker-backend/pull/42#discussion_r227414048"},"pull_request":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42","id":224522603,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NTIyNjAz","html_url":"https://github.com/nekochans/qiita-stocker-backend/pull/42","diff_url":"https://github.com/nekochans/qiita-stocker-backend/pull/42.diff","patch_url":"https://github.com/nekochans/qiita-stocker-backend/pull/42.patch","issue_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/42","number":42,"state":"open","locked":false,"title":"[WIP] アカウント作成時のバリデーションを追加する","user":{"login":"kobayashi-m42","id":32682645,"node_id":"MDQ6VXNlcjMyNjgyNjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/32682645?v=4","gravatar_id":"","url":"https://api.github.com/users/kobayashi-m42","html_url":"https://github.com/kobayashi-m42","followers_url":"https://api.github.com/users/kobayashi-m42/followers","following_url":"https://api.github.com/users/kobayashi-m42/following{/other_user}","gists_url":"https://api.github.com/users/kobayashi-m42/gists{/gist_id}","starred_url":"https://api.github.com/users/kobayashi-m42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobayashi-m42/subscriptions","organizations_url":"https://api.github.com/users/kobayashi-m42/orgs","repos_url":"https://api.github.com/users/kobayashi-m42/repos","events_url":"https://api.github.com/users/kobayashi-m42/events{/privacy}","received_events_url":"https://api.github.com/users/kobayashi-m42/received_events","type":"User","site_admin":false},"body":"# issueURL\r\nhttps://github.com/nekochans/qiita-stocker-backend/issues/36\r\n\r\n# 関連URL\r\n[optional]\r\n\r\n# Doneの定義\r\n- アカウント作成時のバリデーションチェックが追加されていること\r\n- バリデーションエラーの場合、エラーレスポンスが返されること\r\n\r\n# 変更点概要\r\n\r\n## 仕様的変更点概要\r\n[optional]\r\n\r\n## 技術的変更点概要\r\n[required]\r\n\r\n# レビュアーに重点的にチェックして欲しい点\r\n[optional]\r\n\r\n# 補足情報\r\n[optional]\r\n","created_at":"2018-10-21T07:04:05Z","updated_at":"2018-10-23T14:37:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3180a6ad0c7a61299eaa6c669515d08549395349","assignee":{"login":"kobayashi-m42","id":32682645,"node_id":"MDQ6VXNlcjMyNjgyNjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/32682645?v=4","gravatar_id":"","url":"https://api.github.com/users/kobayashi-m42","html_url":"https://github.com/kobayashi-m42","followers_url":"https://api.github.com/users/kobayashi-m42/followers","following_url":"https://api.github.com/users/kobayashi-m42/following{/other_user}","gists_url":"https://api.github.com/users/kobayashi-m42/gists{/gist_id}","starred_url":"https://api.github.com/users/kobayashi-m42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobayashi-m42/subscriptions","organizations_url":"https://api.github.com/users/kobayashi-m42/orgs","repos_url":"https://api.github.com/users/kobayashi-m42/repos","events_url":"https://api.github.com/users/kobayashi-m42/events{/privacy}","received_events_url":"https://api.github.com/users/kobayashi-m42/received_events","type":"User","site_admin":false},"assignees":[{"login":"kobayashi-m42","id":32682645,"node_id":"MDQ6VXNlcjMyNjgyNjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/32682645?v=4","gravatar_id":"","url":"https://api.github.com/users/kobayashi-m42","html_url":"https://github.com/kobayashi-m42","followers_url":"https://api.github.com/users/kobayashi-m42/followers","following_url":"https://api.github.com/users/kobayashi-m42/following{/other_user}","gists_url":"https://api.github.com/users/kobayashi-m42/gists{/gist_id}","starred_url":"https://api.github.com/users/kobayashi-m42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobayashi-m42/subscriptions","organizations_url":"https://api.github.com/users/kobayashi-m42/orgs","repos_url":"https://api.github.com/users/kobayashi-m42/repos","events_url":"https://api.github.com/users/kobayashi-m42/events{/privacy}","received_events_url":"https://api.github.com/users/kobayashi-m42/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42/commits","review_comments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42/comments","review_comment_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/42/comments","statuses_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/statuses/d2c55c0abcb9fdb343cbdcd3c90e83f52b6ba620","head":{"label":"nekochans:feature/36","ref":"feature/36","sha":"d2c55c0abcb9fdb343cbdcd3c90e83f52b6ba620","user":{"login":"nekochans","id":42195274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMTk1Mjc0","avatar_url":"https://avatars2.githubusercontent.com/u/42195274?v=4","gravatar_id":"","url":"https://api.github.com/users/nekochans","html_url":"https://github.com/nekochans","followers_url":"https://api.github.com/users/nekochans/followers","following_url":"https://api.github.com/users/nekochans/following{/other_user}","gists_url":"https://api.github.com/users/nekochans/gists{/gist_id}","starred_url":"https://api.github.com/users/nekochans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekochans/subscriptions","organizations_url":"https://api.github.com/users/nekochans/orgs","repos_url":"https://api.github.com/users/nekochans/repos","events_url":"https://api.github.com/users/nekochans/events{/privacy}","received_events_url":"https://api.github.com/users/nekochans/received_events","type":"Organization","site_admin":false},"repo":{"id":144956368,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5NTYzNjg=","name":"qiita-stocker-backend","full_name":"nekochans/qiita-stocker-backend","private":false,"owner":{"login":"nekochans","id":42195274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMTk1Mjc0","avatar_url":"https://avatars2.githubusercontent.com/u/42195274?v=4","gravatar_id":"","url":"https://api.github.com/users/nekochans","html_url":"https://github.com/nekochans","followers_url":"https://api.github.com/users/nekochans/followers","following_url":"https://api.github.com/users/nekochans/following{/other_user}","gists_url":"https://api.github.com/users/nekochans/gists{/gist_id}","starred_url":"https://api.github.com/users/nekochans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekochans/subscriptions","organizations_url":"https://api.github.com/users/nekochans/orgs","repos_url":"https://api.github.com/users/nekochans/repos","events_url":"https://api.github.com/users/nekochans/events{/privacy}","received_events_url":"https://api.github.com/users/nekochans/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nekochans/qiita-stocker-backend","description":null,"fork":false,"url":"https://api.github.com/repos/nekochans/qiita-stocker-backend","forks_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/forks","keys_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/teams","hooks_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/hooks","issue_events_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/events{/number}","events_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/events","assignees_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/assignees{/user}","branches_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/branches{/branch}","tags_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/tags","blobs_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/languages","stargazers_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/stargazers","contributors_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/contributors","subscribers_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/subscribers","subscription_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/subscription","commits_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/contents/{+path}","compare_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/merges","archive_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/downloads","issues_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues{/number}","pulls_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/labels{/name}","releases_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/releases{/id}","deployments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/deployments","created_at":"2018-08-16T08:00:24Z","updated_at":"2018-10-21T05:59:15Z","pushed_at":"2018-10-22T14:23:19Z","git_url":"git://github.com/nekochans/qiita-stocker-backend.git","ssh_url":"git@github.com:nekochans/qiita-stocker-backend.git","clone_url":"https://github.com/nekochans/qiita-stocker-backend.git","svn_url":"https://github.com/nekochans/qiita-stocker-backend","homepage":null,"size":265,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"nekochans:master","ref":"master","sha":"fa38f4fc54efe86594a91250582957c40ecfc6ea","user":{"login":"nekochans","id":42195274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMTk1Mjc0","avatar_url":"https://avatars2.githubusercontent.com/u/42195274?v=4","gravatar_id":"","url":"https://api.github.com/users/nekochans","html_url":"https://github.com/nekochans","followers_url":"https://api.github.com/users/nekochans/followers","following_url":"https://api.github.com/users/nekochans/following{/other_user}","gists_url":"https://api.github.com/users/nekochans/gists{/gist_id}","starred_url":"https://api.github.com/users/nekochans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekochans/subscriptions","organizations_url":"https://api.github.com/users/nekochans/orgs","repos_url":"https://api.github.com/users/nekochans/repos","events_url":"https://api.github.com/users/nekochans/events{/privacy}","received_events_url":"https://api.github.com/users/nekochans/received_events","type":"Organization","site_admin":false},"repo":{"id":144956368,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5NTYzNjg=","name":"qiita-stocker-backend","full_name":"nekochans/qiita-stocker-backend","private":false,"owner":{"login":"nekochans","id":42195274,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyMTk1Mjc0","avatar_url":"https://avatars2.githubusercontent.com/u/42195274?v=4","gravatar_id":"","url":"https://api.github.com/users/nekochans","html_url":"https://github.com/nekochans","followers_url":"https://api.github.com/users/nekochans/followers","following_url":"https://api.github.com/users/nekochans/following{/other_user}","gists_url":"https://api.github.com/users/nekochans/gists{/gist_id}","starred_url":"https://api.github.com/users/nekochans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekochans/subscriptions","organizations_url":"https://api.github.com/users/nekochans/orgs","repos_url":"https://api.github.com/users/nekochans/repos","events_url":"https://api.github.com/users/nekochans/events{/privacy}","received_events_url":"https://api.github.com/users/nekochans/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nekochans/qiita-stocker-backend","description":null,"fork":false,"url":"https://api.github.com/repos/nekochans/qiita-stocker-backend","forks_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/forks","keys_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/teams","hooks_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/hooks","issue_events_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/events{/number}","events_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/events","assignees_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/assignees{/user}","branches_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/branches{/branch}","tags_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/tags","blobs_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/languages","stargazers_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/stargazers","contributors_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/contributors","subscribers_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/subscribers","subscription_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/subscription","commits_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/contents/{+path}","compare_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/merges","archive_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/downloads","issues_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues{/number}","pulls_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/labels{/name}","releases_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/releases{/id}","deployments_url":"https://api.github.com/repos/nekochans/qiita-stocker-backend/deployments","created_at":"2018-08-16T08:00:24Z","updated_at":"2018-10-21T05:59:15Z","pushed_at":"2018-10-22T14:23:19Z","git_url":"git://github.com/nekochans/qiita-stocker-backend.git","ssh_url":"git@github.com:nekochans/qiita-stocker-backend.git","clone_url":"https://github.com/nekochans/qiita-stocker-backend.git","svn_url":"https://github.com/nekochans/qiita-stocker-backend","homepage":null,"size":265,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42"},"html":{"href":"https://github.com/nekochans/qiita-stocker-backend/pull/42"},"issue":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/42"},"comments":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/nekochans/qiita-stocker-backend/statuses/d2c55c0abcb9fdb343cbdcd3c90e83f52b6ba620"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"keitakn"}}