{"action":"created","comment":{"url":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments/207865614","pull_request_review_id":143560457,"id":207865614,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzg2NTYxNA==","diff_hunk":"@@ -123,6 +371,27 @@ public function serve_request( $scope ) {\n \t\techo $this->output; // phpcs:ignore WordPress.XSS.EscapeOutput, WordPress.Security.EscapeOutput\n \t}\n \n+\t/**\n+\t * Add logic for routes caching to the request output.\n+\t *\n+\t * @todo Handle conflicts between routes.","path":"wp-includes/class-wp-service-workers.php","position":null,"original_position":294,"commit_id":"fc751ade64550daa3b551e2d1b02cdfc02e85e60","original_commit_id":"10f21034e7b4cb4cd9050c5ab3fc468d89bf886e","user":{"login":"miina","id":3294597,"node_id":"MDQ6VXNlcjMyOTQ1OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3294597?v=4","gravatar_id":"","url":"https://api.github.com/users/miina","html_url":"https://github.com/miina","followers_url":"https://api.github.com/users/miina/followers","following_url":"https://api.github.com/users/miina/following{/other_user}","gists_url":"https://api.github.com/users/miina/gists{/gist_id}","starred_url":"https://api.github.com/users/miina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miina/subscriptions","organizations_url":"https://api.github.com/users/miina/orgs","repos_url":"https://api.github.com/users/miina/repos","events_url":"https://api.github.com/users/miina/events{/privacy}","received_events_url":"https://api.github.com/users/miina/received_events","type":"User","site_admin":false},"body":"Note: added custom router initial implementation within fc751ad.","created_at":"2018-08-06T11:58:17Z","updated_at":"2018-08-06T11:58:17Z","html_url":"https://github.com/xwp/pwa-wp/pull/43#discussion_r207865614","pull_request_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/43","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments/207865614"},"html":{"href":"https://github.com/xwp/pwa-wp/pull/43#discussion_r207865614"},"pull_request":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/43"}},"in_reply_to_id":207510192},"pull_request":{"url":"https://api.github.com/repos/xwp/pwa-wp/pulls/43","id":205211417,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MjExNDE3","html_url":"https://github.com/xwp/pwa-wp/pull/43","diff_url":"https://github.com/xwp/pwa-wp/pull/43.diff","patch_url":"https://github.com/xwp/pwa-wp/pull/43.patch","issue_url":"https://api.github.com/repos/xwp/pwa-wp/issues/43","number":43,"state":"open","locked":false,"title":"[WIP] Workbox API Prototype","user":{"login":"miina","id":3294597,"node_id":"MDQ6VXNlcjMyOTQ1OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3294597?v=4","gravatar_id":"","url":"https://api.github.com/users/miina","html_url":"https://github.com/miina","followers_url":"https://api.github.com/users/miina/followers","following_url":"https://api.github.com/users/miina/following{/other_user}","gists_url":"https://api.github.com/users/miina/gists{/gist_id}","starred_url":"https://api.github.com/users/miina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miina/subscriptions","organizations_url":"https://api.github.com/users/miina/orgs","repos_url":"https://api.github.com/users/miina/repos","events_url":"https://api.github.com/users/miina/events{/privacy}","received_events_url":"https://api.github.com/users/miina/received_events","type":"User","site_admin":false},"body":"Fixes #5. Start of the prototype for PHP layer on top of Workbox.\r\n\r\nAdds method `register_cached_route` for registering caching strategies. As of this moment the caching strategies are added to the end of the Service Worker file output.\r\n\r\nYou could register a caching strategy like this for example:\r\n\r\n```php\r\nwp_register_route_caching_strategy(\r\n    '/wp-admin/.*\\.css', \r\n    WP_Service_Workers::STRATEGY_STALE_WHILE_REVALIDATE,\r\n    array( 'cache_name' => 'Assets') \r\n);\r\n```\r\n\r\n\r\n\r\n","created_at":"2018-07-31T19:03:55Z","updated_at":"2018-08-06T11:58:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eca6db4ad2c76af7a819181d080503c29da56a03","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/43/commits","review_comments_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/43/comments","review_comment_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/issues/43/comments","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/fc751ade64550daa3b551e2d1b02cdfc02e85e60","head":{"label":"xwp:add/workbox-api-prototype","ref":"add/workbox-api-prototype","sha":"fc751ade64550daa3b551e2d1b02cdfc02e85e60","user":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":134672606,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ2NzI2MDY=","name":"pwa-wp","full_name":"xwp/pwa-wp","owner":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/pwa-wp","description":"WordPress feature plugin to bring Progressive Web Apps (PWA) to Core","fork":false,"url":"https://api.github.com/repos/xwp/pwa-wp","forks_url":"https://api.github.com/repos/xwp/pwa-wp/forks","keys_url":"https://api.github.com/repos/xwp/pwa-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/pwa-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/pwa-wp/teams","hooks_url":"https://api.github.com/repos/xwp/pwa-wp/hooks","issue_events_url":"https://api.github.com/repos/xwp/pwa-wp/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/pwa-wp/events","assignees_url":"https://api.github.com/repos/xwp/pwa-wp/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/pwa-wp/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/pwa-wp/tags","blobs_url":"https://api.github.com/repos/xwp/pwa-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/pwa-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/pwa-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/pwa-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/pwa-wp/languages","stargazers_url":"https://api.github.com/repos/xwp/pwa-wp/stargazers","contributors_url":"https://api.github.com/repos/xwp/pwa-wp/contributors","subscribers_url":"https://api.github.com/repos/xwp/pwa-wp/subscribers","subscription_url":"https://api.github.com/repos/xwp/pwa-wp/subscription","commits_url":"https://api.github.com/repos/xwp/pwa-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/pwa-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/pwa-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/pwa-wp/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/pwa-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/pwa-wp/merges","archive_url":"https://api.github.com/repos/xwp/pwa-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/pwa-wp/downloads","issues_url":"https://api.github.com/repos/xwp/pwa-wp/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/pwa-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/pwa-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/pwa-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/pwa-wp/labels{/name}","releases_url":"https://api.github.com/repos/xwp/pwa-wp/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/pwa-wp/deployments","created_at":"2018-05-24T06:42:09Z","updated_at":"2018-08-06T07:52:14Z","pushed_at":"2018-08-06T11:53:45Z","git_url":"git://github.com/xwp/pwa-wp.git","ssh_url":"git@github.com:xwp/pwa-wp.git","clone_url":"https://github.com/xwp/pwa-wp.git","svn_url":"https://github.com/xwp/pwa-wp","homepage":"https://wordpress.org/plugins/pwa/","size":540,"stargazers_count":125,"watchers_count":125,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":11,"open_issues":20,"watchers":125,"default_branch":"master"}},"base":{"label":"xwp:master","ref":"master","sha":"039ea6402004f73cf714b90eeadf1626e7beb31a","user":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":134672606,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ2NzI2MDY=","name":"pwa-wp","full_name":"xwp/pwa-wp","owner":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/pwa-wp","description":"WordPress feature plugin to bring Progressive Web Apps (PWA) to Core","fork":false,"url":"https://api.github.com/repos/xwp/pwa-wp","forks_url":"https://api.github.com/repos/xwp/pwa-wp/forks","keys_url":"https://api.github.com/repos/xwp/pwa-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/pwa-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/pwa-wp/teams","hooks_url":"https://api.github.com/repos/xwp/pwa-wp/hooks","issue_events_url":"https://api.github.com/repos/xwp/pwa-wp/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/pwa-wp/events","assignees_url":"https://api.github.com/repos/xwp/pwa-wp/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/pwa-wp/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/pwa-wp/tags","blobs_url":"https://api.github.com/repos/xwp/pwa-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/pwa-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/pwa-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/pwa-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/pwa-wp/languages","stargazers_url":"https://api.github.com/repos/xwp/pwa-wp/stargazers","contributors_url":"https://api.github.com/repos/xwp/pwa-wp/contributors","subscribers_url":"https://api.github.com/repos/xwp/pwa-wp/subscribers","subscription_url":"https://api.github.com/repos/xwp/pwa-wp/subscription","commits_url":"https://api.github.com/repos/xwp/pwa-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/pwa-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/pwa-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/pwa-wp/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/pwa-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/pwa-wp/merges","archive_url":"https://api.github.com/repos/xwp/pwa-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/pwa-wp/downloads","issues_url":"https://api.github.com/repos/xwp/pwa-wp/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/pwa-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/pwa-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/pwa-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/pwa-wp/labels{/name}","releases_url":"https://api.github.com/repos/xwp/pwa-wp/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/pwa-wp/deployments","created_at":"2018-05-24T06:42:09Z","updated_at":"2018-08-06T07:52:14Z","pushed_at":"2018-08-06T11:53:45Z","git_url":"git://github.com/xwp/pwa-wp.git","ssh_url":"git@github.com:xwp/pwa-wp.git","clone_url":"https://github.com/xwp/pwa-wp.git","svn_url":"https://github.com/xwp/pwa-wp","homepage":"https://wordpress.org/plugins/pwa/","size":540,"stargazers_count":125,"watchers_count":125,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":11,"open_issues":20,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/43"},"html":{"href":"https://github.com/xwp/pwa-wp/pull/43"},"issue":{"href":"https://api.github.com/repos/xwp/pwa-wp/issues/43"},"comments":{"href":"https://api.github.com/repos/xwp/pwa-wp/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/xwp/pwa-wp/statuses/fc751ade64550daa3b551e2d1b02cdfc02e85e60"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"miina"}}