{"action":"created","comment":{"url":"https://api.github.com/repos/saasquatch/program-tools/pulls/comments/229352953","pull_request_review_id":169832854,"id":229352953,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTM1Mjk1Mw==","diff_hunk":"@@ -105,7 +105,23 @@ export class ReferralList {\n     if (this.referrals) {\n       referralsRow = (\n         this.referrals.map((ref) => {\n-          const referraltype = ref.rewards.length > 0 ? 'converted' : 'pending'\n+          const referraltype = ref.rewards.length > 0 ? 'converted' : 'pending';         \n+          const isCancelled = ref.rewards.length > 0 && ref.rewards[0].statuses && ref.rewards[0].statuses.indexOf(\"CANCELLED\") > -1;\n+\n+          if (ref.rewards.length === 1 && isCancelled) return;\n+\n+          // Removes cancelled rewards from rewards array so that multiple rewards don't show cancelled amoungst them\n+          const moreThanOneReward = ref.rewards.length > 1;","path":"packages/vanilla-components/src/components/referral-list/referral-list.tsx","position":11,"original_position":11,"commit_id":"f94e50f3241bddc7db8bab68d8895465b8f1e056","original_commit_id":"f94e50f3241bddc7db8bab68d8895465b8f1e056","user":{"login":"jorgecgll","id":15037357,"node_id":"MDQ6VXNlcjE1MDM3MzU3","avatar_url":"https://avatars3.githubusercontent.com/u/15037357?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgecgll","html_url":"https://github.com/jorgecgll","followers_url":"https://api.github.com/users/jorgecgll/followers","following_url":"https://api.github.com/users/jorgecgll/following{/other_user}","gists_url":"https://api.github.com/users/jorgecgll/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgecgll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgecgll/subscriptions","organizations_url":"https://api.github.com/users/jorgecgll/orgs","repos_url":"https://api.github.com/users/jorgecgll/repos","events_url":"https://api.github.com/users/jorgecgll/events{/privacy}","received_events_url":"https://api.github.com/users/jorgecgll/received_events","type":"User","site_admin":false},"body":"you could remove this variable, and use `ref.rewards.length > 1` in the if statement.","created_at":"2018-10-30T15:21:01Z","updated_at":"2018-10-30T15:31:20Z","html_url":"https://github.com/saasquatch/program-tools/pull/22#discussion_r229352953","pull_request_url":"https://api.github.com/repos/saasquatch/program-tools/pulls/22","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/saasquatch/program-tools/pulls/comments/229352953"},"html":{"href":"https://github.com/saasquatch/program-tools/pull/22#discussion_r229352953"},"pull_request":{"href":"https://api.github.com/repos/saasquatch/program-tools/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/saasquatch/program-tools/pulls/22","id":226965473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTY1NDcz","html_url":"https://github.com/saasquatch/program-tools/pull/22","diff_url":"https://github.com/saasquatch/program-tools/pull/22.diff","patch_url":"https://github.com/saasquatch/program-tools/pull/22.patch","issue_url":"https://api.github.com/repos/saasquatch/program-tools/issues/22","number":22,"state":"open","locked":false,"title":"Craig","user":{"login":"jorgecgll","id":15037357,"node_id":"MDQ6VXNlcjE1MDM3MzU3","avatar_url":"https://avatars3.githubusercontent.com/u/15037357?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgecgll","html_url":"https://github.com/jorgecgll","followers_url":"https://api.github.com/users/jorgecgll/followers","following_url":"https://api.github.com/users/jorgecgll/following{/other_user}","gists_url":"https://api.github.com/users/jorgecgll/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgecgll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgecgll/subscriptions","organizations_url":"https://api.github.com/users/jorgecgll/orgs","repos_url":"https://api.github.com/users/jorgecgll/repos","events_url":"https://api.github.com/users/jorgecgll/events{/privacy}","received_events_url":"https://api.github.com/users/jorgecgll/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-30T15:18:31Z","updated_at":"2018-10-30T15:31:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e5873d97cb871c4af78158db8ea8e94f371fea6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/saasquatch/program-tools/pulls/22/commits","review_comments_url":"https://api.github.com/repos/saasquatch/program-tools/pulls/22/comments","review_comment_url":"https://api.github.com/repos/saasquatch/program-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saasquatch/program-tools/issues/22/comments","statuses_url":"https://api.github.com/repos/saasquatch/program-tools/statuses/f94e50f3241bddc7db8bab68d8895465b8f1e056","head":{"label":"saasquatch:craig","ref":"craig","sha":"f94e50f3241bddc7db8bab68d8895465b8f1e056","user":{"login":"saasquatch","id":4130881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMzA4ODE=","avatar_url":"https://avatars0.githubusercontent.com/u/4130881?v=4","gravatar_id":"","url":"https://api.github.com/users/saasquatch","html_url":"https://github.com/saasquatch","followers_url":"https://api.github.com/users/saasquatch/followers","following_url":"https://api.github.com/users/saasquatch/following{/other_user}","gists_url":"https://api.github.com/users/saasquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/saasquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saasquatch/subscriptions","organizations_url":"https://api.github.com/users/saasquatch/orgs","repos_url":"https://api.github.com/users/saasquatch/repos","events_url":"https://api.github.com/users/saasquatch/events{/privacy}","received_events_url":"https://api.github.com/users/saasquatch/received_events","type":"Organization","site_admin":false},"repo":{"id":114404382,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ0MDQzODI=","name":"program-tools","full_name":"saasquatch/program-tools","private":false,"owner":{"login":"saasquatch","id":4130881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMzA4ODE=","avatar_url":"https://avatars0.githubusercontent.com/u/4130881?v=4","gravatar_id":"","url":"https://api.github.com/users/saasquatch","html_url":"https://github.com/saasquatch","followers_url":"https://api.github.com/users/saasquatch/followers","following_url":"https://api.github.com/users/saasquatch/following{/other_user}","gists_url":"https://api.github.com/users/saasquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/saasquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saasquatch/subscriptions","organizations_url":"https://api.github.com/users/saasquatch/orgs","repos_url":"https://api.github.com/users/saasquatch/repos","events_url":"https://api.github.com/users/saasquatch/events{/privacy}","received_events_url":"https://api.github.com/users/saasquatch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/saasquatch/program-tools","description":"Collection of tools and examples to help create program templates for the SaaSquatch platform","fork":false,"url":"https://api.github.com/repos/saasquatch/program-tools","forks_url":"https://api.github.com/repos/saasquatch/program-tools/forks","keys_url":"https://api.github.com/repos/saasquatch/program-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saasquatch/program-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saasquatch/program-tools/teams","hooks_url":"https://api.github.com/repos/saasquatch/program-tools/hooks","issue_events_url":"https://api.github.com/repos/saasquatch/program-tools/issues/events{/number}","events_url":"https://api.github.com/repos/saasquatch/program-tools/events","assignees_url":"https://api.github.com/repos/saasquatch/program-tools/assignees{/user}","branches_url":"https://api.github.com/repos/saasquatch/program-tools/branches{/branch}","tags_url":"https://api.github.com/repos/saasquatch/program-tools/tags","blobs_url":"https://api.github.com/repos/saasquatch/program-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saasquatch/program-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saasquatch/program-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/saasquatch/program-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saasquatch/program-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/saasquatch/program-tools/languages","stargazers_url":"https://api.github.com/repos/saasquatch/program-tools/stargazers","contributors_url":"https://api.github.com/repos/saasquatch/program-tools/contributors","subscribers_url":"https://api.github.com/repos/saasquatch/program-tools/subscribers","subscription_url":"https://api.github.com/repos/saasquatch/program-tools/subscription","commits_url":"https://api.github.com/repos/saasquatch/program-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/saasquatch/program-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/saasquatch/program-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/saasquatch/program-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/saasquatch/program-tools/contents/{+path}","compare_url":"https://api.github.com/repos/saasquatch/program-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saasquatch/program-tools/merges","archive_url":"https://api.github.com/repos/saasquatch/program-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saasquatch/program-tools/downloads","issues_url":"https://api.github.com/repos/saasquatch/program-tools/issues{/number}","pulls_url":"https://api.github.com/repos/saasquatch/program-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/saasquatch/program-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/saasquatch/program-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saasquatch/program-tools/labels{/name}","releases_url":"https://api.github.com/repos/saasquatch/program-tools/releases{/id}","deployments_url":"https://api.github.com/repos/saasquatch/program-tools/deployments","created_at":"2017-12-15T19:24:52Z","updated_at":"2018-10-26T16:42:38Z","pushed_at":"2018-10-30T15:18:32Z","git_url":"git://github.com/saasquatch/program-tools.git","ssh_url":"git@github.com:saasquatch/program-tools.git","clone_url":"https://github.com/saasquatch/program-tools.git","svn_url":"https://github.com/saasquatch/program-tools","homepage":null,"size":1795,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":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":"saasquatch:master","ref":"master","sha":"3565325e78b9ffd30a242b4f9dc0780c5a73543a","user":{"login":"saasquatch","id":4130881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMzA4ODE=","avatar_url":"https://avatars0.githubusercontent.com/u/4130881?v=4","gravatar_id":"","url":"https://api.github.com/users/saasquatch","html_url":"https://github.com/saasquatch","followers_url":"https://api.github.com/users/saasquatch/followers","following_url":"https://api.github.com/users/saasquatch/following{/other_user}","gists_url":"https://api.github.com/users/saasquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/saasquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saasquatch/subscriptions","organizations_url":"https://api.github.com/users/saasquatch/orgs","repos_url":"https://api.github.com/users/saasquatch/repos","events_url":"https://api.github.com/users/saasquatch/events{/privacy}","received_events_url":"https://api.github.com/users/saasquatch/received_events","type":"Organization","site_admin":false},"repo":{"id":114404382,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ0MDQzODI=","name":"program-tools","full_name":"saasquatch/program-tools","private":false,"owner":{"login":"saasquatch","id":4130881,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMzA4ODE=","avatar_url":"https://avatars0.githubusercontent.com/u/4130881?v=4","gravatar_id":"","url":"https://api.github.com/users/saasquatch","html_url":"https://github.com/saasquatch","followers_url":"https://api.github.com/users/saasquatch/followers","following_url":"https://api.github.com/users/saasquatch/following{/other_user}","gists_url":"https://api.github.com/users/saasquatch/gists{/gist_id}","starred_url":"https://api.github.com/users/saasquatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saasquatch/subscriptions","organizations_url":"https://api.github.com/users/saasquatch/orgs","repos_url":"https://api.github.com/users/saasquatch/repos","events_url":"https://api.github.com/users/saasquatch/events{/privacy}","received_events_url":"https://api.github.com/users/saasquatch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/saasquatch/program-tools","description":"Collection of tools and examples to help create program templates for the SaaSquatch platform","fork":false,"url":"https://api.github.com/repos/saasquatch/program-tools","forks_url":"https://api.github.com/repos/saasquatch/program-tools/forks","keys_url":"https://api.github.com/repos/saasquatch/program-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saasquatch/program-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saasquatch/program-tools/teams","hooks_url":"https://api.github.com/repos/saasquatch/program-tools/hooks","issue_events_url":"https://api.github.com/repos/saasquatch/program-tools/issues/events{/number}","events_url":"https://api.github.com/repos/saasquatch/program-tools/events","assignees_url":"https://api.github.com/repos/saasquatch/program-tools/assignees{/user}","branches_url":"https://api.github.com/repos/saasquatch/program-tools/branches{/branch}","tags_url":"https://api.github.com/repos/saasquatch/program-tools/tags","blobs_url":"https://api.github.com/repos/saasquatch/program-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saasquatch/program-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saasquatch/program-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/saasquatch/program-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saasquatch/program-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/saasquatch/program-tools/languages","stargazers_url":"https://api.github.com/repos/saasquatch/program-tools/stargazers","contributors_url":"https://api.github.com/repos/saasquatch/program-tools/contributors","subscribers_url":"https://api.github.com/repos/saasquatch/program-tools/subscribers","subscription_url":"https://api.github.com/repos/saasquatch/program-tools/subscription","commits_url":"https://api.github.com/repos/saasquatch/program-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/saasquatch/program-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/saasquatch/program-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/saasquatch/program-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/saasquatch/program-tools/contents/{+path}","compare_url":"https://api.github.com/repos/saasquatch/program-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saasquatch/program-tools/merges","archive_url":"https://api.github.com/repos/saasquatch/program-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saasquatch/program-tools/downloads","issues_url":"https://api.github.com/repos/saasquatch/program-tools/issues{/number}","pulls_url":"https://api.github.com/repos/saasquatch/program-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/saasquatch/program-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/saasquatch/program-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saasquatch/program-tools/labels{/name}","releases_url":"https://api.github.com/repos/saasquatch/program-tools/releases{/id}","deployments_url":"https://api.github.com/repos/saasquatch/program-tools/deployments","created_at":"2017-12-15T19:24:52Z","updated_at":"2018-10-26T16:42:38Z","pushed_at":"2018-10-30T15:18:32Z","git_url":"git://github.com/saasquatch/program-tools.git","ssh_url":"git@github.com:saasquatch/program-tools.git","clone_url":"https://github.com/saasquatch/program-tools.git","svn_url":"https://github.com/saasquatch/program-tools","homepage":null,"size":1795,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":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/saasquatch/program-tools/pulls/22"},"html":{"href":"https://github.com/saasquatch/program-tools/pull/22"},"issue":{"href":"https://api.github.com/repos/saasquatch/program-tools/issues/22"},"comments":{"href":"https://api.github.com/repos/saasquatch/program-tools/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/saasquatch/program-tools/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/saasquatch/program-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saasquatch/program-tools/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/saasquatch/program-tools/statuses/f94e50f3241bddc7db8bab68d8895465b8f1e056"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jorgecgll"}}