{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/216087392","pull_request_review_id":153503437,"id":216087392,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjA4NzM5Mg==","diff_hunk":"@@ -157,7 +193,23 @@ def implementations\n     end\n \n     def files\n-      implementations.map {|imp| { 'name' => imp['name'], 'path' => imp['path'] } }\n+      md = metadata\n+      lib_files = []\n+      impl_lib_files = []\n+\n+      unless md.nil?\n+        lib_files = md.key?('files') ? self.class.find_files(md['files'], @module) : []\n+        # There's definitely a more elegant way to do this...\n+        if md.key?('implementations')\n+          impl_files = []\n+          md['implementations'].map { |impl| impl_files << impl['files'] if impl.key?('files') }","path":"lib/puppet/module/task.rb","position":64,"original_position":64,"commit_id":"29a1baed40f4e23081495106c345cbe62abd8cd9","original_commit_id":"29a1baed40f4e23081495106c345cbe62abd8cd9","user":{"login":"MikaelSmith","id":8162496,"node_id":"MDQ6VXNlcjgxNjI0OTY=","avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"body":"This could be `each` instead of `map`. Also I'd do the `uniq` on the combination of `impl_lib_files` and `lib_files`.","created_at":"2018-09-07T21:07:15Z","updated_at":"2018-09-07T21:07:15Z","html_url":"https://github.com/puppetlabs/puppet/pull/7042#discussion_r216087392","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/216087392"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/7042#discussion_r216087392"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042","id":213354340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzMzU0MzQw","html_url":"https://github.com/puppetlabs/puppet/pull/7042","diff_url":"https://github.com/puppetlabs/puppet/pull/7042.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/7042.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/7042","number":7042,"state":"open","locked":false,"title":"(PUP-9081) Find required files for a task","user":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"body":"To enable including shared files with a task we need to be able to find specified files outside of the tasks own module. This adds a function to find files specified by the task within the modulepath, and concatenates them to the return value of 'files' along with other task files.","created_at":"2018-09-05T16:23:48Z","updated_at":"2018-09-07T21:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17070023ed56326e690e412680c33d68318636dd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/7042/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/29a1baed40f4e23081495106c345cbe62abd8cd9","head":{"label":"lucywyman:PUP-9081","ref":"PUP-9081","sha":"29a1baed40f4e23081495106c345cbe62abd8cd9","user":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"repo":{"id":114167989,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQxNjc5ODk=","name":"puppet","full_name":"lucywyman/puppet","owner":{"login":"lucywyman","id":5055819,"node_id":"MDQ6VXNlcjUwNTU4MTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5055819?v=4","gravatar_id":"","url":"https://api.github.com/users/lucywyman","html_url":"https://github.com/lucywyman","followers_url":"https://api.github.com/users/lucywyman/followers","following_url":"https://api.github.com/users/lucywyman/following{/other_user}","gists_url":"https://api.github.com/users/lucywyman/gists{/gist_id}","starred_url":"https://api.github.com/users/lucywyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucywyman/subscriptions","organizations_url":"https://api.github.com/users/lucywyman/orgs","repos_url":"https://api.github.com/users/lucywyman/repos","events_url":"https://api.github.com/users/lucywyman/events{/privacy}","received_events_url":"https://api.github.com/users/lucywyman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucywyman/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/lucywyman/puppet","forks_url":"https://api.github.com/repos/lucywyman/puppet/forks","keys_url":"https://api.github.com/repos/lucywyman/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucywyman/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucywyman/puppet/teams","hooks_url":"https://api.github.com/repos/lucywyman/puppet/hooks","issue_events_url":"https://api.github.com/repos/lucywyman/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/lucywyman/puppet/events","assignees_url":"https://api.github.com/repos/lucywyman/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/lucywyman/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/lucywyman/puppet/tags","blobs_url":"https://api.github.com/repos/lucywyman/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucywyman/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucywyman/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucywyman/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucywyman/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/lucywyman/puppet/languages","stargazers_url":"https://api.github.com/repos/lucywyman/puppet/stargazers","contributors_url":"https://api.github.com/repos/lucywyman/puppet/contributors","subscribers_url":"https://api.github.com/repos/lucywyman/puppet/subscribers","subscription_url":"https://api.github.com/repos/lucywyman/puppet/subscription","commits_url":"https://api.github.com/repos/lucywyman/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucywyman/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucywyman/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucywyman/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucywyman/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/lucywyman/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucywyman/puppet/merges","archive_url":"https://api.github.com/repos/lucywyman/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucywyman/puppet/downloads","issues_url":"https://api.github.com/repos/lucywyman/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/lucywyman/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/lucywyman/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/lucywyman/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucywyman/puppet/labels{/name}","releases_url":"https://api.github.com/repos/lucywyman/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/lucywyman/puppet/deployments","created_at":"2017-12-13T20:56:12Z","updated_at":"2018-09-04T16:55:01Z","pushed_at":"2018-09-07T21:04:11Z","git_url":"git://github.com/lucywyman/puppet.git","ssh_url":"git@github.com:lucywyman/puppet.git","clone_url":"https://github.com/lucywyman/puppet.git","svn_url":"https://github.com/lucywyman/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":68182,"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":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"516e48bcc6fcd118e4aad48bec84d693361c3757","user":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","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":910744,"node_id":"MDEwOlJlcG9zaXRvcnk5MTA3NDQ=","name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNDI2OA==","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/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2018-09-07T20:36:30Z","pushed_at":"2018-09-07T21:04:13Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":68359,"stargazers_count":5063,"watchers_count":5063,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2044,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2044,"open_issues":57,"watchers":5063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/7042"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/7042"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/7042/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/7042/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/29a1baed40f4e23081495106c345cbe62abd8cd9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MikaelSmith"}}