{"action":"created","comment":{"url":"https://api.github.com/repos/jekyll/jekyll/pulls/comments/140842837","pull_request_review_id":64973217,"id":140842837,"diff_hunk":"@@ -100,12 +100,27 @@ def applies?(scope, path, type)\n     def applies_path?(scope, path)\n       return true if !scope.key?(\"path\") || scope[\"path\"].empty?\n \n-      scope_path = Pathname.new(scope[\"path\"])\n-      Pathname.new(sanitize_path(path)).ascend do |ascended_path|\n-        if ascended_path.to_s == scope_path.to_s\n+      sanitized_path = Pathname.new(sanitize_path(path))\n+\n+      site_path = Pathname.new(@site.source)\n+      rel_scope_path = Pathname.new(scope[\"path\"])\n+      abs_scope_path = File.join(@site.source, rel_scope_path)\n+      Dir.glob(abs_scope_path).each do |scope_path|\n+        scope_path = Pathname.new(scope_path).relative_path_from site_path\n+        return true if path_is_subpath?(sanitized_path, scope_path)\n+      end\n+\n+      path_is_subpath?(sanitized_path, rel_scope_path)\n+    end\n+\n+    def path_is_subpath?(path, parent_path)","path":"lib/jekyll/frontmatter_defaults.rb","position":20,"original_position":20,"commit_id":"2c95f38ecdf80f54bf25a63f0c295afcef78368f","original_commit_id":"2c95f38ecdf80f54bf25a63f0c295afcef78368f","user":{"login":"ashmaroli","id":12479464,"avatar_url":"https://avatars0.githubusercontent.com/u/12479464?v=4","gravatar_id":"","url":"https://api.github.com/users/ashmaroli","html_url":"https://github.com/ashmaroli","followers_url":"https://api.github.com/users/ashmaroli/followers","following_url":"https://api.github.com/users/ashmaroli/following{/other_user}","gists_url":"https://api.github.com/users/ashmaroli/gists{/gist_id}","starred_url":"https://api.github.com/users/ashmaroli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashmaroli/subscriptions","organizations_url":"https://api.github.com/users/ashmaroli/orgs","repos_url":"https://api.github.com/users/ashmaroli/repos","events_url":"https://api.github.com/users/ashmaroli/events{/privacy}","received_events_url":"https://api.github.com/users/ashmaroli/received_events","type":"User","site_admin":false},"body":"right.. my bad.. ignore..","created_at":"2017-09-25T17:28:17Z","updated_at":"2017-09-25T17:28:17Z","html_url":"https://github.com/jekyll/jekyll/pull/6268#discussion_r140842837","pull_request_url":"https://api.github.com/repos/jekyll/jekyll/pulls/6268","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/comments/140842837"},"html":{"href":"https://github.com/jekyll/jekyll/pull/6268#discussion_r140842837"},"pull_request":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/6268"}},"in_reply_to_id":140840667},"pull_request":{"url":"https://api.github.com/repos/jekyll/jekyll/pulls/6268","id":134087758,"html_url":"https://github.com/jekyll/jekyll/pull/6268","diff_url":"https://github.com/jekyll/jekyll/pull/6268.diff","patch_url":"https://github.com/jekyll/jekyll/pull/6268.patch","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/6268","number":6268,"state":"open","locked":false,"title":"Scope path glob","user":{"login":"alexey-pelykh","id":345102,"avatar_url":"https://avatars0.githubusercontent.com/u/345102?v=4","gravatar_id":"","url":"https://api.github.com/users/alexey-pelykh","html_url":"https://github.com/alexey-pelykh","followers_url":"https://api.github.com/users/alexey-pelykh/followers","following_url":"https://api.github.com/users/alexey-pelykh/following{/other_user}","gists_url":"https://api.github.com/users/alexey-pelykh/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-pelykh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-pelykh/subscriptions","organizations_url":"https://api.github.com/users/alexey-pelykh/orgs","repos_url":"https://api.github.com/users/alexey-pelykh/repos","events_url":"https://api.github.com/users/alexey-pelykh/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-pelykh/received_events","type":"User","site_admin":false},"body":"Same as #5854 \r\n\r\nWhen this may be useful: when you have two different set of files (e.g. *.doc & *.pdf) in the same folder that requires different values used by Jekyll plugins or Jekyll itself.\r\nExamples:\r\n```\r\ndefaults:\r\n  # Content\r\n  -\r\n    scope:\r\n      path: \"content/*.pdf\"\r\n    values:\r\n      sitemap: false\r\n  -\r\n    scope:\r\n      path: \"content/*.html\"\r\n    values:\r\n      sitemap: true\r\n```\r\nor\r\n```\r\ndefaults:\r\n  # Offers\r\n  -\r\n    scope:\r\n      path: \"offers/*/index.html\"\r\n    values:\r\n      layout: offer\r\n  -\r\n    scope:\r\n      path: \"offers/*/thank-you.html\"\r\n    values:\r\n      sitemap: false\r\n```","created_at":"2017-08-04T04:15:12Z","updated_at":"2017-09-25T17:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76d04aaf9243ec77a328c0d76180f9c5fb8fff2e","assignee":{"login":"parkr","id":237985,"avatar_url":"https://avatars0.githubusercontent.com/u/237985?v=4","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"assignees":[{"login":"parkr","id":237985,"avatar_url":"https://avatars0.githubusercontent.com/u/237985?v=4","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/jekyll/jekyll/pulls/6268/commits","review_comments_url":"https://api.github.com/repos/jekyll/jekyll/pulls/6268/comments","review_comment_url":"https://api.github.com/repos/jekyll/jekyll/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/6268/comments","statuses_url":"https://api.github.com/repos/jekyll/jekyll/statuses/2c95f38ecdf80f54bf25a63f0c295afcef78368f","head":{"label":"brainbeanapps:scope_path_glob","ref":"scope_path_glob","sha":"2c95f38ecdf80f54bf25a63f0c295afcef78368f","user":{"login":"brainbeanapps","id":14878004,"avatar_url":"https://avatars1.githubusercontent.com/u/14878004?v=4","gravatar_id":"","url":"https://api.github.com/users/brainbeanapps","html_url":"https://github.com/brainbeanapps","followers_url":"https://api.github.com/users/brainbeanapps/followers","following_url":"https://api.github.com/users/brainbeanapps/following{/other_user}","gists_url":"https://api.github.com/users/brainbeanapps/gists{/gist_id}","starred_url":"https://api.github.com/users/brainbeanapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainbeanapps/subscriptions","organizations_url":"https://api.github.com/users/brainbeanapps/orgs","repos_url":"https://api.github.com/users/brainbeanapps/repos","events_url":"https://api.github.com/users/brainbeanapps/events{/privacy}","received_events_url":"https://api.github.com/users/brainbeanapps/received_events","type":"Organization","site_admin":false},"repo":{"id":80807113,"name":"jekyll","full_name":"brainbeanapps/jekyll","owner":{"login":"brainbeanapps","id":14878004,"avatar_url":"https://avatars1.githubusercontent.com/u/14878004?v=4","gravatar_id":"","url":"https://api.github.com/users/brainbeanapps","html_url":"https://github.com/brainbeanapps","followers_url":"https://api.github.com/users/brainbeanapps/followers","following_url":"https://api.github.com/users/brainbeanapps/following{/other_user}","gists_url":"https://api.github.com/users/brainbeanapps/gists{/gist_id}","starred_url":"https://api.github.com/users/brainbeanapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainbeanapps/subscriptions","organizations_url":"https://api.github.com/users/brainbeanapps/orgs","repos_url":"https://api.github.com/users/brainbeanapps/repos","events_url":"https://api.github.com/users/brainbeanapps/events{/privacy}","received_events_url":"https://api.github.com/users/brainbeanapps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/brainbeanapps/jekyll","description":":globe_with_meridians: Jekyll is a blog-aware, static site generator in Ruby","fork":true,"url":"https://api.github.com/repos/brainbeanapps/jekyll","forks_url":"https://api.github.com/repos/brainbeanapps/jekyll/forks","keys_url":"https://api.github.com/repos/brainbeanapps/jekyll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brainbeanapps/jekyll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brainbeanapps/jekyll/teams","hooks_url":"https://api.github.com/repos/brainbeanapps/jekyll/hooks","issue_events_url":"https://api.github.com/repos/brainbeanapps/jekyll/issues/events{/number}","events_url":"https://api.github.com/repos/brainbeanapps/jekyll/events","assignees_url":"https://api.github.com/repos/brainbeanapps/jekyll/assignees{/user}","branches_url":"https://api.github.com/repos/brainbeanapps/jekyll/branches{/branch}","tags_url":"https://api.github.com/repos/brainbeanapps/jekyll/tags","blobs_url":"https://api.github.com/repos/brainbeanapps/jekyll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brainbeanapps/jekyll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brainbeanapps/jekyll/git/refs{/sha}","trees_url":"https://api.github.com/repos/brainbeanapps/jekyll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brainbeanapps/jekyll/statuses/{sha}","languages_url":"https://api.github.com/repos/brainbeanapps/jekyll/languages","stargazers_url":"https://api.github.com/repos/brainbeanapps/jekyll/stargazers","contributors_url":"https://api.github.com/repos/brainbeanapps/jekyll/contributors","subscribers_url":"https://api.github.com/repos/brainbeanapps/jekyll/subscribers","subscription_url":"https://api.github.com/repos/brainbeanapps/jekyll/subscription","commits_url":"https://api.github.com/repos/brainbeanapps/jekyll/commits{/sha}","git_commits_url":"https://api.github.com/repos/brainbeanapps/jekyll/git/commits{/sha}","comments_url":"https://api.github.com/repos/brainbeanapps/jekyll/comments{/number}","issue_comment_url":"https://api.github.com/repos/brainbeanapps/jekyll/issues/comments{/number}","contents_url":"https://api.github.com/repos/brainbeanapps/jekyll/contents/{+path}","compare_url":"https://api.github.com/repos/brainbeanapps/jekyll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brainbeanapps/jekyll/merges","archive_url":"https://api.github.com/repos/brainbeanapps/jekyll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brainbeanapps/jekyll/downloads","issues_url":"https://api.github.com/repos/brainbeanapps/jekyll/issues{/number}","pulls_url":"https://api.github.com/repos/brainbeanapps/jekyll/pulls{/number}","milestones_url":"https://api.github.com/repos/brainbeanapps/jekyll/milestones{/number}","notifications_url":"https://api.github.com/repos/brainbeanapps/jekyll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brainbeanapps/jekyll/labels{/name}","releases_url":"https://api.github.com/repos/brainbeanapps/jekyll/releases{/id}","deployments_url":"https://api.github.com/repos/brainbeanapps/jekyll/deployments","created_at":"2017-02-03T07:31:07Z","updated_at":"2017-02-03T07:31:12Z","pushed_at":"2017-09-25T17:14:41Z","git_url":"git://github.com/brainbeanapps/jekyll.git","ssh_url":"git@github.com:brainbeanapps/jekyll.git","clone_url":"https://github.com/brainbeanapps/jekyll.git","svn_url":"https://github.com/brainbeanapps/jekyll","homepage":"https://jekyllrb.com","size":13159,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"jekyll:master","ref":"master","sha":"a9b95e58c6614a2c22a92b68dad5f2ace87a421f","user":{"login":"jekyll","id":3083652,"avatar_url":"https://avatars0.githubusercontent.com/u/3083652?v=4","gravatar_id":"","url":"https://api.github.com/users/jekyll","html_url":"https://github.com/jekyll","followers_url":"https://api.github.com/users/jekyll/followers","following_url":"https://api.github.com/users/jekyll/following{/other_user}","gists_url":"https://api.github.com/users/jekyll/gists{/gist_id}","starred_url":"https://api.github.com/users/jekyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekyll/subscriptions","organizations_url":"https://api.github.com/users/jekyll/orgs","repos_url":"https://api.github.com/users/jekyll/repos","events_url":"https://api.github.com/users/jekyll/events{/privacy}","received_events_url":"https://api.github.com/users/jekyll/received_events","type":"Organization","site_admin":false},"repo":{"id":65252,"name":"jekyll","full_name":"jekyll/jekyll","owner":{"login":"jekyll","id":3083652,"avatar_url":"https://avatars0.githubusercontent.com/u/3083652?v=4","gravatar_id":"","url":"https://api.github.com/users/jekyll","html_url":"https://github.com/jekyll","followers_url":"https://api.github.com/users/jekyll/followers","following_url":"https://api.github.com/users/jekyll/following{/other_user}","gists_url":"https://api.github.com/users/jekyll/gists{/gist_id}","starred_url":"https://api.github.com/users/jekyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekyll/subscriptions","organizations_url":"https://api.github.com/users/jekyll/orgs","repos_url":"https://api.github.com/users/jekyll/repos","events_url":"https://api.github.com/users/jekyll/events{/privacy}","received_events_url":"https://api.github.com/users/jekyll/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jekyll/jekyll","description":":globe_with_meridians: Jekyll is a blog-aware, static site generator in Ruby","fork":false,"url":"https://api.github.com/repos/jekyll/jekyll","forks_url":"https://api.github.com/repos/jekyll/jekyll/forks","keys_url":"https://api.github.com/repos/jekyll/jekyll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jekyll/jekyll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jekyll/jekyll/teams","hooks_url":"https://api.github.com/repos/jekyll/jekyll/hooks","issue_events_url":"https://api.github.com/repos/jekyll/jekyll/issues/events{/number}","events_url":"https://api.github.com/repos/jekyll/jekyll/events","assignees_url":"https://api.github.com/repos/jekyll/jekyll/assignees{/user}","branches_url":"https://api.github.com/repos/jekyll/jekyll/branches{/branch}","tags_url":"https://api.github.com/repos/jekyll/jekyll/tags","blobs_url":"https://api.github.com/repos/jekyll/jekyll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jekyll/jekyll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jekyll/jekyll/git/refs{/sha}","trees_url":"https://api.github.com/repos/jekyll/jekyll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jekyll/jekyll/statuses/{sha}","languages_url":"https://api.github.com/repos/jekyll/jekyll/languages","stargazers_url":"https://api.github.com/repos/jekyll/jekyll/stargazers","contributors_url":"https://api.github.com/repos/jekyll/jekyll/contributors","subscribers_url":"https://api.github.com/repos/jekyll/jekyll/subscribers","subscription_url":"https://api.github.com/repos/jekyll/jekyll/subscription","commits_url":"https://api.github.com/repos/jekyll/jekyll/commits{/sha}","git_commits_url":"https://api.github.com/repos/jekyll/jekyll/git/commits{/sha}","comments_url":"https://api.github.com/repos/jekyll/jekyll/comments{/number}","issue_comment_url":"https://api.github.com/repos/jekyll/jekyll/issues/comments{/number}","contents_url":"https://api.github.com/repos/jekyll/jekyll/contents/{+path}","compare_url":"https://api.github.com/repos/jekyll/jekyll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jekyll/jekyll/merges","archive_url":"https://api.github.com/repos/jekyll/jekyll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jekyll/jekyll/downloads","issues_url":"https://api.github.com/repos/jekyll/jekyll/issues{/number}","pulls_url":"https://api.github.com/repos/jekyll/jekyll/pulls{/number}","milestones_url":"https://api.github.com/repos/jekyll/jekyll/milestones{/number}","notifications_url":"https://api.github.com/repos/jekyll/jekyll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jekyll/jekyll/labels{/name}","releases_url":"https://api.github.com/repos/jekyll/jekyll/releases{/id}","deployments_url":"https://api.github.com/repos/jekyll/jekyll/deployments","created_at":"2008-10-20T06:29:03Z","updated_at":"2017-09-25T17:11:18Z","pushed_at":"2017-09-25T17:14:52Z","git_url":"git://github.com/jekyll/jekyll.git","ssh_url":"git@github.com:jekyll/jekyll.git","clone_url":"https://github.com/jekyll/jekyll.git","svn_url":"https://github.com/jekyll/jekyll","homepage":"https://jekyllrb.com","size":13229,"stargazers_count":31217,"watchers_count":31217,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6934,"mirror_url":null,"open_issues_count":122,"forks":6934,"open_issues":122,"watchers":31217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/6268"},"html":{"href":"https://github.com/jekyll/jekyll/pull/6268"},"issue":{"href":"https://api.github.com/repos/jekyll/jekyll/issues/6268"},"comments":{"href":"https://api.github.com/repos/jekyll/jekyll/issues/6268/comments"},"review_comments":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/6268/comments"},"review_comment":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jekyll/jekyll/pulls/6268/commits"},"statuses":{"href":"https://api.github.com/repos/jekyll/jekyll/statuses/2c95f38ecdf80f54bf25a63f0c295afcef78368f"}},"author_association":"NONE"}}
{"actor":{"display_login":"ashmaroli"}}