{"action":"created","comment":{"url":"https://api.github.com/repos/electron/electron/pulls/comments/228763225","pull_request_review_id":169107458,"id":228763225,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODc2MzIyNQ==","diff_hunk":"@@ -897,6 +912,21 @@ describe('protocol module', () => {\n         })\n       })\n     })\n+\n+    it('can access headers', (done) => {\n+      const handler = (request, callback) => {\n+        assert.ok('headers' in request)\n+        done()\n+      }\n+      protocol.interceptHttpProtocol('http', handler, (error) => {","path":"spec/api-protocol-spec.js","position":32,"original_position":32,"commit_id":"742e5d5efa4a48a144bc70a8037a4e22ffd1ca6e","original_commit_id":"742e5d5efa4a48a144bc70a8037a4e22ffd1ca6e","user":{"login":"dsanders11","id":5820654,"node_id":"MDQ6VXNlcjU4MjA2NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5820654?v=4","gravatar_id":"","url":"https://api.github.com/users/dsanders11","html_url":"https://github.com/dsanders11","followers_url":"https://api.github.com/users/dsanders11/followers","following_url":"https://api.github.com/users/dsanders11/following{/other_user}","gists_url":"https://api.github.com/users/dsanders11/gists{/gist_id}","starred_url":"https://api.github.com/users/dsanders11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsanders11/subscriptions","organizations_url":"https://api.github.com/users/dsanders11/orgs","repos_url":"https://api.github.com/users/dsanders11/repos","events_url":"https://api.github.com/users/dsanders11/events{/privacy}","received_events_url":"https://api.github.com/users/dsanders11/received_events","type":"User","site_admin":false},"body":"You're right, it wasn't clear to me at the time I wrote the test that a timeout would occur if `done()` was never invoked, causing the test to fail anyway. I'll make this change.\r\n\r\nHowever, I'd like to point out that this is frustrating when contributing to open source projects like Electron. Projects have style guides and conventions that a casual contributor can't reasonably learn all of before providing a small PR. Matching existing style in a file is important to prevent it from turning into a mess of different styles. I emulated the test directly above this one, and through the file `if (error) return done(error)` is used 44 times, most of them in cases like this where it's not actually necessary. So after making this change you've requested (which is valid and I think a good change), this test will have a different style than the rest. I can't read minds, half the time in a project a PR will require changes for *not* following the existing style, half the time it will require changes for not being as tight as it could be (as in this case).","created_at":"2018-10-28T20:14:11Z","updated_at":"2018-10-28T20:14:12Z","html_url":"https://github.com/electron/electron/pull/15431#discussion_r228763225","pull_request_url":"https://api.github.com/repos/electron/electron/pulls/15431","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/electron/electron/pulls/comments/228763225"},"html":{"href":"https://github.com/electron/electron/pull/15431#discussion_r228763225"},"pull_request":{"href":"https://api.github.com/repos/electron/electron/pulls/15431"}},"in_reply_to_id":228750414},"pull_request":{"url":"https://api.github.com/repos/electron/electron/pulls/15431","id":226324897,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MzI0ODk3","html_url":"https://github.com/electron/electron/pull/15431","diff_url":"https://github.com/electron/electron/pull/15431.diff","patch_url":"https://github.com/electron/electron/pull/15431.patch","issue_url":"https://api.github.com/repos/electron/electron/issues/15431","number":15431,"state":"open","locked":false,"title":"docs: http protocol handlers can access headers","user":{"login":"dsanders11","id":5820654,"node_id":"MDQ6VXNlcjU4MjA2NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5820654?v=4","gravatar_id":"","url":"https://api.github.com/users/dsanders11","html_url":"https://github.com/dsanders11","followers_url":"https://api.github.com/users/dsanders11/followers","following_url":"https://api.github.com/users/dsanders11/following{/other_user}","gists_url":"https://api.github.com/users/dsanders11/gists{/gist_id}","starred_url":"https://api.github.com/users/dsanders11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsanders11/subscriptions","organizations_url":"https://api.github.com/users/dsanders11/orgs","repos_url":"https://api.github.com/users/dsanders11/repos","events_url":"https://api.github.com/users/dsanders11/events{/privacy}","received_events_url":"https://api.github.com/users/dsanders11/received_events","type":"User","site_admin":false},"body":"#### Description of Change\r\n<!--\r\nThank you for your Pull Request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nContributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\nHTTP protocol handlers are provided headers, but this wasn't documented, only that stream protocol handlers got them. Updated documentation and added tests to ensure it stays true.\r\n\r\n#### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] PR description included and stakeholders cc'd\r\n- [x] `npm test` passes\r\n- [x] tests are [changed or added](https://github.com/electron/electron/blob/master/docs/development/testing.md)\r\n- [x] relevant documentation is changed or added\r\n- [x] PR title follows semantic [commit guidelines](https://github.com/electron/electron/blob/master/docs/development/pull-requests.md#commit-message-guidelines)\r\n\r\n\r\n#### Release Notes\r\n<!-- Used to describe release notes for future release versions. Use `no-notes` to indicate no user-facing changes. -->\r\n\r\nNotes: no-notes","created_at":"2018-10-27T21:21:53Z","updated_at":"2018-10-28T20:14:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48e4728f1cba08d2c4d917f7fa9fdcbbae1bd761","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"docs","id":2490622,"node_id":"MDQ6VGVhbTI0OTA2MjI=","slug":"docs","description":"Docs Reviewers","privacy":"closed","url":"https://api.github.com/teams/2490622","members_url":"https://api.github.com/teams/2490622/members{/member}","repositories_url":"https://api.github.com/teams/2490622/repos","permission":"pull"}],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/electron/electron/pulls/15431/commits","review_comments_url":"https://api.github.com/repos/electron/electron/pulls/15431/comments","review_comment_url":"https://api.github.com/repos/electron/electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/electron/electron/issues/15431/comments","statuses_url":"https://api.github.com/repos/electron/electron/statuses/742e5d5efa4a48a144bc70a8037a4e22ffd1ca6e","head":{"label":"dsanders11:protocol-http-headers","ref":"protocol-http-headers","sha":"742e5d5efa4a48a144bc70a8037a4e22ffd1ca6e","user":{"login":"dsanders11","id":5820654,"node_id":"MDQ6VXNlcjU4MjA2NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5820654?v=4","gravatar_id":"","url":"https://api.github.com/users/dsanders11","html_url":"https://github.com/dsanders11","followers_url":"https://api.github.com/users/dsanders11/followers","following_url":"https://api.github.com/users/dsanders11/following{/other_user}","gists_url":"https://api.github.com/users/dsanders11/gists{/gist_id}","starred_url":"https://api.github.com/users/dsanders11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsanders11/subscriptions","organizations_url":"https://api.github.com/users/dsanders11/orgs","repos_url":"https://api.github.com/users/dsanders11/repos","events_url":"https://api.github.com/users/dsanders11/events{/privacy}","received_events_url":"https://api.github.com/users/dsanders11/received_events","type":"User","site_admin":false},"repo":{"id":154995958,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ5OTU5NTg=","name":"electron","full_name":"dsanders11/electron","private":false,"owner":{"login":"dsanders11","id":5820654,"node_id":"MDQ6VXNlcjU4MjA2NTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5820654?v=4","gravatar_id":"","url":"https://api.github.com/users/dsanders11","html_url":"https://github.com/dsanders11","followers_url":"https://api.github.com/users/dsanders11/followers","following_url":"https://api.github.com/users/dsanders11/following{/other_user}","gists_url":"https://api.github.com/users/dsanders11/gists{/gist_id}","starred_url":"https://api.github.com/users/dsanders11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsanders11/subscriptions","organizations_url":"https://api.github.com/users/dsanders11/orgs","repos_url":"https://api.github.com/users/dsanders11/repos","events_url":"https://api.github.com/users/dsanders11/events{/privacy}","received_events_url":"https://api.github.com/users/dsanders11/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dsanders11/electron","description":"Build cross-platform desktop apps with JavaScript, HTML, and CSS","fork":true,"url":"https://api.github.com/repos/dsanders11/electron","forks_url":"https://api.github.com/repos/dsanders11/electron/forks","keys_url":"https://api.github.com/repos/dsanders11/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dsanders11/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dsanders11/electron/teams","hooks_url":"https://api.github.com/repos/dsanders11/electron/hooks","issue_events_url":"https://api.github.com/repos/dsanders11/electron/issues/events{/number}","events_url":"https://api.github.com/repos/dsanders11/electron/events","assignees_url":"https://api.github.com/repos/dsanders11/electron/assignees{/user}","branches_url":"https://api.github.com/repos/dsanders11/electron/branches{/branch}","tags_url":"https://api.github.com/repos/dsanders11/electron/tags","blobs_url":"https://api.github.com/repos/dsanders11/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dsanders11/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dsanders11/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/dsanders11/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dsanders11/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/dsanders11/electron/languages","stargazers_url":"https://api.github.com/repos/dsanders11/electron/stargazers","contributors_url":"https://api.github.com/repos/dsanders11/electron/contributors","subscribers_url":"https://api.github.com/repos/dsanders11/electron/subscribers","subscription_url":"https://api.github.com/repos/dsanders11/electron/subscription","commits_url":"https://api.github.com/repos/dsanders11/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/dsanders11/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/dsanders11/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/dsanders11/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/dsanders11/electron/contents/{+path}","compare_url":"https://api.github.com/repos/dsanders11/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dsanders11/electron/merges","archive_url":"https://api.github.com/repos/dsanders11/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dsanders11/electron/downloads","issues_url":"https://api.github.com/repos/dsanders11/electron/issues{/number}","pulls_url":"https://api.github.com/repos/dsanders11/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/dsanders11/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/dsanders11/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dsanders11/electron/labels{/name}","releases_url":"https://api.github.com/repos/dsanders11/electron/releases{/id}","deployments_url":"https://api.github.com/repos/dsanders11/electron/deployments","created_at":"2018-10-27T18:23:14Z","updated_at":"2018-10-27T18:23:24Z","pushed_at":"2018-10-27T21:51:25Z","git_url":"git://github.com/dsanders11/electron.git","ssh_url":"git@github.com:dsanders11/electron.git","clone_url":"https://github.com/dsanders11/electron.git","svn_url":"https://github.com/dsanders11/electron","homepage":"https://electronjs.org","size":46188,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"electron:master","ref":"master","sha":"f921df7ad19f812c795d2fcbf17b0b8145086085","user":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"node_id":"MDEwOlJlcG9zaXRvcnk5Mzg0MjY3","name":"electron","full_name":"electron/electron","private":false,"owner":{"login":"electron","id":13409222,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDA5MjIy","avatar_url":"https://avatars1.githubusercontent.com/u/13409222?v=4","gravatar_id":"","url":"https://api.github.com/users/electron","html_url":"https://github.com/electron","followers_url":"https://api.github.com/users/electron/followers","following_url":"https://api.github.com/users/electron/following{/other_user}","gists_url":"https://api.github.com/users/electron/gists{/gist_id}","starred_url":"https://api.github.com/users/electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electron/subscriptions","organizations_url":"https://api.github.com/users/electron/orgs","repos_url":"https://api.github.com/users/electron/repos","events_url":"https://api.github.com/users/electron/events{/privacy}","received_events_url":"https://api.github.com/users/electron/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/electron/electron","description":"Build cross-platform desktop apps with JavaScript, HTML, and CSS","fork":false,"url":"https://api.github.com/repos/electron/electron","forks_url":"https://api.github.com/repos/electron/electron/forks","keys_url":"https://api.github.com/repos/electron/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electron/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electron/electron/teams","hooks_url":"https://api.github.com/repos/electron/electron/hooks","issue_events_url":"https://api.github.com/repos/electron/electron/issues/events{/number}","events_url":"https://api.github.com/repos/electron/electron/events","assignees_url":"https://api.github.com/repos/electron/electron/assignees{/user}","branches_url":"https://api.github.com/repos/electron/electron/branches{/branch}","tags_url":"https://api.github.com/repos/electron/electron/tags","blobs_url":"https://api.github.com/repos/electron/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electron/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electron/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/electron/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electron/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/electron/electron/languages","stargazers_url":"https://api.github.com/repos/electron/electron/stargazers","contributors_url":"https://api.github.com/repos/electron/electron/contributors","subscribers_url":"https://api.github.com/repos/electron/electron/subscribers","subscription_url":"https://api.github.com/repos/electron/electron/subscription","commits_url":"https://api.github.com/repos/electron/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/electron/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/electron/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/electron/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/electron/electron/contents/{+path}","compare_url":"https://api.github.com/repos/electron/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electron/electron/merges","archive_url":"https://api.github.com/repos/electron/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electron/electron/downloads","issues_url":"https://api.github.com/repos/electron/electron/issues{/number}","pulls_url":"https://api.github.com/repos/electron/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/electron/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/electron/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electron/electron/labels{/name}","releases_url":"https://api.github.com/repos/electron/electron/releases{/id}","deployments_url":"https://api.github.com/repos/electron/electron/deployments","created_at":"2013-04-12T01:47:36Z","updated_at":"2018-10-28T19:44:54Z","pushed_at":"2018-10-28T17:05:16Z","git_url":"git://github.com/electron/electron.git","ssh_url":"git@github.com:electron/electron.git","clone_url":"https://github.com/electron/electron.git","svn_url":"https://github.com/electron/electron","homepage":"https://electronjs.org","size":46205,"stargazers_count":65965,"watchers_count":65965,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8615,"mirror_url":null,"archived":false,"open_issues_count":1192,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8615,"open_issues":1192,"watchers":65965,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/electron/electron/pulls/15431"},"html":{"href":"https://github.com/electron/electron/pull/15431"},"issue":{"href":"https://api.github.com/repos/electron/electron/issues/15431"},"comments":{"href":"https://api.github.com/repos/electron/electron/issues/15431/comments"},"review_comments":{"href":"https://api.github.com/repos/electron/electron/pulls/15431/comments"},"review_comment":{"href":"https://api.github.com/repos/electron/electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/electron/electron/pulls/15431/commits"},"statuses":{"href":"https://api.github.com/repos/electron/electron/statuses/742e5d5efa4a48a144bc70a8037a4e22ffd1ca6e"}},"author_association":"NONE"}}
{"actor":{"display_login":"dsanders11"}}