{"action":"created","comment":{"url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/comments/215793430","pull_request_review_id":153140586,"id":215793430,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTc5MzQzMA==","diff_hunk":"@@ -12,20 +12,31 @@ import locale from 'locale/en'\n class BraveRewardsPageForm extends React.Component {\n   constructor(props) {\n     super(props);\n+\n+    //check for undefined\n+    let social;\n+    props.details.socialLinks === undefined ? social = {'twitter': '@', 'youtube': '@', 'twitch': '@'} : social = JSON.parse(props.details.socialLinks);","path":"app/javascript/packs/brave_rewards_banner_display.jsx","position":7,"original_position":7,"commit_id":"62c7cdef07dc641a654ecfa25f40f6fd67cf0627","original_commit_id":"62c7cdef07dc641a654ecfa25f40f6fd67cf0627","user":{"login":"yachtcaptain23","id":8647607,"node_id":"MDQ6VXNlcjg2NDc2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/8647607?v=4","gravatar_id":"","url":"https://api.github.com/users/yachtcaptain23","html_url":"https://github.com/yachtcaptain23","followers_url":"https://api.github.com/users/yachtcaptain23/followers","following_url":"https://api.github.com/users/yachtcaptain23/following{/other_user}","gists_url":"https://api.github.com/users/yachtcaptain23/gists{/gist_id}","starred_url":"https://api.github.com/users/yachtcaptain23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yachtcaptain23/subscriptions","organizations_url":"https://api.github.com/users/yachtcaptain23/orgs","repos_url":"https://api.github.com/users/yachtcaptain23/repos","events_url":"https://api.github.com/users/yachtcaptain23/events{/privacy}","received_events_url":"https://api.github.com/users/yachtcaptain23/received_events","type":"User","site_admin":false},"body":"So an error would be thrown if `social_links` is set to an empty hash. Going to be slightly nit-picky, but wouldn't this be preferable?\r\n\r\n```\r\n    if (Object.keys(props.details.socialLinks).length === 0 && props.details.socialLinks.constructor === Object) {\r\n      social = {'twitter': '@', 'youtube': '@', 'twitch': '@'};\r\n    } else {\r\n      social = JSON.parse(props.details.socialLinks);\r\n    }\r\n```","created_at":"2018-09-06T22:06:27Z","updated_at":"2018-09-06T22:06:27Z","html_url":"https://github.com/yachtcaptain23/publishers/pull/4#discussion_r215793430","pull_request_url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/comments/215793430"},"html":{"href":"https://github.com/yachtcaptain23/publishers/pull/4#discussion_r215793430"},"pull_request":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4","id":213753311,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzUzMzEx","html_url":"https://github.com/yachtcaptain23/publishers/pull/4","diff_url":"https://github.com/yachtcaptain23/publishers/pull/4.diff","patch_url":"https://github.com/yachtcaptain23/publishers/pull/4.patch","issue_url":"https://api.github.com/repos/yachtcaptain23/publishers/issues/4","number":4,"state":"open","locked":false,"title":"Persisting social links","user":{"login":"dlipeles","id":4713771,"node_id":"MDQ6VXNlcjQ3MTM3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/4713771?v=4","gravatar_id":"","url":"https://api.github.com/users/dlipeles","html_url":"https://github.com/dlipeles","followers_url":"https://api.github.com/users/dlipeles/followers","following_url":"https://api.github.com/users/dlipeles/following{/other_user}","gists_url":"https://api.github.com/users/dlipeles/gists{/gist_id}","starred_url":"https://api.github.com/users/dlipeles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlipeles/subscriptions","organizations_url":"https://api.github.com/users/dlipeles/orgs","repos_url":"https://api.github.com/users/dlipeles/repos","events_url":"https://api.github.com/users/dlipeles/events{/privacy}","received_events_url":"https://api.github.com/users/dlipeles/received_events","type":"User","site_admin":false},"body":"Submitter Checklist:\r\n\r\n- [ ] Submitted a [ticket](https://github.com/brave-intl/publishers/issues) for my issue if one did not already exist.\r\n- [ ] Used Github [auto-closing keywords](https://help.github.com/articles/closing-issues-via-commit-messages/) in the commit message.\r\n- [ ] Added/updated tests for this change (for new code or code which already has tests).\r\n- [ ] Tagged reviewers.\r\n\r\nTest Plan:\r\n\r\n\r\nReviewer Checklist:\r\n\r\nTests\r\n- [ ] Adequate test coverage exists to prevent regressions\r\n\r\nSecurity:\r\n- [ ] No raw SQL -- Always prefer ActiveRecord query helpers ([more info on StackOverflow](https://stackoverflow.com/questions/41410752/rails-5-sql-injection#41452695))\r\n- [ ] XSS is mitigated -- Avoid `html_safe` and `raw`; escape untrusted content from users and 3rd party APIs ([Rails XSS guide](https://brakemanpro.com/2017/09/08/cross-site-scripting-in-rails) and [OWASP XSS Prevention Cheat Sheet](https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet))\r\n","created_at":"2018-09-06T21:17:50Z","updated_at":"2018-09-06T22:06:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cbd36e49b7e8c6e622ea594e81e089d0b7ff218","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4/commits","review_comments_url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4/comments","review_comment_url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yachtcaptain23/publishers/issues/4/comments","statuses_url":"https://api.github.com/repos/yachtcaptain23/publishers/statuses/62c7cdef07dc641a654ecfa25f40f6fd67cf0627","head":{"label":"dlipeles:feature/brave_rewards_ui_rebase","ref":"feature/brave_rewards_ui_rebase","sha":"62c7cdef07dc641a654ecfa25f40f6fd67cf0627","user":{"login":"dlipeles","id":4713771,"node_id":"MDQ6VXNlcjQ3MTM3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/4713771?v=4","gravatar_id":"","url":"https://api.github.com/users/dlipeles","html_url":"https://github.com/dlipeles","followers_url":"https://api.github.com/users/dlipeles/followers","following_url":"https://api.github.com/users/dlipeles/following{/other_user}","gists_url":"https://api.github.com/users/dlipeles/gists{/gist_id}","starred_url":"https://api.github.com/users/dlipeles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlipeles/subscriptions","organizations_url":"https://api.github.com/users/dlipeles/orgs","repos_url":"https://api.github.com/users/dlipeles/repos","events_url":"https://api.github.com/users/dlipeles/events{/privacy}","received_events_url":"https://api.github.com/users/dlipeles/received_events","type":"User","site_admin":false},"repo":{"id":147733054,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc3MzMwNTQ=","name":"publishers","full_name":"dlipeles/publishers","owner":{"login":"dlipeles","id":4713771,"node_id":"MDQ6VXNlcjQ3MTM3NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/4713771?v=4","gravatar_id":"","url":"https://api.github.com/users/dlipeles","html_url":"https://github.com/dlipeles","followers_url":"https://api.github.com/users/dlipeles/followers","following_url":"https://api.github.com/users/dlipeles/following{/other_user}","gists_url":"https://api.github.com/users/dlipeles/gists{/gist_id}","starred_url":"https://api.github.com/users/dlipeles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlipeles/subscriptions","organizations_url":"https://api.github.com/users/dlipeles/orgs","repos_url":"https://api.github.com/users/dlipeles/repos","events_url":"https://api.github.com/users/dlipeles/events{/privacy}","received_events_url":"https://api.github.com/users/dlipeles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dlipeles/publishers","description":"Publisher interface for Brave Payments","fork":true,"url":"https://api.github.com/repos/dlipeles/publishers","forks_url":"https://api.github.com/repos/dlipeles/publishers/forks","keys_url":"https://api.github.com/repos/dlipeles/publishers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlipeles/publishers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlipeles/publishers/teams","hooks_url":"https://api.github.com/repos/dlipeles/publishers/hooks","issue_events_url":"https://api.github.com/repos/dlipeles/publishers/issues/events{/number}","events_url":"https://api.github.com/repos/dlipeles/publishers/events","assignees_url":"https://api.github.com/repos/dlipeles/publishers/assignees{/user}","branches_url":"https://api.github.com/repos/dlipeles/publishers/branches{/branch}","tags_url":"https://api.github.com/repos/dlipeles/publishers/tags","blobs_url":"https://api.github.com/repos/dlipeles/publishers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlipeles/publishers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlipeles/publishers/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlipeles/publishers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlipeles/publishers/statuses/{sha}","languages_url":"https://api.github.com/repos/dlipeles/publishers/languages","stargazers_url":"https://api.github.com/repos/dlipeles/publishers/stargazers","contributors_url":"https://api.github.com/repos/dlipeles/publishers/contributors","subscribers_url":"https://api.github.com/repos/dlipeles/publishers/subscribers","subscription_url":"https://api.github.com/repos/dlipeles/publishers/subscription","commits_url":"https://api.github.com/repos/dlipeles/publishers/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlipeles/publishers/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlipeles/publishers/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlipeles/publishers/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlipeles/publishers/contents/{+path}","compare_url":"https://api.github.com/repos/dlipeles/publishers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlipeles/publishers/merges","archive_url":"https://api.github.com/repos/dlipeles/publishers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlipeles/publishers/downloads","issues_url":"https://api.github.com/repos/dlipeles/publishers/issues{/number}","pulls_url":"https://api.github.com/repos/dlipeles/publishers/pulls{/number}","milestones_url":"https://api.github.com/repos/dlipeles/publishers/milestones{/number}","notifications_url":"https://api.github.com/repos/dlipeles/publishers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlipeles/publishers/labels{/name}","releases_url":"https://api.github.com/repos/dlipeles/publishers/releases{/id}","deployments_url":"https://api.github.com/repos/dlipeles/publishers/deployments","created_at":"2018-09-06T20:58:46Z","updated_at":"2018-09-06T20:58:49Z","pushed_at":"2018-09-06T21:16:53Z","git_url":"git://github.com/dlipeles/publishers.git","ssh_url":"git@github.com:dlipeles/publishers.git","clone_url":"https://github.com/dlipeles/publishers.git","svn_url":"https://github.com/dlipeles/publishers","homepage":"https://publishers.brave.com","size":13557,"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,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"staging"}},"base":{"label":"yachtcaptain23:feature/brave_rewards_ui_rebase","ref":"feature/brave_rewards_ui_rebase","sha":"93201949e411682ed0b11920b89db38e9ca53068","user":{"login":"yachtcaptain23","id":8647607,"node_id":"MDQ6VXNlcjg2NDc2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/8647607?v=4","gravatar_id":"","url":"https://api.github.com/users/yachtcaptain23","html_url":"https://github.com/yachtcaptain23","followers_url":"https://api.github.com/users/yachtcaptain23/followers","following_url":"https://api.github.com/users/yachtcaptain23/following{/other_user}","gists_url":"https://api.github.com/users/yachtcaptain23/gists{/gist_id}","starred_url":"https://api.github.com/users/yachtcaptain23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yachtcaptain23/subscriptions","organizations_url":"https://api.github.com/users/yachtcaptain23/orgs","repos_url":"https://api.github.com/users/yachtcaptain23/repos","events_url":"https://api.github.com/users/yachtcaptain23/events{/privacy}","received_events_url":"https://api.github.com/users/yachtcaptain23/received_events","type":"User","site_admin":false},"repo":{"id":127461840,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc0NjE4NDA=","name":"publishers","full_name":"yachtcaptain23/publishers","owner":{"login":"yachtcaptain23","id":8647607,"node_id":"MDQ6VXNlcjg2NDc2MDc=","avatar_url":"https://avatars2.githubusercontent.com/u/8647607?v=4","gravatar_id":"","url":"https://api.github.com/users/yachtcaptain23","html_url":"https://github.com/yachtcaptain23","followers_url":"https://api.github.com/users/yachtcaptain23/followers","following_url":"https://api.github.com/users/yachtcaptain23/following{/other_user}","gists_url":"https://api.github.com/users/yachtcaptain23/gists{/gist_id}","starred_url":"https://api.github.com/users/yachtcaptain23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yachtcaptain23/subscriptions","organizations_url":"https://api.github.com/users/yachtcaptain23/orgs","repos_url":"https://api.github.com/users/yachtcaptain23/repos","events_url":"https://api.github.com/users/yachtcaptain23/events{/privacy}","received_events_url":"https://api.github.com/users/yachtcaptain23/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yachtcaptain23/publishers","description":"Publisher interface for Brave Payments","fork":true,"url":"https://api.github.com/repos/yachtcaptain23/publishers","forks_url":"https://api.github.com/repos/yachtcaptain23/publishers/forks","keys_url":"https://api.github.com/repos/yachtcaptain23/publishers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yachtcaptain23/publishers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yachtcaptain23/publishers/teams","hooks_url":"https://api.github.com/repos/yachtcaptain23/publishers/hooks","issue_events_url":"https://api.github.com/repos/yachtcaptain23/publishers/issues/events{/number}","events_url":"https://api.github.com/repos/yachtcaptain23/publishers/events","assignees_url":"https://api.github.com/repos/yachtcaptain23/publishers/assignees{/user}","branches_url":"https://api.github.com/repos/yachtcaptain23/publishers/branches{/branch}","tags_url":"https://api.github.com/repos/yachtcaptain23/publishers/tags","blobs_url":"https://api.github.com/repos/yachtcaptain23/publishers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yachtcaptain23/publishers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yachtcaptain23/publishers/git/refs{/sha}","trees_url":"https://api.github.com/repos/yachtcaptain23/publishers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yachtcaptain23/publishers/statuses/{sha}","languages_url":"https://api.github.com/repos/yachtcaptain23/publishers/languages","stargazers_url":"https://api.github.com/repos/yachtcaptain23/publishers/stargazers","contributors_url":"https://api.github.com/repos/yachtcaptain23/publishers/contributors","subscribers_url":"https://api.github.com/repos/yachtcaptain23/publishers/subscribers","subscription_url":"https://api.github.com/repos/yachtcaptain23/publishers/subscription","commits_url":"https://api.github.com/repos/yachtcaptain23/publishers/commits{/sha}","git_commits_url":"https://api.github.com/repos/yachtcaptain23/publishers/git/commits{/sha}","comments_url":"https://api.github.com/repos/yachtcaptain23/publishers/comments{/number}","issue_comment_url":"https://api.github.com/repos/yachtcaptain23/publishers/issues/comments{/number}","contents_url":"https://api.github.com/repos/yachtcaptain23/publishers/contents/{+path}","compare_url":"https://api.github.com/repos/yachtcaptain23/publishers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yachtcaptain23/publishers/merges","archive_url":"https://api.github.com/repos/yachtcaptain23/publishers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yachtcaptain23/publishers/downloads","issues_url":"https://api.github.com/repos/yachtcaptain23/publishers/issues{/number}","pulls_url":"https://api.github.com/repos/yachtcaptain23/publishers/pulls{/number}","milestones_url":"https://api.github.com/repos/yachtcaptain23/publishers/milestones{/number}","notifications_url":"https://api.github.com/repos/yachtcaptain23/publishers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yachtcaptain23/publishers/labels{/name}","releases_url":"https://api.github.com/repos/yachtcaptain23/publishers/releases{/id}","deployments_url":"https://api.github.com/repos/yachtcaptain23/publishers/deployments","created_at":"2018-03-30T18:45:58Z","updated_at":"2018-05-09T21:03:01Z","pushed_at":"2018-09-06T21:17:51Z","git_url":"git://github.com/yachtcaptain23/publishers.git","ssh_url":"git@github.com:yachtcaptain23/publishers.git","clone_url":"https://github.com/yachtcaptain23/publishers.git","svn_url":"https://github.com/yachtcaptain23/publishers","homepage":"https://publishers.brave.com","size":13557,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":1,"open_issues":3,"watchers":1,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4"},"html":{"href":"https://github.com/yachtcaptain23/publishers/pull/4"},"issue":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/issues/4"},"comments":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/yachtcaptain23/publishers/statuses/62c7cdef07dc641a654ecfa25f40f6fd67cf0627"}},"author_association":"NONE"}}
{"actor":{"display_login":"yachtcaptain23"}}