{"action":"created","comment":{"url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/comments/298487622","pull_request_review_id":255628766,"id":298487622,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5ODQ4NzYyMg==","diff_hunk":"@@ -0,0 +1,83 @@\n+package uk.gov.companieshouse.sensitiveword.common;\n+\n+import com.fasterxml.jackson.annotation.JsonProperty;\n+\n+/**\n+ * Model class used with Elasticsearch. The JSON Properties refer to the field names within the sensitive-words index\n+ *\n+ */\n+public class SensitiveWordModel {\n+    \n+    public static final String SENSITIVE_FIELD_NAME = \"sensitive\";\n+    public static final String MASTER_TEXT_FIELD_NAME = \"master_text\";\n+\n+\n+    @JsonProperty(SENSITIVE_FIELD_NAME)\n+    private String sensitive;\n+    \n+    /**\n+     *  This field is present to help us prevent searching for an existing sensitive word where I can NOT add an analyser to the Java QueryBuilders.matchQuery() library call\n+     */\n+    @JsonProperty(MASTER_TEXT_FIELD_NAME)\n+    private String masterText;\n+    \n+    public SensitiveWordModel(String sensitiveWord) {\n+        sensitive = sensitiveWord;\n+        masterText = sensitiveWord;\n+    }\n+\n+    public String getSensitive() {\n+        return sensitive;\n+    }\n+\n+    public void setSensitive(String sensitive) {\n+        this.sensitive = sensitive;\n+    }\n+\n+    public String getMasterText() {\n+        return masterText;\n+    }\n+\n+    public void setMasterText(String masterText) {\n+        this.masterText = masterText;\n+    }\n+\n+    @Override\n+    public String toString() {\n+        return \"SensitiveWordModel [sensitive=\" + sensitive + \", masterText=\" + masterText + \"]\";\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+        final int prime = 31;\n+        int result = 1;\n+        result = prime * result + ((masterText == null) ? 0 : masterText.hashCode());\n+        result = prime * result + ((sensitive == null) ? 0 : sensitive.hashCode());\n+        return result;\n+    }\n+\n+    // added for mockito testing\n+    @Override\n+    public boolean equals(Object obj) {\n+        if (this == obj)\n+            return true;\n+        if (obj == null)\n+            return false;\n+        if (getClass() != obj.getClass())\n+            return false;\n+        SensitiveWordModel other = (SensitiveWordModel) obj;\n+        if (masterText == null) {\n+            if (other.masterText != null)\n+                return false;\n+        } else if (!masterText.equals(other.masterText))\n+            return false;\n+        if (sensitive == null) {","path":"src/main/java/uk/gov/companieshouse/sensitiveword/common/SensitiveWordModel.java","position":74,"original_position":74,"commit_id":"96dc2ef08873a1e3b8971b8ceb19f2a1e906cb73","original_commit_id":"96dc2ef08873a1e3b8971b8ceb19f2a1e906cb73","user":{"login":"SteveHicksCH","id":36640165,"node_id":"MDQ6VXNlcjM2NjQwMTY1","avatar_url":"https://avatars1.githubusercontent.com/u/36640165?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveHicksCH","html_url":"https://github.com/SteveHicksCH","followers_url":"https://api.github.com/users/SteveHicksCH/followers","following_url":"https://api.github.com/users/SteveHicksCH/following{/other_user}","gists_url":"https://api.github.com/users/SteveHicksCH/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveHicksCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveHicksCH/subscriptions","organizations_url":"https://api.github.com/users/SteveHicksCH/orgs","repos_url":"https://api.github.com/users/SteveHicksCH/repos","events_url":"https://api.github.com/users/SteveHicksCH/events{/privacy}","received_events_url":"https://api.github.com/users/SteveHicksCH/received_events","type":"User","site_admin":false},"body":"That code was auto-generated. I have improved the readability","created_at":"2019-06-28T07:50:42Z","updated_at":"2019-06-28T07:50:43Z","html_url":"https://github.com/companieshouse/sensitive-word-checker/pull/9#discussion_r298487622","pull_request_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/comments/298487622"},"html":{"href":"https://github.com/companieshouse/sensitive-word-checker/pull/9#discussion_r298487622"},"pull_request":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9"}},"in_reply_to_id":298461141},"pull_request":{"url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9","id":292469191,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkyNDY5MTkx","html_url":"https://github.com/companieshouse/sensitive-word-checker/pull/9","diff_url":"https://github.com/companieshouse/sensitive-word-checker/pull/9.diff","patch_url":"https://github.com/companieshouse/sensitive-word-checker/pull/9.patch","issue_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/9","number":9,"state":"open","locked":false,"title":"Add sensitive word to index","user":{"login":"SteveHicksCH","id":36640165,"node_id":"MDQ6VXNlcjM2NjQwMTY1","avatar_url":"https://avatars1.githubusercontent.com/u/36640165?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveHicksCH","html_url":"https://github.com/SteveHicksCH","followers_url":"https://api.github.com/users/SteveHicksCH/followers","following_url":"https://api.github.com/users/SteveHicksCH/following{/other_user}","gists_url":"https://api.github.com/users/SteveHicksCH/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveHicksCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveHicksCH/subscriptions","organizations_url":"https://api.github.com/users/SteveHicksCH/orgs","repos_url":"https://api.github.com/users/SteveHicksCH/repos","events_url":"https://api.github.com/users/SteveHicksCH/events{/privacy}","received_events_url":"https://api.github.com/users/SteveHicksCH/received_events","type":"User","site_admin":false},"body":"Jira - ivp193\r\n\r\nAs well as adding a new sensitive word to the sensitive-words index the Mapping file has been changed to stop adding similar words to this index","created_at":"2019-06-27T14:42:44Z","updated_at":"2019-06-28T07:50:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ef4bee177a41e365a9418c6e1b278be7c8f585a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9/commits","review_comments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9/comments","review_comment_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/9/comments","statuses_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/statuses/96dc2ef08873a1e3b8971b8ceb19f2a1e906cb73","head":{"label":"companieshouse:feature/ivp193-add-sensitive-word-to-index","ref":"feature/ivp193-add-sensitive-word-to-index","sha":"96dc2ef08873a1e3b8971b8ceb19f2a1e906cb73","user":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"repo":{"id":186568948,"node_id":"MDEwOlJlcG9zaXRvcnkxODY1Njg5NDg=","name":"sensitive-word-checker","full_name":"companieshouse/sensitive-word-checker","private":false,"owner":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/companieshouse/sensitive-word-checker","description":"Service for verifying whether a phrase contains a sensitive word","fork":false,"url":"https://api.github.com/repos/companieshouse/sensitive-word-checker","forks_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/forks","keys_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/teams","hooks_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/hooks","issue_events_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/events{/number}","events_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/events","assignees_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/assignees{/user}","branches_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/branches{/branch}","tags_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/tags","blobs_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/statuses/{sha}","languages_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/languages","stargazers_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/stargazers","contributors_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/contributors","subscribers_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/subscribers","subscription_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/subscription","commits_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/contents/{+path}","compare_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/merges","archive_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/downloads","issues_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues{/number}","pulls_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls{/number}","milestones_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/milestones{/number}","notifications_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/labels{/name}","releases_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/releases{/id}","deployments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/deployments","created_at":"2019-05-14T07:33:06Z","updated_at":"2019-06-24T07:54:21Z","pushed_at":"2019-06-27T14:42:45Z","git_url":"git://github.com/companieshouse/sensitive-word-checker.git","ssh_url":"git@github.com:companieshouse/sensitive-word-checker.git","clone_url":"https://github.com/companieshouse/sensitive-word-checker.git","svn_url":"https://github.com/companieshouse/sensitive-word-checker","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"companieshouse:master","ref":"master","sha":"5aa4062777412426767dd1a6ccfeda6d8306c483","user":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"repo":{"id":186568948,"node_id":"MDEwOlJlcG9zaXRvcnkxODY1Njg5NDg=","name":"sensitive-word-checker","full_name":"companieshouse/sensitive-word-checker","private":false,"owner":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/companieshouse/sensitive-word-checker","description":"Service for verifying whether a phrase contains a sensitive word","fork":false,"url":"https://api.github.com/repos/companieshouse/sensitive-word-checker","forks_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/forks","keys_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/teams","hooks_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/hooks","issue_events_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/events{/number}","events_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/events","assignees_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/assignees{/user}","branches_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/branches{/branch}","tags_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/tags","blobs_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/refs{/sha}","trees_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/statuses/{sha}","languages_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/languages","stargazers_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/stargazers","contributors_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/contributors","subscribers_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/subscribers","subscription_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/subscription","commits_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/commits{/sha}","git_commits_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/git/commits{/sha}","comments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/comments{/number}","issue_comment_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/comments{/number}","contents_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/contents/{+path}","compare_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/merges","archive_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/downloads","issues_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues{/number}","pulls_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls{/number}","milestones_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/milestones{/number}","notifications_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/labels{/name}","releases_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/releases{/id}","deployments_url":"https://api.github.com/repos/companieshouse/sensitive-word-checker/deployments","created_at":"2019-05-14T07:33:06Z","updated_at":"2019-06-24T07:54:21Z","pushed_at":"2019-06-27T14:42:45Z","git_url":"git://github.com/companieshouse/sensitive-word-checker.git","ssh_url":"git@github.com:companieshouse/sensitive-word-checker.git","clone_url":"https://github.com/companieshouse/sensitive-word-checker.git","svn_url":"https://github.com/companieshouse/sensitive-word-checker","homepage":null,"size":57,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9"},"html":{"href":"https://github.com/companieshouse/sensitive-word-checker/pull/9"},"issue":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/9"},"comments":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/companieshouse/sensitive-word-checker/statuses/96dc2ef08873a1e3b8971b8ceb19f2a1e906cb73"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SteveHicksCH"}}