{"action":"created","comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments/151061196","pull_request_review_id":76705560,"id":151061196,"diff_hunk":"@@ -26,44 +26,44 @@ if (field.fieldValidate === true) {\n     const validators = [];\n     const MAX_VALUE = 2147483647;\n \n-    if (rules.indexOf('required') !== -1) {\n+    if (rules.includes('required')) {\n         validators.push('@NotNull');\n     }\n-    if (rules.indexOf('minlength') !== -1 && rules.indexOf('maxlength') === -1) {\n+    if (rules.includes('minlength') && rules.includes('maxlength')) {","path":"generators/entity/templates/server/src/main/java/package/common/field_validators.ejs","position":9,"original_position":9,"commit_id":"d7c6d4c5052475269f1f4aafa43815ffc9419b1d","original_commit_id":"d7c6d4c5052475269f1f4aafa43815ffc9419b1d","user":{"login":"MathieuAA","id":2753381,"avatar_url":"https://avatars3.githubusercontent.com/u/2753381?v=4","gravatar_id":"","url":"https://api.github.com/users/MathieuAA","html_url":"https://github.com/MathieuAA","followers_url":"https://api.github.com/users/MathieuAA/followers","following_url":"https://api.github.com/users/MathieuAA/following{/other_user}","gists_url":"https://api.github.com/users/MathieuAA/gists{/gist_id}","starred_url":"https://api.github.com/users/MathieuAA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathieuAA/subscriptions","organizations_url":"https://api.github.com/users/MathieuAA/orgs","repos_url":"https://api.github.com/users/MathieuAA/repos","events_url":"https://api.github.com/users/MathieuAA/events{/privacy}","received_events_url":"https://api.github.com/users/MathieuAA/received_events","type":"User","site_admin":false},"body":"`rules.indexOf('minlength') !== -1 && rules.indexOf('maxlength') === -1` should be `rules.includes('minlength') && !rules.includes('maxlength')`\r\nNote the `=== -1` ","created_at":"2017-11-15T08:36:58Z","updated_at":"2017-11-15T08:38:17Z","html_url":"https://github.com/jhipster/generator-jhipster/pull/6686#discussion_r151061196","pull_request_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments/151061196"},"html":{"href":"https://github.com/jhipster/generator-jhipster/pull/6686#discussion_r151061196"},"pull_request":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686"}}},"pull_request":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686","id":152712213,"html_url":"https://github.com/jhipster/generator-jhipster/pull/6686","diff_url":"https://github.com/jhipster/generator-jhipster/pull/6686.diff","patch_url":"https://github.com/jhipster/generator-jhipster/pull/6686.patch","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/6686","number":6686,"state":"open","locked":false,"title":"use includes instead of indexOf everywhere","user":{"login":"deepu105","id":1107223,"avatar_url":"https://avatars2.githubusercontent.com/u/1107223?v=4","gravatar_id":"","url":"https://api.github.com/users/deepu105","html_url":"https://github.com/deepu105","followers_url":"https://api.github.com/users/deepu105/followers","following_url":"https://api.github.com/users/deepu105/following{/other_user}","gists_url":"https://api.github.com/users/deepu105/gists{/gist_id}","starred_url":"https://api.github.com/users/deepu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepu105/subscriptions","organizations_url":"https://api.github.com/users/deepu105/orgs","repos_url":"https://api.github.com/users/deepu105/repos","events_url":"https://api.github.com/users/deepu105/events{/privacy}","received_events_url":"https://api.github.com/users/deepu105/received_events","type":"User","site_admin":false},"body":"- Please make sure the below checklist is followed for Pull Requests.\r\n\r\n- [ ] [Travis tests](https://travis-ci.org/jhipster/generator-jhipster/pull_requests) are green\r\n- [ ] Tests are added where necessary\r\n- [ ] Documentation is added/updated where necessary\r\n- [ ] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed\r\n","created_at":"2017-11-15T08:31:47Z","updated_at":"2017-11-15T08:38:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ded3d28655672ddda139e79714125ccf2abd855f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686/commits","review_comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686/comments","review_comment_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/6686/comments","statuses_url":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/d7c6d4c5052475269f1f4aafa43815ffc9419b1d","head":{"label":"deepu105:master","ref":"master","sha":"d7c6d4c5052475269f1f4aafa43815ffc9419b1d","user":{"login":"deepu105","id":1107223,"avatar_url":"https://avatars2.githubusercontent.com/u/1107223?v=4","gravatar_id":"","url":"https://api.github.com/users/deepu105","html_url":"https://github.com/deepu105","followers_url":"https://api.github.com/users/deepu105/followers","following_url":"https://api.github.com/users/deepu105/following{/other_user}","gists_url":"https://api.github.com/users/deepu105/gists{/gist_id}","starred_url":"https://api.github.com/users/deepu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepu105/subscriptions","organizations_url":"https://api.github.com/users/deepu105/orgs","repos_url":"https://api.github.com/users/deepu105/repos","events_url":"https://api.github.com/users/deepu105/events{/privacy}","received_events_url":"https://api.github.com/users/deepu105/received_events","type":"User","site_admin":false},"repo":{"id":35714009,"name":"generator-jhipster","full_name":"deepu105/generator-jhipster","owner":{"login":"deepu105","id":1107223,"avatar_url":"https://avatars2.githubusercontent.com/u/1107223?v=4","gravatar_id":"","url":"https://api.github.com/users/deepu105","html_url":"https://github.com/deepu105","followers_url":"https://api.github.com/users/deepu105/followers","following_url":"https://api.github.com/users/deepu105/following{/other_user}","gists_url":"https://api.github.com/users/deepu105/gists{/gist_id}","starred_url":"https://api.github.com/users/deepu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepu105/subscriptions","organizations_url":"https://api.github.com/users/deepu105/orgs","repos_url":"https://api.github.com/users/deepu105/repos","events_url":"https://api.github.com/users/deepu105/events{/privacy}","received_events_url":"https://api.github.com/users/deepu105/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deepu105/generator-jhipster","description":"Hipster stack for Java developers. Yeoman + Maven + Spring + AngularJS in one handy generator.","fork":true,"url":"https://api.github.com/repos/deepu105/generator-jhipster","forks_url":"https://api.github.com/repos/deepu105/generator-jhipster/forks","keys_url":"https://api.github.com/repos/deepu105/generator-jhipster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deepu105/generator-jhipster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deepu105/generator-jhipster/teams","hooks_url":"https://api.github.com/repos/deepu105/generator-jhipster/hooks","issue_events_url":"https://api.github.com/repos/deepu105/generator-jhipster/issues/events{/number}","events_url":"https://api.github.com/repos/deepu105/generator-jhipster/events","assignees_url":"https://api.github.com/repos/deepu105/generator-jhipster/assignees{/user}","branches_url":"https://api.github.com/repos/deepu105/generator-jhipster/branches{/branch}","tags_url":"https://api.github.com/repos/deepu105/generator-jhipster/tags","blobs_url":"https://api.github.com/repos/deepu105/generator-jhipster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deepu105/generator-jhipster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deepu105/generator-jhipster/git/refs{/sha}","trees_url":"https://api.github.com/repos/deepu105/generator-jhipster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deepu105/generator-jhipster/statuses/{sha}","languages_url":"https://api.github.com/repos/deepu105/generator-jhipster/languages","stargazers_url":"https://api.github.com/repos/deepu105/generator-jhipster/stargazers","contributors_url":"https://api.github.com/repos/deepu105/generator-jhipster/contributors","subscribers_url":"https://api.github.com/repos/deepu105/generator-jhipster/subscribers","subscription_url":"https://api.github.com/repos/deepu105/generator-jhipster/subscription","commits_url":"https://api.github.com/repos/deepu105/generator-jhipster/commits{/sha}","git_commits_url":"https://api.github.com/repos/deepu105/generator-jhipster/git/commits{/sha}","comments_url":"https://api.github.com/repos/deepu105/generator-jhipster/comments{/number}","issue_comment_url":"https://api.github.com/repos/deepu105/generator-jhipster/issues/comments{/number}","contents_url":"https://api.github.com/repos/deepu105/generator-jhipster/contents/{+path}","compare_url":"https://api.github.com/repos/deepu105/generator-jhipster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deepu105/generator-jhipster/merges","archive_url":"https://api.github.com/repos/deepu105/generator-jhipster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deepu105/generator-jhipster/downloads","issues_url":"https://api.github.com/repos/deepu105/generator-jhipster/issues{/number}","pulls_url":"https://api.github.com/repos/deepu105/generator-jhipster/pulls{/number}","milestones_url":"https://api.github.com/repos/deepu105/generator-jhipster/milestones{/number}","notifications_url":"https://api.github.com/repos/deepu105/generator-jhipster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deepu105/generator-jhipster/labels{/name}","releases_url":"https://api.github.com/repos/deepu105/generator-jhipster/releases{/id}","deployments_url":"https://api.github.com/repos/deepu105/generator-jhipster/deployments","created_at":"2015-05-16T07:18:59Z","updated_at":"2017-07-07T07:12:37Z","pushed_at":"2017-11-15T08:31:21Z","git_url":"git://github.com/deepu105/generator-jhipster.git","ssh_url":"git@github.com:deepu105/generator-jhipster.git","clone_url":"https://github.com/deepu105/generator-jhipster.git","svn_url":"https://github.com/deepu105/generator-jhipster","homepage":"http://jhipster.github.io","size":24387,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jhipster:master","ref":"master","sha":"08a74552ae386b2d39b648a5cb05be6e16c1d1ed","user":{"login":"jhipster","id":6059488,"avatar_url":"https://avatars3.githubusercontent.com/u/6059488?v=4","gravatar_id":"","url":"https://api.github.com/users/jhipster","html_url":"https://github.com/jhipster","followers_url":"https://api.github.com/users/jhipster/followers","following_url":"https://api.github.com/users/jhipster/following{/other_user}","gists_url":"https://api.github.com/users/jhipster/gists{/gist_id}","starred_url":"https://api.github.com/users/jhipster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhipster/subscriptions","organizations_url":"https://api.github.com/users/jhipster/orgs","repos_url":"https://api.github.com/users/jhipster/repos","events_url":"https://api.github.com/users/jhipster/events{/privacy}","received_events_url":"https://api.github.com/users/jhipster/received_events","type":"Organization","site_admin":false},"repo":{"id":13753636,"name":"generator-jhipster","full_name":"jhipster/generator-jhipster","owner":{"login":"jhipster","id":6059488,"avatar_url":"https://avatars3.githubusercontent.com/u/6059488?v=4","gravatar_id":"","url":"https://api.github.com/users/jhipster","html_url":"https://github.com/jhipster","followers_url":"https://api.github.com/users/jhipster/followers","following_url":"https://api.github.com/users/jhipster/following{/other_user}","gists_url":"https://api.github.com/users/jhipster/gists{/gist_id}","starred_url":"https://api.github.com/users/jhipster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhipster/subscriptions","organizations_url":"https://api.github.com/users/jhipster/orgs","repos_url":"https://api.github.com/users/jhipster/repos","events_url":"https://api.github.com/users/jhipster/events{/privacy}","received_events_url":"https://api.github.com/users/jhipster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jhipster/generator-jhipster","description":"Open Source application generator for creating Spring Boot + Angular projects in seconds!","fork":false,"url":"https://api.github.com/repos/jhipster/generator-jhipster","forks_url":"https://api.github.com/repos/jhipster/generator-jhipster/forks","keys_url":"https://api.github.com/repos/jhipster/generator-jhipster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhipster/generator-jhipster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhipster/generator-jhipster/teams","hooks_url":"https://api.github.com/repos/jhipster/generator-jhipster/hooks","issue_events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/events{/number}","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/events","assignees_url":"https://api.github.com/repos/jhipster/generator-jhipster/assignees{/user}","branches_url":"https://api.github.com/repos/jhipster/generator-jhipster/branches{/branch}","tags_url":"https://api.github.com/repos/jhipster/generator-jhipster/tags","blobs_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/{sha}","languages_url":"https://api.github.com/repos/jhipster/generator-jhipster/languages","stargazers_url":"https://api.github.com/repos/jhipster/generator-jhipster/stargazers","contributors_url":"https://api.github.com/repos/jhipster/generator-jhipster/contributors","subscribers_url":"https://api.github.com/repos/jhipster/generator-jhipster/subscribers","subscription_url":"https://api.github.com/repos/jhipster/generator-jhipster/subscription","commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhipster/generator-jhipster/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhipster/generator-jhipster/contents/{+path}","compare_url":"https://api.github.com/repos/jhipster/generator-jhipster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhipster/generator-jhipster/merges","archive_url":"https://api.github.com/repos/jhipster/generator-jhipster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhipster/generator-jhipster/downloads","issues_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues{/number}","pulls_url":"https://api.github.com/repos/jhipster/generator-jhipster/pulls{/number}","milestones_url":"https://api.github.com/repos/jhipster/generator-jhipster/milestones{/number}","notifications_url":"https://api.github.com/repos/jhipster/generator-jhipster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/labels{/name}","releases_url":"https://api.github.com/repos/jhipster/generator-jhipster/releases{/id}","deployments_url":"https://api.github.com/repos/jhipster/generator-jhipster/deployments","created_at":"2013-10-21T20:07:22Z","updated_at":"2017-11-15T03:36:20Z","pushed_at":"2017-11-15T08:31:48Z","git_url":"git://github.com/jhipster/generator-jhipster.git","ssh_url":"git@github.com:jhipster/generator-jhipster.git","clone_url":"https://github.com/jhipster/generator-jhipster.git","svn_url":"https://github.com/jhipster/generator-jhipster","homepage":"http://www.jhipster.tech","size":24903,"stargazers_count":8578,"watchers_count":8578,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1930,"mirror_url":null,"archived":false,"open_issues_count":51,"forks":1930,"open_issues":51,"watchers":8578,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686"},"html":{"href":"https://github.com/jhipster/generator-jhipster/pull/6686"},"issue":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/issues/6686"},"comments":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/issues/6686/comments"},"review_comments":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686/comments"},"review_comment":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/pulls/6686/commits"},"statuses":{"href":"https://api.github.com/repos/jhipster/generator-jhipster/statuses/d7c6d4c5052475269f1f4aafa43815ffc9419b1d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MathieuAA"}}