{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/comments/51501157","id":51501157,"diff_hunk":"@@ -14,10 +14,15 @@ def new\n     end\n \n     def create\n-      user_for_authorisation = User.new(invite_params)\n+      user_for_authorisation","path":"app/controllers/users/invitations_controller.rb","position":5,"original_position":5,"commit_id":"532d40ff26933dd6cbdc5e94ff982099ba30b75c","original_commit_id":"532d40ff26933dd6cbdc5e94ff982099ba30b75c","user":{"login":"novotnyjakub","id":986720,"avatar_url":"https://avatars.githubusercontent.com/u/986720?v=3","gravatar_id":"","url":"https://api.github.com/users/novotnyjakub","html_url":"https://github.com/novotnyjakub","followers_url":"https://api.github.com/users/novotnyjakub/followers","following_url":"https://api.github.com/users/novotnyjakub/following{/other_user}","gists_url":"https://api.github.com/users/novotnyjakub/gists{/gist_id}","starred_url":"https://api.github.com/users/novotnyjakub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novotnyjakub/subscriptions","organizations_url":"https://api.github.com/users/novotnyjakub/orgs","repos_url":"https://api.github.com/users/novotnyjakub/repos","events_url":"https://api.github.com/users/novotnyjakub/events{/privacy}","received_events_url":"https://api.github.com/users/novotnyjakub/received_events","type":"User","site_admin":false},"body":"Does this have to be called separately, if it's passed to the method bellow?","created_at":"2016-02-01T23:50:49Z","updated_at":"2016-02-01T23:50:49Z","html_url":"https://github.com/ministryofjustice/fr-staffapp/pull/579#discussion_r51501157","pull_request_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/comments/51501157"},"html":{"href":"https://github.com/ministryofjustice/fr-staffapp/pull/579#discussion_r51501157"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579","id":57837803,"html_url":"https://github.com/ministryofjustice/fr-staffapp/pull/579","diff_url":"https://github.com/ministryofjustice/fr-staffapp/pull/579.diff","patch_url":"https://github.com/ministryofjustice/fr-staffapp/pull/579.patch","issue_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/579","number":579,"state":"open","locked":false,"title":"Prevent deleted user errors","user":{"login":"colinbruce","id":6757677,"avatar_url":"https://avatars.githubusercontent.com/u/6757677?v=3","gravatar_id":"","url":"https://api.github.com/users/colinbruce","html_url":"https://github.com/colinbruce","followers_url":"https://api.github.com/users/colinbruce/followers","following_url":"https://api.github.com/users/colinbruce/following{/other_user}","gists_url":"https://api.github.com/users/colinbruce/gists{/gist_id}","starred_url":"https://api.github.com/users/colinbruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinbruce/subscriptions","organizations_url":"https://api.github.com/users/colinbruce/orgs","repos_url":"https://api.github.com/users/colinbruce/repos","events_url":"https://api.github.com/users/colinbruce/events{/privacy}","received_events_url":"https://api.github.com/users/colinbruce/received_events","type":"User","site_admin":false},"body":"Show warning message when deleted user is invited\r\n\r\nThis should prevent the `PG::UniqueViolation: ERROR:  duplicate key\r\nvalue violates unique constraint \"index_users_on_email\"` sentry warnings.","created_at":"2016-02-01T13:15:26Z","updated_at":"2016-02-01T23:50:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6047cd79f40204922c16a84cf4b500f668d1a11","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/579/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/statuses/532d40ff26933dd6cbdc5e94ff982099ba30b75c","head":{"label":"ministryofjustice:invite-deleted-user-warning","ref":"invite-deleted-user-warning","sha":"532d40ff26933dd6cbdc5e94ff982099ba30b75c","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":30420185,"name":"fr-staffapp","full_name":"ministryofjustice/fr-staffapp","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/fr-staffapp","description":"Help with Court Fees Staff Interface","fork":false,"url":"https://api.github.com/repos/ministryofjustice/fr-staffapp","forks_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/forks","keys_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/events","assignees_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/merges","archive_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/deployments","created_at":"2015-02-06T16:01:04Z","updated_at":"2016-01-11T17:17:54Z","pushed_at":"2016-02-01T23:48:08Z","git_url":"git://github.com/ministryofjustice/fr-staffapp.git","ssh_url":"git@github.com:ministryofjustice/fr-staffapp.git","clone_url":"https://github.com/ministryofjustice/fr-staffapp.git","svn_url":"https://github.com/ministryofjustice/fr-staffapp","homepage":"","size":3817,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"54af224ac52a153dc8ca57fc386a191c14e1f606","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":30420185,"name":"fr-staffapp","full_name":"ministryofjustice/fr-staffapp","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/fr-staffapp","description":"Help with Court Fees Staff Interface","fork":false,"url":"https://api.github.com/repos/ministryofjustice/fr-staffapp","forks_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/forks","keys_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/events","assignees_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/merges","archive_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/fr-staffapp/deployments","created_at":"2015-02-06T16:01:04Z","updated_at":"2016-01-11T17:17:54Z","pushed_at":"2016-02-01T23:48:08Z","git_url":"git://github.com/ministryofjustice/fr-staffapp.git","ssh_url":"git@github.com:ministryofjustice/fr-staffapp.git","clone_url":"https://github.com/ministryofjustice/fr-staffapp.git","svn_url":"https://github.com/ministryofjustice/fr-staffapp","homepage":"","size":3817,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579"},"html":{"href":"https://github.com/ministryofjustice/fr-staffapp/pull/579"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/579"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/issues/579/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/pulls/579/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/fr-staffapp/statuses/532d40ff26933dd6cbdc5e94ff982099ba30b75c"}}}}