{"action":"created","comment":{"url":"https://api.github.com/repos/brave/publishers/pulls/comments/134847787","pull_request_review_id":58189104,"id":134847787,"diff_hunk":"@@ -65,6 +75,16 @@ def require_valid_legal_form\n     end\n   end\n \n+  def require_publisher\n+    @publisher = Publisher.find_by(brave_publisher_id: params[:brave_publisher_id])","path":"app/controllers/api/publishers_controller.rb","position":27,"original_position":27,"commit_id":"1579ce400db38fbc56c233c9ed152016350eb7c3","original_commit_id":"1579ce400db38fbc56c233c9ed152016350eb7c3","user":{"login":"ayumi","id":521861,"avatar_url":"https://avatars1.githubusercontent.com/u/521861?v=4","gravatar_id":"","url":"https://api.github.com/users/ayumi","html_url":"https://github.com/ayumi","followers_url":"https://api.github.com/users/ayumi/followers","following_url":"https://api.github.com/users/ayumi/following{/other_user}","gists_url":"https://api.github.com/users/ayumi/gists{/gist_id}","starred_url":"https://api.github.com/users/ayumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayumi/subscriptions","organizations_url":"https://api.github.com/users/ayumi/orgs","repos_url":"https://api.github.com/users/ayumi/repos","events_url":"https://api.github.com/users/ayumi/events{/privacy}","received_events_url":"https://api.github.com/users/ayumi/received_events","type":"User","site_admin":false},"body":"There can be multiple publishers per `brave_publisher_id` which have `verified: false`. For example, many curious people have tried to register `google.com`, creating many unverified Publisher records. The only constraint is there can only be 1 verified publisher.\r\n\r\nDepending on what @mrose17 feels I think this should destroy all Publisher records matching the brave_publisher_id.","created_at":"2017-08-23T19:27:04Z","updated_at":"2017-08-23T19:27:11Z","html_url":"https://github.com/brave/publishers/pull/96#discussion_r134847787","pull_request_url":"https://api.github.com/repos/brave/publishers/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/brave/publishers/pulls/comments/134847787"},"html":{"href":"https://github.com/brave/publishers/pull/96#discussion_r134847787"},"pull_request":{"href":"https://api.github.com/repos/brave/publishers/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/brave/publishers/pulls/96","id":137018237,"html_url":"https://github.com/brave/publishers/pull/96","diff_url":"https://github.com/brave/publishers/pull/96.diff","patch_url":"https://github.com/brave/publishers/pull/96.patch","issue_url":"https://api.github.com/repos/brave/publishers/issues/96","number":96,"state":"open","locked":false,"title":"Introduce API endpoint to delete publishers","user":{"login":"dgeb","id":29122,"avatar_url":"https://avatars0.githubusercontent.com/u/29122?v=4","gravatar_id":"","url":"https://api.github.com/users/dgeb","html_url":"https://github.com/dgeb","followers_url":"https://api.github.com/users/dgeb/followers","following_url":"https://api.github.com/users/dgeb/following{/other_user}","gists_url":"https://api.github.com/users/dgeb/gists{/gist_id}","starred_url":"https://api.github.com/users/dgeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgeb/subscriptions","organizations_url":"https://api.github.com/users/dgeb/orgs","repos_url":"https://api.github.com/users/dgeb/repos","events_url":"https://api.github.com/users/dgeb/events{/privacy}","received_events_url":"https://api.github.com/users/dgeb/received_events","type":"User","site_admin":false},"body":"[Resolves #47]","created_at":"2017-08-22T15:58:52Z","updated_at":"2017-08-23T19:27:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe9b8906d6c083a86958573024a6596d9dd003e7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/brave/publishers/pulls/96/commits","review_comments_url":"https://api.github.com/repos/brave/publishers/pulls/96/comments","review_comment_url":"https://api.github.com/repos/brave/publishers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brave/publishers/issues/96/comments","statuses_url":"https://api.github.com/repos/brave/publishers/statuses/1579ce400db38fbc56c233c9ed152016350eb7c3","head":{"label":"dgeb:delete-publishers-api","ref":"delete-publishers-api","sha":"1579ce400db38fbc56c233c9ed152016350eb7c3","user":{"login":"dgeb","id":29122,"avatar_url":"https://avatars0.githubusercontent.com/u/29122?v=4","gravatar_id":"","url":"https://api.github.com/users/dgeb","html_url":"https://github.com/dgeb","followers_url":"https://api.github.com/users/dgeb/followers","following_url":"https://api.github.com/users/dgeb/following{/other_user}","gists_url":"https://api.github.com/users/dgeb/gists{/gist_id}","starred_url":"https://api.github.com/users/dgeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgeb/subscriptions","organizations_url":"https://api.github.com/users/dgeb/orgs","repos_url":"https://api.github.com/users/dgeb/repos","events_url":"https://api.github.com/users/dgeb/events{/privacy}","received_events_url":"https://api.github.com/users/dgeb/received_events","type":"User","site_admin":false},"repo":{"id":99809162,"name":"publishers","full_name":"dgeb/publishers","owner":{"login":"dgeb","id":29122,"avatar_url":"https://avatars0.githubusercontent.com/u/29122?v=4","gravatar_id":"","url":"https://api.github.com/users/dgeb","html_url":"https://github.com/dgeb","followers_url":"https://api.github.com/users/dgeb/followers","following_url":"https://api.github.com/users/dgeb/following{/other_user}","gists_url":"https://api.github.com/users/dgeb/gists{/gist_id}","starred_url":"https://api.github.com/users/dgeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgeb/subscriptions","organizations_url":"https://api.github.com/users/dgeb/orgs","repos_url":"https://api.github.com/users/dgeb/repos","events_url":"https://api.github.com/users/dgeb/events{/privacy}","received_events_url":"https://api.github.com/users/dgeb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgeb/publishers","description":"Publisher interface for Brave Payments","fork":true,"url":"https://api.github.com/repos/dgeb/publishers","forks_url":"https://api.github.com/repos/dgeb/publishers/forks","keys_url":"https://api.github.com/repos/dgeb/publishers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgeb/publishers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgeb/publishers/teams","hooks_url":"https://api.github.com/repos/dgeb/publishers/hooks","issue_events_url":"https://api.github.com/repos/dgeb/publishers/issues/events{/number}","events_url":"https://api.github.com/repos/dgeb/publishers/events","assignees_url":"https://api.github.com/repos/dgeb/publishers/assignees{/user}","branches_url":"https://api.github.com/repos/dgeb/publishers/branches{/branch}","tags_url":"https://api.github.com/repos/dgeb/publishers/tags","blobs_url":"https://api.github.com/repos/dgeb/publishers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgeb/publishers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgeb/publishers/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgeb/publishers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgeb/publishers/statuses/{sha}","languages_url":"https://api.github.com/repos/dgeb/publishers/languages","stargazers_url":"https://api.github.com/repos/dgeb/publishers/stargazers","contributors_url":"https://api.github.com/repos/dgeb/publishers/contributors","subscribers_url":"https://api.github.com/repos/dgeb/publishers/subscribers","subscription_url":"https://api.github.com/repos/dgeb/publishers/subscription","commits_url":"https://api.github.com/repos/dgeb/publishers/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgeb/publishers/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgeb/publishers/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgeb/publishers/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgeb/publishers/contents/{+path}","compare_url":"https://api.github.com/repos/dgeb/publishers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgeb/publishers/merges","archive_url":"https://api.github.com/repos/dgeb/publishers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgeb/publishers/downloads","issues_url":"https://api.github.com/repos/dgeb/publishers/issues{/number}","pulls_url":"https://api.github.com/repos/dgeb/publishers/pulls{/number}","milestones_url":"https://api.github.com/repos/dgeb/publishers/milestones{/number}","notifications_url":"https://api.github.com/repos/dgeb/publishers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgeb/publishers/labels{/name}","releases_url":"https://api.github.com/repos/dgeb/publishers/releases{/id}","deployments_url":"https://api.github.com/repos/dgeb/publishers/deployments","created_at":"2017-08-09T13:04:47Z","updated_at":"2017-08-09T13:04:49Z","pushed_at":"2017-08-23T15:27:55Z","git_url":"git://github.com/dgeb/publishers.git","ssh_url":"git@github.com:dgeb/publishers.git","clone_url":"https://github.com/dgeb/publishers.git","svn_url":"https://github.com/dgeb/publishers","homepage":"https://publishers.brave.com","size":1015,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"brave:staging","ref":"staging","sha":"bbb83a0956f27724d3e44a340a5bc9a0b9dbb756","user":{"login":"brave","id":12301619,"avatar_url":"https://avatars1.githubusercontent.com/u/12301619?v=4","gravatar_id":"","url":"https://api.github.com/users/brave","html_url":"https://github.com/brave","followers_url":"https://api.github.com/users/brave/followers","following_url":"https://api.github.com/users/brave/following{/other_user}","gists_url":"https://api.github.com/users/brave/gists{/gist_id}","starred_url":"https://api.github.com/users/brave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brave/subscriptions","organizations_url":"https://api.github.com/users/brave/orgs","repos_url":"https://api.github.com/users/brave/repos","events_url":"https://api.github.com/users/brave/events{/privacy}","received_events_url":"https://api.github.com/users/brave/received_events","type":"Organization","site_admin":false},"repo":{"id":69634519,"name":"publishers","full_name":"brave/publishers","owner":{"login":"brave","id":12301619,"avatar_url":"https://avatars1.githubusercontent.com/u/12301619?v=4","gravatar_id":"","url":"https://api.github.com/users/brave","html_url":"https://github.com/brave","followers_url":"https://api.github.com/users/brave/followers","following_url":"https://api.github.com/users/brave/following{/other_user}","gists_url":"https://api.github.com/users/brave/gists{/gist_id}","starred_url":"https://api.github.com/users/brave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brave/subscriptions","organizations_url":"https://api.github.com/users/brave/orgs","repos_url":"https://api.github.com/users/brave/repos","events_url":"https://api.github.com/users/brave/events{/privacy}","received_events_url":"https://api.github.com/users/brave/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brave/publishers","description":"Publisher interface for Brave Payments","fork":false,"url":"https://api.github.com/repos/brave/publishers","forks_url":"https://api.github.com/repos/brave/publishers/forks","keys_url":"https://api.github.com/repos/brave/publishers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brave/publishers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brave/publishers/teams","hooks_url":"https://api.github.com/repos/brave/publishers/hooks","issue_events_url":"https://api.github.com/repos/brave/publishers/issues/events{/number}","events_url":"https://api.github.com/repos/brave/publishers/events","assignees_url":"https://api.github.com/repos/brave/publishers/assignees{/user}","branches_url":"https://api.github.com/repos/brave/publishers/branches{/branch}","tags_url":"https://api.github.com/repos/brave/publishers/tags","blobs_url":"https://api.github.com/repos/brave/publishers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brave/publishers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brave/publishers/git/refs{/sha}","trees_url":"https://api.github.com/repos/brave/publishers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brave/publishers/statuses/{sha}","languages_url":"https://api.github.com/repos/brave/publishers/languages","stargazers_url":"https://api.github.com/repos/brave/publishers/stargazers","contributors_url":"https://api.github.com/repos/brave/publishers/contributors","subscribers_url":"https://api.github.com/repos/brave/publishers/subscribers","subscription_url":"https://api.github.com/repos/brave/publishers/subscription","commits_url":"https://api.github.com/repos/brave/publishers/commits{/sha}","git_commits_url":"https://api.github.com/repos/brave/publishers/git/commits{/sha}","comments_url":"https://api.github.com/repos/brave/publishers/comments{/number}","issue_comment_url":"https://api.github.com/repos/brave/publishers/issues/comments{/number}","contents_url":"https://api.github.com/repos/brave/publishers/contents/{+path}","compare_url":"https://api.github.com/repos/brave/publishers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brave/publishers/merges","archive_url":"https://api.github.com/repos/brave/publishers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brave/publishers/downloads","issues_url":"https://api.github.com/repos/brave/publishers/issues{/number}","pulls_url":"https://api.github.com/repos/brave/publishers/pulls{/number}","milestones_url":"https://api.github.com/repos/brave/publishers/milestones{/number}","notifications_url":"https://api.github.com/repos/brave/publishers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brave/publishers/labels{/name}","releases_url":"https://api.github.com/repos/brave/publishers/releases{/id}","deployments_url":"https://api.github.com/repos/brave/publishers/deployments","created_at":"2016-09-30T04:47:29Z","updated_at":"2017-08-10T16:16:07Z","pushed_at":"2017-08-23T15:27:56Z","git_url":"git://github.com/brave/publishers.git","ssh_url":"git@github.com:brave/publishers.git","clone_url":"https://github.com/brave/publishers.git","svn_url":"https://github.com/brave/publishers","homepage":"https://publishers.brave.com","size":975,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":29,"forks":6,"open_issues":29,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brave/publishers/pulls/96"},"html":{"href":"https://github.com/brave/publishers/pull/96"},"issue":{"href":"https://api.github.com/repos/brave/publishers/issues/96"},"comments":{"href":"https://api.github.com/repos/brave/publishers/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/brave/publishers/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/brave/publishers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brave/publishers/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/brave/publishers/statuses/1579ce400db38fbc56c233c9ed152016350eb7c3"}}}}
{"actor":{"display_login":"ayumi"}}