{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/186983998","pull_request_review_id":118669215,"id":186983998,"diff_hunk":"@@ -51,15 +51,22 @@ const showAccountDataUpdateWarningMessage = accountDataUpdateWarningLink => {\n     );\n };\n \n-const initMembership = (): void => {\n+const canShow = () => new Promise(_ => _(accountDataUpdateWarning() !== null));\n+\n+const show = () => {\n     const updateLink = accountDataUpdateWarning();","path":"static/src/javascripts/projects/common/modules/navigation/membership.js","position":17,"original_position":17,"commit_id":"1df4d8077ce591627b5b11257e06db7f59696ddf","original_commit_id":"1df4d8077ce591627b5b11257e06db7f59696ddf","user":{"login":"GHaberis","id":1590704,"avatar_url":"https://avatars2.githubusercontent.com/u/1590704?v=4","gravatar_id":"","url":"https://api.github.com/users/GHaberis","html_url":"https://github.com/GHaberis","followers_url":"https://api.github.com/users/GHaberis/followers","following_url":"https://api.github.com/users/GHaberis/following{/other_user}","gists_url":"https://api.github.com/users/GHaberis/gists{/gist_id}","starred_url":"https://api.github.com/users/GHaberis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GHaberis/subscriptions","organizations_url":"https://api.github.com/users/GHaberis/orgs","repos_url":"https://api.github.com/users/GHaberis/repos","events_url":"https://api.github.com/users/GHaberis/events{/privacy}","received_events_url":"https://api.github.com/users/GHaberis/received_events","type":"User","site_admin":false},"body":"You shouldn't need to run this conditional check on `updateLink` in `show` now.\r\n\r\n`show` will only ever be called if `canShow` has resolved with `true`, which will only happen if `accountDataUpdateWarning()` is truthy.","created_at":"2018-05-09T09:28:35Z","updated_at":"2018-05-09T09:28:35Z","html_url":"https://github.com/guardian/frontend/pull/19625#discussion_r186983998","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/19625","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/186983998"},"html":{"href":"https://github.com/guardian/frontend/pull/19625#discussion_r186983998"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/19625"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/19625","id":186693864,"html_url":"https://github.com/guardian/frontend/pull/19625","diff_url":"https://github.com/guardian/frontend/pull/19625.diff","patch_url":"https://github.com/guardian/frontend/pull/19625.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/19625","number":19625,"state":"open","locked":false,"title":"Membership Banner Refactor [against gh-banner-checks]","user":{"login":"AWare","id":2670496,"avatar_url":"https://avatars3.githubusercontent.com/u/2670496?v=4","gravatar_id":"","url":"https://api.github.com/users/AWare","html_url":"https://github.com/AWare","followers_url":"https://api.github.com/users/AWare/followers","following_url":"https://api.github.com/users/AWare/following{/other_user}","gists_url":"https://api.github.com/users/AWare/gists{/gist_id}","starred_url":"https://api.github.com/users/AWare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AWare/subscriptions","organizations_url":"https://api.github.com/users/AWare/orgs","repos_url":"https://api.github.com/users/AWare/repos","events_url":"https://api.github.com/users/AWare/events{/privacy}","received_events_url":"https://api.github.com/users/AWare/received_events","type":"User","site_admin":false},"body":"# a pull request against https://github.com/guardian/frontend/pull/19591\r\n\r\nThis refactors the membership action banner to work with https://github.com/guardian/frontend/pull/19591\r\n","created_at":"2018-05-08T16:50:00Z","updated_at":"2018-05-09T09:28:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7361d6bcc473194dc71aa5ac13bbdc39ec27905","assignee":null,"assignees":[],"requested_reviewers":[{"login":"SiAdcock","id":5931528,"avatar_url":"https://avatars1.githubusercontent.com/u/5931528?v=4","gravatar_id":"","url":"https://api.github.com/users/SiAdcock","html_url":"https://github.com/SiAdcock","followers_url":"https://api.github.com/users/SiAdcock/followers","following_url":"https://api.github.com/users/SiAdcock/following{/other_user}","gists_url":"https://api.github.com/users/SiAdcock/gists{/gist_id}","starred_url":"https://api.github.com/users/SiAdcock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiAdcock/subscriptions","organizations_url":"https://api.github.com/users/SiAdcock/orgs","repos_url":"https://api.github.com/users/SiAdcock/repos","events_url":"https://api.github.com/users/SiAdcock/events{/privacy}","received_events_url":"https://api.github.com/users/SiAdcock/received_events","type":"User","site_admin":false},{"login":"walaura","id":11539094,"avatar_url":"https://avatars1.githubusercontent.com/u/11539094?v=4","gravatar_id":"","url":"https://api.github.com/users/walaura","html_url":"https://github.com/walaura","followers_url":"https://api.github.com/users/walaura/followers","following_url":"https://api.github.com/users/walaura/following{/other_user}","gists_url":"https://api.github.com/users/walaura/gists{/gist_id}","starred_url":"https://api.github.com/users/walaura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walaura/subscriptions","organizations_url":"https://api.github.com/users/walaura/orgs","repos_url":"https://api.github.com/users/walaura/repos","events_url":"https://api.github.com/users/walaura/events{/privacy}","received_events_url":"https://api.github.com/users/walaura/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/19625/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/19625/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/19625/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/1df4d8077ce591627b5b11257e06db7f59696ddf","head":{"label":"guardian:aw-membership-banner","ref":"aw-membership-banner","sha":"1df4d8077ce591627b5b11257e06db7f59696ddf","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2018-05-09T09:23:33Z","pushed_at":"2018-05-09T09:23:30Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"https://www.theguardian.com","size":595044,"stargazers_count":3989,"watchers_count":3989,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":436,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":436,"open_issues":59,"watchers":3989,"default_branch":"master"}},"base":{"label":"guardian:gh-banner-checks","ref":"gh-banner-checks","sha":"6ebc0aaa4382cfc0752edf68569800ce339c7e07","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2018-05-09T09:23:33Z","pushed_at":"2018-05-09T09:23:30Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"https://www.theguardian.com","size":595044,"stargazers_count":3989,"watchers_count":3989,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":436,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":436,"open_issues":59,"watchers":3989,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/19625"},"html":{"href":"https://github.com/guardian/frontend/pull/19625"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/19625"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/19625/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/19625/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/19625/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/1df4d8077ce591627b5b11257e06db7f59696ddf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GHaberis"}}