{"action":"created","comment":{"url":"https://api.github.com/repos/peterbe/minimalcss/pulls/comments/147265486","pull_request_review_id":72339010,"id":147265486,"diff_hunk":"@@ -242,6 +243,27 @@ const minimalcss = async options => {\n         .map(cssUrl => {\n           const obj = cleaned[cssUrl]\n           const cleanedAst = csstree.fromPlainObject(obj)\n+          csstree.walk(obj, function(node) {\n+            if (node.type === 'Url') {\n+              var value = node.value;\n+              let path\n+              if (value.type === 'Raw') {\n+                path = value.value;\n+              } else {\n+                path = value.value.substr(1, value.value.length - 2);\n+              }\n+              const absolute = /^https?:\\/\\/|^\\/\\//i\n+              const root = /^\\//\n+              if (absolute.test(path)) {\n+                // do nothing\n+              } else if (root.test(path) /* && css path is the same domain as html document */) {","path":"src/run.js","position":34,"original_position":34,"commit_id":"2a5b5086a692091cd0b1c0b890d7d96dc8e45e60","original_commit_id":"2a5b5086a692091cd0b1c0b890d7d96dc8e45e60","user":{"login":"stereobooster","id":179534,"avatar_url":"https://avatars2.githubusercontent.com/u/179534?v=4","gravatar_id":"","url":"https://api.github.com/users/stereobooster","html_url":"https://github.com/stereobooster","followers_url":"https://api.github.com/users/stereobooster/followers","following_url":"https://api.github.com/users/stereobooster/following{/other_user}","gists_url":"https://api.github.com/users/stereobooster/gists{/gist_id}","starred_url":"https://api.github.com/users/stereobooster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereobooster/subscriptions","organizations_url":"https://api.github.com/users/stereobooster/orgs","repos_url":"https://api.github.com/users/stereobooster/repos","events_url":"https://api.github.com/users/stereobooster/events{/privacy}","received_events_url":"https://api.github.com/users/stereobooster/received_events","type":"User","site_admin":false},"body":"not sure how to handle this. WDYT?","created_at":"2017-10-26T20:59:17Z","updated_at":"2017-10-26T20:59:17Z","html_url":"https://github.com/peterbe/minimalcss/pull/28#discussion_r147265486","pull_request_url":"https://api.github.com/repos/peterbe/minimalcss/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/comments/147265486"},"html":{"href":"https://github.com/peterbe/minimalcss/pull/28#discussion_r147265486"},"pull_request":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/28"}},"in_reply_to_id":147017918},"pull_request":{"url":"https://api.github.com/repos/peterbe/minimalcss/pulls/28","id":148808787,"html_url":"https://github.com/peterbe/minimalcss/pull/28","diff_url":"https://github.com/peterbe/minimalcss/pull/28.diff","patch_url":"https://github.com/peterbe/minimalcss/pull/28.patch","issue_url":"https://api.github.com/repos/peterbe/minimalcss/issues/28","number":28,"state":"open","locked":false,"title":"Resolve CSS URLs fix for #12","user":{"login":"stereobooster","id":179534,"avatar_url":"https://avatars2.githubusercontent.com/u/179534?v=4","gravatar_id":"","url":"https://api.github.com/users/stereobooster","html_url":"https://github.com/stereobooster","followers_url":"https://api.github.com/users/stereobooster/followers","following_url":"https://api.github.com/users/stereobooster/following{/other_user}","gists_url":"https://api.github.com/users/stereobooster/gists{/gist_id}","starred_url":"https://api.github.com/users/stereobooster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereobooster/subscriptions","organizations_url":"https://api.github.com/users/stereobooster/orgs","repos_url":"https://api.github.com/users/stereobooster/repos","events_url":"https://api.github.com/users/stereobooster/events{/privacy}","received_events_url":"https://api.github.com/users/stereobooster/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-25T23:57:16Z","updated_at":"2017-10-26T20:59:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25248ab8597c29eec349ecbea9838be0487bf079","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/peterbe/minimalcss/pulls/28/commits","review_comments_url":"https://api.github.com/repos/peterbe/minimalcss/pulls/28/comments","review_comment_url":"https://api.github.com/repos/peterbe/minimalcss/pulls/comments{/number}","comments_url":"https://api.github.com/repos/peterbe/minimalcss/issues/28/comments","statuses_url":"https://api.github.com/repos/peterbe/minimalcss/statuses/2a5b5086a692091cd0b1c0b890d7d96dc8e45e60","head":{"label":"stereobooster:fix-css-relative-path","ref":"fix-css-relative-path","sha":"2a5b5086a692091cd0b1c0b890d7d96dc8e45e60","user":{"login":"stereobooster","id":179534,"avatar_url":"https://avatars2.githubusercontent.com/u/179534?v=4","gravatar_id":"","url":"https://api.github.com/users/stereobooster","html_url":"https://github.com/stereobooster","followers_url":"https://api.github.com/users/stereobooster/followers","following_url":"https://api.github.com/users/stereobooster/following{/other_user}","gists_url":"https://api.github.com/users/stereobooster/gists{/gist_id}","starred_url":"https://api.github.com/users/stereobooster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereobooster/subscriptions","organizations_url":"https://api.github.com/users/stereobooster/orgs","repos_url":"https://api.github.com/users/stereobooster/repos","events_url":"https://api.github.com/users/stereobooster/events{/privacy}","received_events_url":"https://api.github.com/users/stereobooster/received_events","type":"User","site_admin":false},"repo":{"id":107601537,"name":"minimalcss","full_name":"stereobooster/minimalcss","owner":{"login":"stereobooster","id":179534,"avatar_url":"https://avatars2.githubusercontent.com/u/179534?v=4","gravatar_id":"","url":"https://api.github.com/users/stereobooster","html_url":"https://github.com/stereobooster","followers_url":"https://api.github.com/users/stereobooster/followers","following_url":"https://api.github.com/users/stereobooster/following{/other_user}","gists_url":"https://api.github.com/users/stereobooster/gists{/gist_id}","starred_url":"https://api.github.com/users/stereobooster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereobooster/subscriptions","organizations_url":"https://api.github.com/users/stereobooster/orgs","repos_url":"https://api.github.com/users/stereobooster/repos","events_url":"https://api.github.com/users/stereobooster/events{/privacy}","received_events_url":"https://api.github.com/users/stereobooster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stereobooster/minimalcss","description":"Extract the minimal CSS used in a set of URLs with puppeteer","fork":true,"url":"https://api.github.com/repos/stereobooster/minimalcss","forks_url":"https://api.github.com/repos/stereobooster/minimalcss/forks","keys_url":"https://api.github.com/repos/stereobooster/minimalcss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stereobooster/minimalcss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stereobooster/minimalcss/teams","hooks_url":"https://api.github.com/repos/stereobooster/minimalcss/hooks","issue_events_url":"https://api.github.com/repos/stereobooster/minimalcss/issues/events{/number}","events_url":"https://api.github.com/repos/stereobooster/minimalcss/events","assignees_url":"https://api.github.com/repos/stereobooster/minimalcss/assignees{/user}","branches_url":"https://api.github.com/repos/stereobooster/minimalcss/branches{/branch}","tags_url":"https://api.github.com/repos/stereobooster/minimalcss/tags","blobs_url":"https://api.github.com/repos/stereobooster/minimalcss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stereobooster/minimalcss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stereobooster/minimalcss/git/refs{/sha}","trees_url":"https://api.github.com/repos/stereobooster/minimalcss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stereobooster/minimalcss/statuses/{sha}","languages_url":"https://api.github.com/repos/stereobooster/minimalcss/languages","stargazers_url":"https://api.github.com/repos/stereobooster/minimalcss/stargazers","contributors_url":"https://api.github.com/repos/stereobooster/minimalcss/contributors","subscribers_url":"https://api.github.com/repos/stereobooster/minimalcss/subscribers","subscription_url":"https://api.github.com/repos/stereobooster/minimalcss/subscription","commits_url":"https://api.github.com/repos/stereobooster/minimalcss/commits{/sha}","git_commits_url":"https://api.github.com/repos/stereobooster/minimalcss/git/commits{/sha}","comments_url":"https://api.github.com/repos/stereobooster/minimalcss/comments{/number}","issue_comment_url":"https://api.github.com/repos/stereobooster/minimalcss/issues/comments{/number}","contents_url":"https://api.github.com/repos/stereobooster/minimalcss/contents/{+path}","compare_url":"https://api.github.com/repos/stereobooster/minimalcss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stereobooster/minimalcss/merges","archive_url":"https://api.github.com/repos/stereobooster/minimalcss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stereobooster/minimalcss/downloads","issues_url":"https://api.github.com/repos/stereobooster/minimalcss/issues{/number}","pulls_url":"https://api.github.com/repos/stereobooster/minimalcss/pulls{/number}","milestones_url":"https://api.github.com/repos/stereobooster/minimalcss/milestones{/number}","notifications_url":"https://api.github.com/repos/stereobooster/minimalcss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stereobooster/minimalcss/labels{/name}","releases_url":"https://api.github.com/repos/stereobooster/minimalcss/releases{/id}","deployments_url":"https://api.github.com/repos/stereobooster/minimalcss/deployments","created_at":"2017-10-19T21:39:09Z","updated_at":"2017-10-19T21:39:12Z","pushed_at":"2017-10-26T16:20:58Z","git_url":"git://github.com/stereobooster/minimalcss.git","ssh_url":"git@github.com:stereobooster/minimalcss.git","clone_url":"https://github.com/stereobooster/minimalcss.git","svn_url":"https://github.com/stereobooster/minimalcss","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"peterbe:master","ref":"master","sha":"0aecdbb7960724e569894b5faca6e8544bbb7d3f","user":{"login":"peterbe","id":26739,"avatar_url":"https://avatars2.githubusercontent.com/u/26739?v=4","gravatar_id":"","url":"https://api.github.com/users/peterbe","html_url":"https://github.com/peterbe","followers_url":"https://api.github.com/users/peterbe/followers","following_url":"https://api.github.com/users/peterbe/following{/other_user}","gists_url":"https://api.github.com/users/peterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbe/subscriptions","organizations_url":"https://api.github.com/users/peterbe/orgs","repos_url":"https://api.github.com/users/peterbe/repos","events_url":"https://api.github.com/users/peterbe/events{/privacy}","received_events_url":"https://api.github.com/users/peterbe/received_events","type":"User","site_admin":false},"repo":{"id":101454232,"name":"minimalcss","full_name":"peterbe/minimalcss","owner":{"login":"peterbe","id":26739,"avatar_url":"https://avatars2.githubusercontent.com/u/26739?v=4","gravatar_id":"","url":"https://api.github.com/users/peterbe","html_url":"https://github.com/peterbe","followers_url":"https://api.github.com/users/peterbe/followers","following_url":"https://api.github.com/users/peterbe/following{/other_user}","gists_url":"https://api.github.com/users/peterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbe/subscriptions","organizations_url":"https://api.github.com/users/peterbe/orgs","repos_url":"https://api.github.com/users/peterbe/repos","events_url":"https://api.github.com/users/peterbe/events{/privacy}","received_events_url":"https://api.github.com/users/peterbe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/peterbe/minimalcss","description":"Extract the minimal CSS used in a set of URLs with puppeteer","fork":false,"url":"https://api.github.com/repos/peterbe/minimalcss","forks_url":"https://api.github.com/repos/peterbe/minimalcss/forks","keys_url":"https://api.github.com/repos/peterbe/minimalcss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peterbe/minimalcss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peterbe/minimalcss/teams","hooks_url":"https://api.github.com/repos/peterbe/minimalcss/hooks","issue_events_url":"https://api.github.com/repos/peterbe/minimalcss/issues/events{/number}","events_url":"https://api.github.com/repos/peterbe/minimalcss/events","assignees_url":"https://api.github.com/repos/peterbe/minimalcss/assignees{/user}","branches_url":"https://api.github.com/repos/peterbe/minimalcss/branches{/branch}","tags_url":"https://api.github.com/repos/peterbe/minimalcss/tags","blobs_url":"https://api.github.com/repos/peterbe/minimalcss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peterbe/minimalcss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peterbe/minimalcss/git/refs{/sha}","trees_url":"https://api.github.com/repos/peterbe/minimalcss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peterbe/minimalcss/statuses/{sha}","languages_url":"https://api.github.com/repos/peterbe/minimalcss/languages","stargazers_url":"https://api.github.com/repos/peterbe/minimalcss/stargazers","contributors_url":"https://api.github.com/repos/peterbe/minimalcss/contributors","subscribers_url":"https://api.github.com/repos/peterbe/minimalcss/subscribers","subscription_url":"https://api.github.com/repos/peterbe/minimalcss/subscription","commits_url":"https://api.github.com/repos/peterbe/minimalcss/commits{/sha}","git_commits_url":"https://api.github.com/repos/peterbe/minimalcss/git/commits{/sha}","comments_url":"https://api.github.com/repos/peterbe/minimalcss/comments{/number}","issue_comment_url":"https://api.github.com/repos/peterbe/minimalcss/issues/comments{/number}","contents_url":"https://api.github.com/repos/peterbe/minimalcss/contents/{+path}","compare_url":"https://api.github.com/repos/peterbe/minimalcss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peterbe/minimalcss/merges","archive_url":"https://api.github.com/repos/peterbe/minimalcss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peterbe/minimalcss/downloads","issues_url":"https://api.github.com/repos/peterbe/minimalcss/issues{/number}","pulls_url":"https://api.github.com/repos/peterbe/minimalcss/pulls{/number}","milestones_url":"https://api.github.com/repos/peterbe/minimalcss/milestones{/number}","notifications_url":"https://api.github.com/repos/peterbe/minimalcss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peterbe/minimalcss/labels{/name}","releases_url":"https://api.github.com/repos/peterbe/minimalcss/releases{/id}","deployments_url":"https://api.github.com/repos/peterbe/minimalcss/deployments","created_at":"2017-08-26T01:31:53Z","updated_at":"2017-10-26T12:33:01Z","pushed_at":"2017-10-26T20:52:47Z","git_url":"git://github.com/peterbe/minimalcss.git","ssh_url":"git@github.com:peterbe/minimalcss.git","clone_url":"https://github.com/peterbe/minimalcss.git","svn_url":"https://github.com/peterbe/minimalcss","homepage":null,"size":129,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":17,"forks":1,"open_issues":17,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/28"},"html":{"href":"https://github.com/peterbe/minimalcss/pull/28"},"issue":{"href":"https://api.github.com/repos/peterbe/minimalcss/issues/28"},"comments":{"href":"https://api.github.com/repos/peterbe/minimalcss/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/peterbe/minimalcss/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/peterbe/minimalcss/statuses/2a5b5086a692091cd0b1c0b890d7d96dc8e45e60"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stereobooster"}}