{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments/100626920","pull_request_review_id":21344926,"id":100626920,"diff_hunk":"@@ -178,6 +178,18 @@ class RequestWrapper {\n   async fetch({request}) {\n     assert.atLeastOne({request});\n \n+    if (this.behaviorCallbacks.requestWillFetch) {\n+      for (let callback of this.behaviorCallbacks.requestWillFetch) {\n+        const returnedRequest = callback({request});\n+        if (returnedRequest && returnedRequest.then) {","path":"packages/sw-runtime-caching/src/lib/request-wrapper.js","position":7,"original_position":7,"commit_id":"c5cc46718fe5f7f980954c77fa38dc4c247b9f37","original_commit_id":"c5cc46718fe5f7f980954c77fa38dc4c247b9f37","user":{"login":"gauntface","id":139760,"avatar_url":"https://avatars.githubusercontent.com/u/139760?v=3","gravatar_id":"","url":"https://api.github.com/users/gauntface","html_url":"https://github.com/gauntface","followers_url":"https://api.github.com/users/gauntface/followers","following_url":"https://api.github.com/users/gauntface/following{/other_user}","gists_url":"https://api.github.com/users/gauntface/gists{/gist_id}","starred_url":"https://api.github.com/users/gauntface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauntface/subscriptions","organizations_url":"https://api.github.com/users/gauntface/orgs","repos_url":"https://api.github.com/users/gauntface/repos","events_url":"https://api.github.com/users/gauntface/events{/privacy}","received_events_url":"https://api.github.com/users/gauntface/received_events","type":"User","site_admin":false},"body":"+1 Jeff's comment and if we role with this please change the check for an explicit Promise rather than a check for the \"then\" parameter","created_at":"2017-02-10T21:22:56Z","updated_at":"2017-02-10T21:22:56Z","html_url":"https://github.com/GoogleChrome/sw-helpers/pull/204#discussion_r100626920","pull_request_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments/100626920"},"html":{"href":"https://github.com/GoogleChrome/sw-helpers/pull/204#discussion_r100626920"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204","id":105569061,"html_url":"https://github.com/GoogleChrome/sw-helpers/pull/204","diff_url":"https://github.com/GoogleChrome/sw-helpers/pull/204.diff","patch_url":"https://github.com/GoogleChrome/sw-helpers/pull/204.patch","issue_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/204","number":204,"state":"open","locked":false,"title":"requestWillFetch event","user":{"login":"prateekbh","id":5960497,"avatar_url":"https://avatars.githubusercontent.com/u/5960497?v=3","gravatar_id":"","url":"https://api.github.com/users/prateekbh","html_url":"https://github.com/prateekbh","followers_url":"https://api.github.com/users/prateekbh/followers","following_url":"https://api.github.com/users/prateekbh/following{/other_user}","gists_url":"https://api.github.com/users/prateekbh/gists{/gist_id}","starred_url":"https://api.github.com/users/prateekbh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateekbh/subscriptions","organizations_url":"https://api.github.com/users/prateekbh/orgs","repos_url":"https://api.github.com/users/prateekbh/repos","events_url":"https://api.github.com/users/prateekbh/events{/privacy}","received_events_url":"https://api.github.com/users/prateekbh/received_events","type":"User","site_admin":false},"body":"R: @jeffposnick @addyosmani @gauntface\r\n\r\nFixes #201\r\n\r\nAdding code to support new event requestWillFetch.\r\nPlugins will be able to make changes to request before they are actually being fetched.\r\n","created_at":"2017-02-10T05:34:23Z","updated_at":"2017-02-10T21:22:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87040cefa1a41f715326e3eca40346d4237ac0e4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/204/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/c5cc46718fe5f7f980954c77fa38dc4c247b9f37","head":{"label":"GoogleChrome:newEvent","ref":"newEvent","sha":"c5cc46718fe5f7f980954c77fa38dc4c247b9f37","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":55424670,"name":"sw-helpers","full_name":"GoogleChrome/sw-helpers","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/sw-helpers","description":"Service Worker helper libraries. ","fork":false,"url":"https://api.github.com/repos/GoogleChrome/sw-helpers","forks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/forks","keys_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/events","assignees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/merges","archive_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/deployments","created_at":"2016-04-04T15:55:19Z","updated_at":"2017-02-09T17:00:51Z","pushed_at":"2017-02-10T18:31:35Z","git_url":"git://github.com/GoogleChrome/sw-helpers.git","ssh_url":"git@github.com:GoogleChrome/sw-helpers.git","clone_url":"https://github.com/GoogleChrome/sw-helpers.git","svn_url":"https://github.com/GoogleChrome/sw-helpers","homepage":"https://googlechrome.github.io/sw-helpers/","size":2135,"stargazers_count":222,"watchers_count":222,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":29,"forks":14,"open_issues":29,"watchers":222,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"debd6918bd1d95ee1957b3a5194a654b47a7ffd0","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":55424670,"name":"sw-helpers","full_name":"GoogleChrome/sw-helpers","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/sw-helpers","description":"Service Worker helper libraries. ","fork":false,"url":"https://api.github.com/repos/GoogleChrome/sw-helpers","forks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/forks","keys_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/events","assignees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/merges","archive_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/sw-helpers/deployments","created_at":"2016-04-04T15:55:19Z","updated_at":"2017-02-09T17:00:51Z","pushed_at":"2017-02-10T18:31:35Z","git_url":"git://github.com/GoogleChrome/sw-helpers.git","ssh_url":"git@github.com:GoogleChrome/sw-helpers.git","clone_url":"https://github.com/GoogleChrome/sw-helpers.git","svn_url":"https://github.com/GoogleChrome/sw-helpers","homepage":"https://googlechrome.github.io/sw-helpers/","size":2135,"stargazers_count":222,"watchers_count":222,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":29,"forks":14,"open_issues":29,"watchers":222,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204"},"html":{"href":"https://github.com/GoogleChrome/sw-helpers/pull/204"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/204"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/issues/204/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/pulls/204/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/sw-helpers/statuses/c5cc46718fe5f7f980954c77fa38dc4c247b9f37"}}}}
{"actor":{"display_login":"gauntface"}}