{"action":"created","comment":{"url":"https://api.github.com/repos/shopgate/pwa/pulls/comments/215229094","pull_request_review_id":152441197,"id":215229094,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTIyOTA5NA==","diff_hunk":"@@ -64,10 +69,30 @@ export default function router(subscribe) {\n       }\n     }\n \n-    // Check for a redirect url and change location if one is found.\n-    const redirect = redirects.get(location);\n+    // Check for a redirect and change location if one is found.\n+    let redirect = redirects.get(location);\n \n     if (redirect) {\n+      // Check if a redirect handler was assigned and execute it.\n+      if (typeof redirect === 'function' || redirect instanceof Promise) {","path":"libraries/common/subscriptions/router.js","position":39,"original_position":39,"commit_id":"03d5da9cec52fb77886efeb27ebc4b18a407f517","original_commit_id":"03d5da9cec52fb77886efeb27ebc4b18a407f517","user":{"login":"devbucket","id":2123279,"node_id":"MDQ6VXNlcjIxMjMyNzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2123279?v=4","gravatar_id":"","url":"https://api.github.com/users/devbucket","html_url":"https://github.com/devbucket","followers_url":"https://api.github.com/users/devbucket/followers","following_url":"https://api.github.com/users/devbucket/following{/other_user}","gists_url":"https://api.github.com/users/devbucket/gists{/gist_id}","starred_url":"https://api.github.com/users/devbucket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devbucket/subscriptions","organizations_url":"https://api.github.com/users/devbucket/orgs","repos_url":"https://api.github.com/users/devbucket/repos","events_url":"https://api.github.com/users/devbucket/events{/privacy}","received_events_url":"https://api.github.com/users/devbucket/received_events","type":"User","site_admin":false},"body":"Please make this a guard clause. We don't wanna have this massive if / else blocks in the code.","created_at":"2018-09-05T11:23:04Z","updated_at":"2018-09-05T11:40:13Z","html_url":"https://github.com/shopgate/pwa/pull/244#discussion_r215229094","pull_request_url":"https://api.github.com/repos/shopgate/pwa/pulls/244","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/comments/215229094"},"html":{"href":"https://github.com/shopgate/pwa/pull/244#discussion_r215229094"},"pull_request":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/244"}}},"pull_request":{"url":"https://api.github.com/repos/shopgate/pwa/pulls/244","id":213186421,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMTg2NDIx","html_url":"https://github.com/shopgate/pwa/pull/244","diff_url":"https://github.com/shopgate/pwa/pull/244.diff","patch_url":"https://github.com/shopgate/pwa/pull/244.patch","issue_url":"https://api.github.com/repos/shopgate/pwa/issues/244","number":244,"state":"open","locked":false,"title":"PWA-875: Implement dynamic redirects","user":{"login":"fkloes","id":13087792,"node_id":"MDQ6VXNlcjEzMDg3Nzky","avatar_url":"https://avatars1.githubusercontent.com/u/13087792?v=4","gravatar_id":"","url":"https://api.github.com/users/fkloes","html_url":"https://github.com/fkloes","followers_url":"https://api.github.com/users/fkloes/followers","following_url":"https://api.github.com/users/fkloes/following{/other_user}","gists_url":"https://api.github.com/users/fkloes/gists{/gist_id}","starred_url":"https://api.github.com/users/fkloes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkloes/subscriptions","organizations_url":"https://api.github.com/users/fkloes/orgs","repos_url":"https://api.github.com/users/fkloes/repos","events_url":"https://api.github.com/users/fkloes/events{/privacy}","received_events_url":"https://api.github.com/users/fkloes/received_events","type":"User","site_admin":false},"body":"- updated the router subscriptions to enable processing of dynamic redirects\r\n- removed some outdated webckeckout related code\r\n- fixed a product selector bug that caused endless loading state for descriptions\r\n- extended tests","created_at":"2018-09-05T06:52:30Z","updated_at":"2018-09-05T11:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4a19d08ffff8faee5dc0bde1c40dfd135a49048","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shopgate/pwa/pulls/244/commits","review_comments_url":"https://api.github.com/repos/shopgate/pwa/pulls/244/comments","review_comment_url":"https://api.github.com/repos/shopgate/pwa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shopgate/pwa/issues/244/comments","statuses_url":"https://api.github.com/repos/shopgate/pwa/statuses/03d5da9cec52fb77886efeb27ebc4b18a407f517","head":{"label":"shopgate:PWA-875-implement-dynamic-redirects","ref":"PWA-875-implement-dynamic-redirects","sha":"03d5da9cec52fb77886efeb27ebc4b18a407f517","user":{"login":"shopgate","id":7113393,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMTMzOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/7113393?v=4","gravatar_id":"","url":"https://api.github.com/users/shopgate","html_url":"https://github.com/shopgate","followers_url":"https://api.github.com/users/shopgate/followers","following_url":"https://api.github.com/users/shopgate/following{/other_user}","gists_url":"https://api.github.com/users/shopgate/gists{/gist_id}","starred_url":"https://api.github.com/users/shopgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopgate/subscriptions","organizations_url":"https://api.github.com/users/shopgate/orgs","repos_url":"https://api.github.com/users/shopgate/repos","events_url":"https://api.github.com/users/shopgate/events{/privacy}","received_events_url":"https://api.github.com/users/shopgate/received_events","type":"Organization","site_admin":false},"repo":{"id":124236996,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyMzY5OTY=","name":"pwa","full_name":"shopgate/pwa","owner":{"login":"shopgate","id":7113393,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMTMzOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/7113393?v=4","gravatar_id":"","url":"https://api.github.com/users/shopgate","html_url":"https://github.com/shopgate","followers_url":"https://api.github.com/users/shopgate/followers","following_url":"https://api.github.com/users/shopgate/following{/other_user}","gists_url":"https://api.github.com/users/shopgate/gists{/gist_id}","starred_url":"https://api.github.com/users/shopgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopgate/subscriptions","organizations_url":"https://api.github.com/users/shopgate/orgs","repos_url":"https://api.github.com/users/shopgate/repos","events_url":"https://api.github.com/users/shopgate/events{/privacy}","received_events_url":"https://api.github.com/users/shopgate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shopgate/pwa","description":"Shopgate Connect PWA library","fork":false,"url":"https://api.github.com/repos/shopgate/pwa","forks_url":"https://api.github.com/repos/shopgate/pwa/forks","keys_url":"https://api.github.com/repos/shopgate/pwa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shopgate/pwa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shopgate/pwa/teams","hooks_url":"https://api.github.com/repos/shopgate/pwa/hooks","issue_events_url":"https://api.github.com/repos/shopgate/pwa/issues/events{/number}","events_url":"https://api.github.com/repos/shopgate/pwa/events","assignees_url":"https://api.github.com/repos/shopgate/pwa/assignees{/user}","branches_url":"https://api.github.com/repos/shopgate/pwa/branches{/branch}","tags_url":"https://api.github.com/repos/shopgate/pwa/tags","blobs_url":"https://api.github.com/repos/shopgate/pwa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shopgate/pwa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shopgate/pwa/git/refs{/sha}","trees_url":"https://api.github.com/repos/shopgate/pwa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shopgate/pwa/statuses/{sha}","languages_url":"https://api.github.com/repos/shopgate/pwa/languages","stargazers_url":"https://api.github.com/repos/shopgate/pwa/stargazers","contributors_url":"https://api.github.com/repos/shopgate/pwa/contributors","subscribers_url":"https://api.github.com/repos/shopgate/pwa/subscribers","subscription_url":"https://api.github.com/repos/shopgate/pwa/subscription","commits_url":"https://api.github.com/repos/shopgate/pwa/commits{/sha}","git_commits_url":"https://api.github.com/repos/shopgate/pwa/git/commits{/sha}","comments_url":"https://api.github.com/repos/shopgate/pwa/comments{/number}","issue_comment_url":"https://api.github.com/repos/shopgate/pwa/issues/comments{/number}","contents_url":"https://api.github.com/repos/shopgate/pwa/contents/{+path}","compare_url":"https://api.github.com/repos/shopgate/pwa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shopgate/pwa/merges","archive_url":"https://api.github.com/repos/shopgate/pwa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shopgate/pwa/downloads","issues_url":"https://api.github.com/repos/shopgate/pwa/issues{/number}","pulls_url":"https://api.github.com/repos/shopgate/pwa/pulls{/number}","milestones_url":"https://api.github.com/repos/shopgate/pwa/milestones{/number}","notifications_url":"https://api.github.com/repos/shopgate/pwa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shopgate/pwa/labels{/name}","releases_url":"https://api.github.com/repos/shopgate/pwa/releases{/id}","deployments_url":"https://api.github.com/repos/shopgate/pwa/deployments","created_at":"2018-03-07T13:04:31Z","updated_at":"2018-09-04T11:05:40Z","pushed_at":"2018-09-05T11:34:04Z","git_url":"git://github.com/shopgate/pwa.git","ssh_url":"git@github.com:shopgate/pwa.git","clone_url":"https://github.com/shopgate/pwa.git","svn_url":"https://github.com/shopgate/pwa","homepage":"https://www.shopgate.com/de/plattform/","size":6206,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":11,"watchers":5,"default_branch":"develop"}},"base":{"label":"shopgate:PWA-327-Exchange-Router","ref":"PWA-327-Exchange-Router","sha":"11b216b4107fcebf2a6b958ea7c2b3050b3b4ec2","user":{"login":"shopgate","id":7113393,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMTMzOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/7113393?v=4","gravatar_id":"","url":"https://api.github.com/users/shopgate","html_url":"https://github.com/shopgate","followers_url":"https://api.github.com/users/shopgate/followers","following_url":"https://api.github.com/users/shopgate/following{/other_user}","gists_url":"https://api.github.com/users/shopgate/gists{/gist_id}","starred_url":"https://api.github.com/users/shopgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopgate/subscriptions","organizations_url":"https://api.github.com/users/shopgate/orgs","repos_url":"https://api.github.com/users/shopgate/repos","events_url":"https://api.github.com/users/shopgate/events{/privacy}","received_events_url":"https://api.github.com/users/shopgate/received_events","type":"Organization","site_admin":false},"repo":{"id":124236996,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQyMzY5OTY=","name":"pwa","full_name":"shopgate/pwa","owner":{"login":"shopgate","id":7113393,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMTMzOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/7113393?v=4","gravatar_id":"","url":"https://api.github.com/users/shopgate","html_url":"https://github.com/shopgate","followers_url":"https://api.github.com/users/shopgate/followers","following_url":"https://api.github.com/users/shopgate/following{/other_user}","gists_url":"https://api.github.com/users/shopgate/gists{/gist_id}","starred_url":"https://api.github.com/users/shopgate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopgate/subscriptions","organizations_url":"https://api.github.com/users/shopgate/orgs","repos_url":"https://api.github.com/users/shopgate/repos","events_url":"https://api.github.com/users/shopgate/events{/privacy}","received_events_url":"https://api.github.com/users/shopgate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shopgate/pwa","description":"Shopgate Connect PWA library","fork":false,"url":"https://api.github.com/repos/shopgate/pwa","forks_url":"https://api.github.com/repos/shopgate/pwa/forks","keys_url":"https://api.github.com/repos/shopgate/pwa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shopgate/pwa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shopgate/pwa/teams","hooks_url":"https://api.github.com/repos/shopgate/pwa/hooks","issue_events_url":"https://api.github.com/repos/shopgate/pwa/issues/events{/number}","events_url":"https://api.github.com/repos/shopgate/pwa/events","assignees_url":"https://api.github.com/repos/shopgate/pwa/assignees{/user}","branches_url":"https://api.github.com/repos/shopgate/pwa/branches{/branch}","tags_url":"https://api.github.com/repos/shopgate/pwa/tags","blobs_url":"https://api.github.com/repos/shopgate/pwa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shopgate/pwa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shopgate/pwa/git/refs{/sha}","trees_url":"https://api.github.com/repos/shopgate/pwa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shopgate/pwa/statuses/{sha}","languages_url":"https://api.github.com/repos/shopgate/pwa/languages","stargazers_url":"https://api.github.com/repos/shopgate/pwa/stargazers","contributors_url":"https://api.github.com/repos/shopgate/pwa/contributors","subscribers_url":"https://api.github.com/repos/shopgate/pwa/subscribers","subscription_url":"https://api.github.com/repos/shopgate/pwa/subscription","commits_url":"https://api.github.com/repos/shopgate/pwa/commits{/sha}","git_commits_url":"https://api.github.com/repos/shopgate/pwa/git/commits{/sha}","comments_url":"https://api.github.com/repos/shopgate/pwa/comments{/number}","issue_comment_url":"https://api.github.com/repos/shopgate/pwa/issues/comments{/number}","contents_url":"https://api.github.com/repos/shopgate/pwa/contents/{+path}","compare_url":"https://api.github.com/repos/shopgate/pwa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shopgate/pwa/merges","archive_url":"https://api.github.com/repos/shopgate/pwa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shopgate/pwa/downloads","issues_url":"https://api.github.com/repos/shopgate/pwa/issues{/number}","pulls_url":"https://api.github.com/repos/shopgate/pwa/pulls{/number}","milestones_url":"https://api.github.com/repos/shopgate/pwa/milestones{/number}","notifications_url":"https://api.github.com/repos/shopgate/pwa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shopgate/pwa/labels{/name}","releases_url":"https://api.github.com/repos/shopgate/pwa/releases{/id}","deployments_url":"https://api.github.com/repos/shopgate/pwa/deployments","created_at":"2018-03-07T13:04:31Z","updated_at":"2018-09-04T11:05:40Z","pushed_at":"2018-09-05T11:34:04Z","git_url":"git://github.com/shopgate/pwa.git","ssh_url":"git@github.com:shopgate/pwa.git","clone_url":"https://github.com/shopgate/pwa.git","svn_url":"https://github.com/shopgate/pwa","homepage":"https://www.shopgate.com/de/plattform/","size":6206,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":11,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/244"},"html":{"href":"https://github.com/shopgate/pwa/pull/244"},"issue":{"href":"https://api.github.com/repos/shopgate/pwa/issues/244"},"comments":{"href":"https://api.github.com/repos/shopgate/pwa/issues/244/comments"},"review_comments":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/244/comments"},"review_comment":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shopgate/pwa/pulls/244/commits"},"statuses":{"href":"https://api.github.com/repos/shopgate/pwa/statuses/03d5da9cec52fb77886efeb27ebc4b18a407f517"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"devbucket"}}