{"action":"created","comment":{"url":"https://api.github.com/repos/mysociety/verification-pages/pulls/comments/177126110","pull_request_review_id":106945030,"id":177126110,"diff_hunk":"@@ -7,6 +7,10 @@ def create\n     statement = Statement.find_by!(transaction_id: params.fetch(:id))\n     statement.verifications.create!(verification_params)\n \n+    # If there was a correction to the name, save that on the\n+    # statement so it'll be used for reconciliation and actioning:\n+    statement.update_attributes(person_name: params[:new_name]) if params[:new_name]","path":"app/controllers/verifications_controller.rb","position":6,"original_position":6,"commit_id":"6b8ef04ed4d48fb378477164a13c22617236760f","original_commit_id":"6b8ef04ed4d48fb378477164a13c22617236760f","user":{"login":"mhl","id":7907,"avatar_url":"https://avatars3.githubusercontent.com/u/7907?v=4","gravatar_id":"","url":"https://api.github.com/users/mhl","html_url":"https://github.com/mhl","followers_url":"https://api.github.com/users/mhl/followers","following_url":"https://api.github.com/users/mhl/following{/other_user}","gists_url":"https://api.github.com/users/mhl/gists{/gist_id}","starred_url":"https://api.github.com/users/mhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhl/subscriptions","organizations_url":"https://api.github.com/users/mhl/orgs","repos_url":"https://api.github.com/users/mhl/repos","events_url":"https://api.github.com/users/mhl/events{/privacy}","received_events_url":"https://api.github.com/users/mhl/received_events","type":"User","site_admin":false},"body":"@gbp Could you explain in a bit more detail what you mean by that? (I could see how you could do it with a callback on the Verification model, but not sure what you mean by putting it in the controller.)","created_at":"2018-03-26T15:08:50Z","updated_at":"2018-03-26T15:08:50Z","html_url":"https://github.com/mysociety/verification-pages/pull/69#discussion_r177126110","pull_request_url":"https://api.github.com/repos/mysociety/verification-pages/pulls/69","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/comments/177126110"},"html":{"href":"https://github.com/mysociety/verification-pages/pull/69#discussion_r177126110"},"pull_request":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/69"}},"in_reply_to_id":177116242},"pull_request":{"url":"https://api.github.com/repos/mysociety/verification-pages/pulls/69","id":177399545,"html_url":"https://github.com/mysociety/verification-pages/pull/69","diff_url":"https://github.com/mysociety/verification-pages/pull/69.diff","patch_url":"https://github.com/mysociety/verification-pages/pull/69.patch","issue_url":"https://api.github.com/repos/mysociety/verification-pages/issues/69","number":69,"state":"open","locked":false,"title":"Support name correction for otherwise correct suggestions","user":{"login":"mhl","id":7907,"avatar_url":"https://avatars3.githubusercontent.com/u/7907?v=4","gravatar_id":"","url":"https://api.github.com/users/mhl","html_url":"https://github.com/mhl","followers_url":"https://api.github.com/users/mhl/followers","following_url":"https://api.github.com/users/mhl/following{/other_user}","gists_url":"https://api.github.com/users/mhl/gists{/gist_id}","starred_url":"https://api.github.com/users/mhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhl/subscriptions","organizations_url":"https://api.github.com/users/mhl/orgs","repos_url":"https://api.github.com/users/mhl/repos","events_url":"https://api.github.com/users/mhl/events{/privacy}","received_events_url":"https://api.github.com/users/mhl/received_events","type":"User","site_admin":false},"body":"This adds a migration to add a column for `new_name`, and handles `new_name` being sent back from the front-end Javascript.","created_at":"2018-03-26T10:12:53Z","updated_at":"2018-03-26T15:08:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a356811c206f95d85f87b7b1c85631c2b5d69a04","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mysociety/verification-pages/pulls/69/commits","review_comments_url":"https://api.github.com/repos/mysociety/verification-pages/pulls/69/comments","review_comment_url":"https://api.github.com/repos/mysociety/verification-pages/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mysociety/verification-pages/issues/69/comments","statuses_url":"https://api.github.com/repos/mysociety/verification-pages/statuses/6b8ef04ed4d48fb378477164a13c22617236760f","head":{"label":"mysociety:support-name-correction","ref":"support-name-correction","sha":"6b8ef04ed4d48fb378477164a13c22617236760f","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":119664732,"name":"verification-pages","full_name":"mysociety/verification-pages","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/verification-pages","description":"Tool to generate and push verification pages to Wikidata","fork":false,"url":"https://api.github.com/repos/mysociety/verification-pages","forks_url":"https://api.github.com/repos/mysociety/verification-pages/forks","keys_url":"https://api.github.com/repos/mysociety/verification-pages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/verification-pages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/verification-pages/teams","hooks_url":"https://api.github.com/repos/mysociety/verification-pages/hooks","issue_events_url":"https://api.github.com/repos/mysociety/verification-pages/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/verification-pages/events","assignees_url":"https://api.github.com/repos/mysociety/verification-pages/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/verification-pages/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/verification-pages/tags","blobs_url":"https://api.github.com/repos/mysociety/verification-pages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/verification-pages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/verification-pages/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/verification-pages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/verification-pages/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/verification-pages/languages","stargazers_url":"https://api.github.com/repos/mysociety/verification-pages/stargazers","contributors_url":"https://api.github.com/repos/mysociety/verification-pages/contributors","subscribers_url":"https://api.github.com/repos/mysociety/verification-pages/subscribers","subscription_url":"https://api.github.com/repos/mysociety/verification-pages/subscription","commits_url":"https://api.github.com/repos/mysociety/verification-pages/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/verification-pages/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/verification-pages/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/verification-pages/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/verification-pages/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/verification-pages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/verification-pages/merges","archive_url":"https://api.github.com/repos/mysociety/verification-pages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/verification-pages/downloads","issues_url":"https://api.github.com/repos/mysociety/verification-pages/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/verification-pages/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/verification-pages/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/verification-pages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/verification-pages/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/verification-pages/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/verification-pages/deployments","created_at":"2018-01-31T09:24:33Z","updated_at":"2018-03-22T08:58:00Z","pushed_at":"2018-03-26T14:33:00Z","git_url":"git://github.com/mysociety/verification-pages.git","ssh_url":"git@github.com:mysociety/verification-pages.git","clone_url":"https://github.com/mysociety/verification-pages.git","svn_url":"https://github.com/mysociety/verification-pages","homepage":"https://www.mysociety.org/","size":307,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":33,"license":null,"forks":0,"open_issues":33,"watchers":0,"default_branch":"master"}},"base":{"label":"mysociety:master","ref":"master","sha":"4e9d5f23a94d5f32d6a1e21560ebad3ae1bf09c0","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":119664732,"name":"verification-pages","full_name":"mysociety/verification-pages","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/verification-pages","description":"Tool to generate and push verification pages to Wikidata","fork":false,"url":"https://api.github.com/repos/mysociety/verification-pages","forks_url":"https://api.github.com/repos/mysociety/verification-pages/forks","keys_url":"https://api.github.com/repos/mysociety/verification-pages/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/verification-pages/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/verification-pages/teams","hooks_url":"https://api.github.com/repos/mysociety/verification-pages/hooks","issue_events_url":"https://api.github.com/repos/mysociety/verification-pages/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/verification-pages/events","assignees_url":"https://api.github.com/repos/mysociety/verification-pages/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/verification-pages/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/verification-pages/tags","blobs_url":"https://api.github.com/repos/mysociety/verification-pages/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/verification-pages/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/verification-pages/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/verification-pages/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/verification-pages/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/verification-pages/languages","stargazers_url":"https://api.github.com/repos/mysociety/verification-pages/stargazers","contributors_url":"https://api.github.com/repos/mysociety/verification-pages/contributors","subscribers_url":"https://api.github.com/repos/mysociety/verification-pages/subscribers","subscription_url":"https://api.github.com/repos/mysociety/verification-pages/subscription","commits_url":"https://api.github.com/repos/mysociety/verification-pages/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/verification-pages/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/verification-pages/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/verification-pages/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/verification-pages/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/verification-pages/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/verification-pages/merges","archive_url":"https://api.github.com/repos/mysociety/verification-pages/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/verification-pages/downloads","issues_url":"https://api.github.com/repos/mysociety/verification-pages/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/verification-pages/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/verification-pages/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/verification-pages/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/verification-pages/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/verification-pages/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/verification-pages/deployments","created_at":"2018-01-31T09:24:33Z","updated_at":"2018-03-22T08:58:00Z","pushed_at":"2018-03-26T14:33:00Z","git_url":"git://github.com/mysociety/verification-pages.git","ssh_url":"git@github.com:mysociety/verification-pages.git","clone_url":"https://github.com/mysociety/verification-pages.git","svn_url":"https://github.com/mysociety/verification-pages","homepage":"https://www.mysociety.org/","size":307,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":33,"license":null,"forks":0,"open_issues":33,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/69"},"html":{"href":"https://github.com/mysociety/verification-pages/pull/69"},"issue":{"href":"https://api.github.com/repos/mysociety/verification-pages/issues/69"},"comments":{"href":"https://api.github.com/repos/mysociety/verification-pages/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mysociety/verification-pages/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/mysociety/verification-pages/statuses/6b8ef04ed4d48fb378477164a13c22617236760f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mhl"}}