{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/pdk/pulls/comments/167761515","pull_request_review_id":96026345,"id":167761515,"diff_hunk":"@@ -196,6 +196,13 @@ def ignored_files\n \n                              PathSpec.new(data)\n                            end\n+\n+        # Also ignore the target directory if it is in the module dir and not already ignored\n+        if Find.find(@module_dir).include?(@target_dir) && !@ignored_files.match(File.basename(@target_dir) + '/')","path":"lib/pdk/module/build.rb","position":17,"original_position":17,"commit_id":"c0d55f823d1d68eaa248f6129215914d03da7410","original_commit_id":"c0d55f823d1d68eaa248f6129215914d03da7410","user":{"login":"bmjen","id":5577705,"avatar_url":"https://avatars3.githubusercontent.com/u/5577705?v=4","gravatar_id":"","url":"https://api.github.com/users/bmjen","html_url":"https://github.com/bmjen","followers_url":"https://api.github.com/users/bmjen/followers","following_url":"https://api.github.com/users/bmjen/following{/other_user}","gists_url":"https://api.github.com/users/bmjen/gists{/gist_id}","starred_url":"https://api.github.com/users/bmjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmjen/subscriptions","organizations_url":"https://api.github.com/users/bmjen/orgs","repos_url":"https://api.github.com/users/bmjen/repos","events_url":"https://api.github.com/users/bmjen/events{/privacy}","received_events_url":"https://api.github.com/users/bmjen/received_events","type":"User","site_admin":false},"body":"That wouldn't guard against the scenario where `target-dir` wasn't a sub directory of the `module_dir`. If `target-dir` was `/tmp/pkg/` then `@ignored_files.specs_matching('/tmp/pkg/').empty?` would be `true`, and `/pkg/` would get added to the ignored_files a second time.","created_at":"2018-02-13T05:04:53Z","updated_at":"2018-02-13T05:04:53Z","html_url":"https://github.com/puppetlabs/pdk/pull/425#discussion_r167761515","pull_request_url":"https://api.github.com/repos/puppetlabs/pdk/pulls/425","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/comments/167761515"},"html":{"href":"https://github.com/puppetlabs/pdk/pull/425#discussion_r167761515"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/425"}},"in_reply_to_id":167734697},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/pdk/pulls/425","id":168706728,"html_url":"https://github.com/puppetlabs/pdk/pull/425","diff_url":"https://github.com/puppetlabs/pdk/pull/425.diff","patch_url":"https://github.com/puppetlabs/pdk/pull/425.patch","issue_url":"https://api.github.com/repos/puppetlabs/pdk/issues/425","number":425,"state":"open","locked":false,"title":"(PDK-804) Fixes error in build without ignore file","user":{"login":"bmjen","id":5577705,"avatar_url":"https://avatars3.githubusercontent.com/u/5577705?v=4","gravatar_id":"","url":"https://api.github.com/users/bmjen","html_url":"https://github.com/bmjen","followers_url":"https://api.github.com/users/bmjen/followers","following_url":"https://api.github.com/users/bmjen/following{/other_user}","gists_url":"https://api.github.com/users/bmjen/gists{/gist_id}","starred_url":"https://api.github.com/users/bmjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmjen/subscriptions","organizations_url":"https://api.github.com/users/bmjen/orgs","repos_url":"https://api.github.com/users/bmjen/repos","events_url":"https://api.github.com/users/bmjen/events{/privacy}","received_events_url":"https://api.github.com/users/bmjen/received_events","type":"User","site_admin":false},"body":"pdk will now make sure that if there is no ignore file and if the pkg\r\ntarget-dir is in the module_dir, then it will add the target-dir\r\nto the ignores list.","created_at":"2018-02-12T22:34:48Z","updated_at":"2018-02-13T05:04:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ff968dffc5cb0ce901f550c2e02d0f8ff8db9c5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/pdk/pulls/425/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/pdk/pulls/425/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/pdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/pdk/issues/425/comments","statuses_url":"https://api.github.com/repos/puppetlabs/pdk/statuses/c0d55f823d1d68eaa248f6129215914d03da7410","head":{"label":"bmjen:pdk-804","ref":"pdk-804","sha":"c0d55f823d1d68eaa248f6129215914d03da7410","user":{"login":"bmjen","id":5577705,"avatar_url":"https://avatars3.githubusercontent.com/u/5577705?v=4","gravatar_id":"","url":"https://api.github.com/users/bmjen","html_url":"https://github.com/bmjen","followers_url":"https://api.github.com/users/bmjen/followers","following_url":"https://api.github.com/users/bmjen/following{/other_user}","gists_url":"https://api.github.com/users/bmjen/gists{/gist_id}","starred_url":"https://api.github.com/users/bmjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmjen/subscriptions","organizations_url":"https://api.github.com/users/bmjen/orgs","repos_url":"https://api.github.com/users/bmjen/repos","events_url":"https://api.github.com/users/bmjen/events{/privacy}","received_events_url":"https://api.github.com/users/bmjen/received_events","type":"User","site_admin":false},"repo":{"id":93105053,"name":"pdk","full_name":"bmjen/pdk","owner":{"login":"bmjen","id":5577705,"avatar_url":"https://avatars3.githubusercontent.com/u/5577705?v=4","gravatar_id":"","url":"https://api.github.com/users/bmjen","html_url":"https://github.com/bmjen","followers_url":"https://api.github.com/users/bmjen/followers","following_url":"https://api.github.com/users/bmjen/following{/other_user}","gists_url":"https://api.github.com/users/bmjen/gists{/gist_id}","starred_url":"https://api.github.com/users/bmjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmjen/subscriptions","organizations_url":"https://api.github.com/users/bmjen/orgs","repos_url":"https://api.github.com/users/bmjen/repos","events_url":"https://api.github.com/users/bmjen/events{/privacy}","received_events_url":"https://api.github.com/users/bmjen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bmjen/pdk","description":"The shortest path to better modules: Puppet Development Kit","fork":true,"url":"https://api.github.com/repos/bmjen/pdk","forks_url":"https://api.github.com/repos/bmjen/pdk/forks","keys_url":"https://api.github.com/repos/bmjen/pdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bmjen/pdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bmjen/pdk/teams","hooks_url":"https://api.github.com/repos/bmjen/pdk/hooks","issue_events_url":"https://api.github.com/repos/bmjen/pdk/issues/events{/number}","events_url":"https://api.github.com/repos/bmjen/pdk/events","assignees_url":"https://api.github.com/repos/bmjen/pdk/assignees{/user}","branches_url":"https://api.github.com/repos/bmjen/pdk/branches{/branch}","tags_url":"https://api.github.com/repos/bmjen/pdk/tags","blobs_url":"https://api.github.com/repos/bmjen/pdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bmjen/pdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bmjen/pdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/bmjen/pdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bmjen/pdk/statuses/{sha}","languages_url":"https://api.github.com/repos/bmjen/pdk/languages","stargazers_url":"https://api.github.com/repos/bmjen/pdk/stargazers","contributors_url":"https://api.github.com/repos/bmjen/pdk/contributors","subscribers_url":"https://api.github.com/repos/bmjen/pdk/subscribers","subscription_url":"https://api.github.com/repos/bmjen/pdk/subscription","commits_url":"https://api.github.com/repos/bmjen/pdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/bmjen/pdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/bmjen/pdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/bmjen/pdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/bmjen/pdk/contents/{+path}","compare_url":"https://api.github.com/repos/bmjen/pdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bmjen/pdk/merges","archive_url":"https://api.github.com/repos/bmjen/pdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bmjen/pdk/downloads","issues_url":"https://api.github.com/repos/bmjen/pdk/issues{/number}","pulls_url":"https://api.github.com/repos/bmjen/pdk/pulls{/number}","milestones_url":"https://api.github.com/repos/bmjen/pdk/milestones{/number}","notifications_url":"https://api.github.com/repos/bmjen/pdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bmjen/pdk/labels{/name}","releases_url":"https://api.github.com/repos/bmjen/pdk/releases{/id}","deployments_url":"https://api.github.com/repos/bmjen/pdk/deployments","created_at":"2017-06-01T22:34:29Z","updated_at":"2017-06-01T22:34:31Z","pushed_at":"2018-02-12T23:14:45Z","git_url":"git://github.com/bmjen/pdk.git","ssh_url":"git@github.com:bmjen/pdk.git","clone_url":"https://github.com/bmjen/pdk.git","svn_url":"https://github.com/bmjen/pdk","homepage":"","size":1031,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"e12d456f41a9266b7db47fef0755412b66b85c8c","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":80118170,"name":"pdk","full_name":"puppetlabs/pdk","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/pdk","description":"The shortest path to better modules: Puppet Development Kit; Download:","fork":false,"url":"https://api.github.com/repos/puppetlabs/pdk","forks_url":"https://api.github.com/repos/puppetlabs/pdk/forks","keys_url":"https://api.github.com/repos/puppetlabs/pdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/pdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/pdk/teams","hooks_url":"https://api.github.com/repos/puppetlabs/pdk/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/pdk/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/pdk/events","assignees_url":"https://api.github.com/repos/puppetlabs/pdk/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/pdk/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/pdk/tags","blobs_url":"https://api.github.com/repos/puppetlabs/pdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/pdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/pdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/pdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/pdk/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/pdk/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/pdk/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/pdk/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/pdk/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/pdk/subscription","commits_url":"https://api.github.com/repos/puppetlabs/pdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/pdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/pdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/pdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/pdk/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/pdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/pdk/merges","archive_url":"https://api.github.com/repos/puppetlabs/pdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/pdk/downloads","issues_url":"https://api.github.com/repos/puppetlabs/pdk/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/pdk/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/pdk/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/pdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/pdk/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/pdk/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/pdk/deployments","created_at":"2017-01-26T13:46:25Z","updated_at":"2018-02-07T18:48:17Z","pushed_at":"2018-02-13T04:39:44Z","git_url":"git://github.com/puppetlabs/pdk.git","ssh_url":"git@github.com:puppetlabs/pdk.git","clone_url":"https://github.com/puppetlabs/pdk.git","svn_url":"https://github.com/puppetlabs/pdk","homepage":"https://puppet.com/download-puppet-development-kit","size":1057,"stargazers_count":108,"watchers_count":108,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":24,"open_issues":33,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/425"},"html":{"href":"https://github.com/puppetlabs/pdk/pull/425"},"issue":{"href":"https://api.github.com/repos/puppetlabs/pdk/issues/425"},"comments":{"href":"https://api.github.com/repos/puppetlabs/pdk/issues/425/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/425/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/pdk/pulls/425/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/pdk/statuses/c0d55f823d1d68eaa248f6129215914d03da7410"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bmjen"}}