GitHub PullRequestReviewCommentEvent at 2014-11-01 02:34:06
Repository: metalsmith-html-minifier
Actor: whymarrh
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/comments/19701237","id":19701237,"diff_hunk":"@@ -2,9 +2,9 @@\n \n module.exports = function defaults(obj, src) {\n \tObject.keys(src).forEach(function (key) {\n-\t\tif (!obj[key]) {\n+\t\tif (\"undefined\" == typeof obj[key]) {\n \t\t\tobj[key] = src[key];\n \t\t}\n \t});\n \treturn obj;\n-};\n+};","path":"lib/defaults.js","position":11,"original_position":11,"commit_id":"1f170adc94d42e81002dedcdac067cb54a23a256","original_commit_id":"1f170adc94d42e81002dedcdac067cb54a23a256","user":{"login":"whymarrh","id":1623628,"avatar_url":"https://avatars.githubusercontent.com/u/1623628?v=2","gravatar_id":"","url":"https://api.github.com/users/whymarrh","html_url":"https://github.com/whymarrh","followers_url":"https://api.github.com/users/whymarrh/followers","following_url":"https://api.github.com/users/whymarrh/following{/other_user}","gists_url":"https://api.github.com/users/whymarrh/gists{/gist_id}","starred_url":"https://api.github.com/users/whymarrh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whymarrh/subscriptions","organizations_url":"https://api.github.com/users/whymarrh/orgs","repos_url":"https://api.github.com/users/whymarrh/repos","events_url":"https://api.github.com/users/whymarrh/events{/privacy}","received_events_url":"https://api.github.com/users/whymarrh/received_events","type":"User","site_admin":false},"body":"Can you add the newline back","created_at":"2014-11-01T02:34:06Z","updated_at":"2014-11-01T02:34:06Z","html_url":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2#discussion_r19701237","pull_request_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/comments/19701237"},"html":{"href":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2#discussion_r19701237"},"pull_request":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2","id":23677901,"html_url":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2","diff_url":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2.diff","patch_url":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2.patch","issue_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/2","number":2,"state":"open","locked":false,"title":"Fix defaults override options","user":{"login":"martin-sachse","id":578561,"avatar_url":"https://avatars.githubusercontent.com/u/578561?v=2","gravatar_id":"","url":"https://api.github.com/users/martin-sachse","html_url":"https://github.com/martin-sachse","followers_url":"https://api.github.com/users/martin-sachse/followers","following_url":"https://api.github.com/users/martin-sachse/following{/other_user}","gists_url":"https://api.github.com/users/martin-sachse/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-sachse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-sachse/subscriptions","organizations_url":"https://api.github.com/users/martin-sachse/orgs","repos_url":"https://api.github.com/users/martin-sachse/repos","events_url":"https://api.github.com/users/martin-sachse/events{/privacy}","received_events_url":"https://api.github.com/users/martin-sachse/received_events","type":"User","site_admin":false},"body":"Hello Whymarrh,\r\n\r\nI tried to disable one of the defaults but nothing happened. The merging-function (defaults()) overrides every value explicitly set to false, if a default exists.\r\n\r\nMy fix is to check for an undefined value instead a falsy one.\r\n\r\nRegards,\r\nMartin","created_at":"2014-10-31T14:05:57Z","updated_at":"2014-11-01T02:34:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc01aaf0f7ab0db7c5ad3eb8a0eb4024d7436741","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2/commits","review_comments_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2/comments","review_comment_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/comments/{number}","comments_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/2/comments","statuses_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/statuses/1f170adc94d42e81002dedcdac067cb54a23a256","head":{"label":"martin-sachse:master","ref":"master","sha":"1f170adc94d42e81002dedcdac067cb54a23a256","user":{"login":"martin-sachse","id":578561,"avatar_url":"https://avatars.githubusercontent.com/u/578561?v=2","gravatar_id":"","url":"https://api.github.com/users/martin-sachse","html_url":"https://github.com/martin-sachse","followers_url":"https://api.github.com/users/martin-sachse/followers","following_url":"https://api.github.com/users/martin-sachse/following{/other_user}","gists_url":"https://api.github.com/users/martin-sachse/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-sachse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-sachse/subscriptions","organizations_url":"https://api.github.com/users/martin-sachse/orgs","repos_url":"https://api.github.com/users/martin-sachse/repos","events_url":"https://api.github.com/users/martin-sachse/events{/privacy}","received_events_url":"https://api.github.com/users/martin-sachse/received_events","type":"User","site_admin":false},"repo":{"id":26018101,"name":"metalsmith-html-minifier","full_name":"martin-sachse/metalsmith-html-minifier","owner":{"login":"martin-sachse","id":578561,"avatar_url":"https://avatars.githubusercontent.com/u/578561?v=2","gravatar_id":"","url":"https://api.github.com/users/martin-sachse","html_url":"https://github.com/martin-sachse","followers_url":"https://api.github.com/users/martin-sachse/followers","following_url":"https://api.github.com/users/martin-sachse/following{/other_user}","gists_url":"https://api.github.com/users/martin-sachse/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-sachse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-sachse/subscriptions","organizations_url":"https://api.github.com/users/martin-sachse/orgs","repos_url":"https://api.github.com/users/martin-sachse/repos","events_url":"https://api.github.com/users/martin-sachse/events{/privacy}","received_events_url":"https://api.github.com/users/martin-sachse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martin-sachse/metalsmith-html-minifier","description":"A Metalsmith plug-in to minify HTML files.","fork":true,"url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier","forks_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/forks","keys_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/teams","hooks_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/hooks","issue_events_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/issues/events{/number}","events_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/events","assignees_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/assignees{/user}","branches_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/branches{/branch}","tags_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/tags","blobs_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/statuses/{sha}","languages_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/languages","stargazers_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/stargazers","contributors_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/contributors","subscribers_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/subscribers","subscription_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/subscription","commits_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/issues/comments/{number}","contents_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/contents/{+path}","compare_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/merges","archive_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/downloads","issues_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/issues{/number}","pulls_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/pulls{/number}","milestones_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/milestones{/number}","notifications_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/labels{/name}","releases_url":"https://api.github.com/repos/martin-sachse/metalsmith-html-minifier/releases{/id}","created_at":"2014-10-31T13:53:42Z","updated_at":"2014-10-31T13:55:34Z","pushed_at":"2014-10-31T13:55:34Z","git_url":"git://github.com/martin-sachse/metalsmith-html-minifier.git","ssh_url":"git@github.com:martin-sachse/metalsmith-html-minifier.git","clone_url":"https://github.com/martin-sachse/metalsmith-html-minifier.git","svn_url":"https://github.com/martin-sachse/metalsmith-html-minifier","homepage":null,"size":180,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"whymarrh:master","ref":"master","sha":"5f8b9fb11417a38e3b8a617d455555dbddd158c3","user":{"login":"whymarrh","id":1623628,"avatar_url":"https://avatars.githubusercontent.com/u/1623628?v=2","gravatar_id":"","url":"https://api.github.com/users/whymarrh","html_url":"https://github.com/whymarrh","followers_url":"https://api.github.com/users/whymarrh/followers","following_url":"https://api.github.com/users/whymarrh/following{/other_user}","gists_url":"https://api.github.com/users/whymarrh/gists{/gist_id}","starred_url":"https://api.github.com/users/whymarrh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whymarrh/subscriptions","organizations_url":"https://api.github.com/users/whymarrh/orgs","repos_url":"https://api.github.com/users/whymarrh/repos","events_url":"https://api.github.com/users/whymarrh/events{/privacy}","received_events_url":"https://api.github.com/users/whymarrh/received_events","type":"User","site_admin":false},"repo":{"id":22859542,"name":"metalsmith-html-minifier","full_name":"whymarrh/metalsmith-html-minifier","owner":{"login":"whymarrh","id":1623628,"avatar_url":"https://avatars.githubusercontent.com/u/1623628?v=2","gravatar_id":"","url":"https://api.github.com/users/whymarrh","html_url":"https://github.com/whymarrh","followers_url":"https://api.github.com/users/whymarrh/followers","following_url":"https://api.github.com/users/whymarrh/following{/other_user}","gists_url":"https://api.github.com/users/whymarrh/gists{/gist_id}","starred_url":"https://api.github.com/users/whymarrh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whymarrh/subscriptions","organizations_url":"https://api.github.com/users/whymarrh/orgs","repos_url":"https://api.github.com/users/whymarrh/repos","events_url":"https://api.github.com/users/whymarrh/events{/privacy}","received_events_url":"https://api.github.com/users/whymarrh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whymarrh/metalsmith-html-minifier","description":"A Metalsmith plug-in to minify HTML files.","fork":false,"url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier","forks_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/forks","keys_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/teams","hooks_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/hooks","issue_events_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/events{/number}","events_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/events","assignees_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/assignees{/user}","branches_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/branches{/branch}","tags_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/tags","blobs_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/git/refs{/sha}","trees_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/statuses/{sha}","languages_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/languages","stargazers_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/stargazers","contributors_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/contributors","subscribers_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/subscribers","subscription_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/subscription","commits_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/commits{/sha}","git_commits_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/git/commits{/sha}","comments_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/comments{/number}","issue_comment_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/comments/{number}","contents_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/contents/{+path}","compare_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/merges","archive_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/downloads","issues_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues{/number}","pulls_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls{/number}","milestones_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/milestones{/number}","notifications_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/labels{/name}","releases_url":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/releases{/id}","created_at":"2014-08-12T00:39:24Z","updated_at":"2014-10-26T22:55:39Z","pushed_at":"2014-10-27T23:10:34Z","git_url":"git://github.com/whymarrh/metalsmith-html-minifier.git","ssh_url":"git@github.com:whymarrh/metalsmith-html-minifier.git","clone_url":"https://github.com/whymarrh/metalsmith-html-minifier.git","svn_url":"https://github.com/whymarrh/metalsmith-html-minifier","homepage":null,"size":180,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2"},"html":{"href":"https://github.com/whymarrh/metalsmith-html-minifier/pull/2"},"issue":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/2"},"comments":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/whymarrh/metalsmith-html-minifier/statuses/1f170adc94d42e81002dedcdac067cb54a23a256"}}}}