{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/88309675","pull_request_review_id":8886020,"id":88309675,"diff_hunk":"@@ -261,18 +261,33 @@ internal static List<string> GetModuleFilePaths(string rootScriptPath, string fu\n         {\n             List<string> modulePaths = new List<string>();\n             string functionFolder = Path.Combine(rootScriptPath, functionName);\n+            string rootModuleDirectory = Path.Combine(rootScriptPath, PowerShellConstants.ModulesFolderName);\n             string moduleDirectory = Path.Combine(functionFolder, PowerShellConstants.ModulesFolderName);\n-            if (Directory.Exists(moduleDirectory))\n+            string[] searchDirectories = new string[] { rootModuleDirectory, moduleDirectory };\n+            modulePaths.AddRange(AddToModulePaths(searchDirectories));\n+            return modulePaths;\n+        }\n+\n+        internal static List<string> AddToModulePaths(string[] directories)","path":"src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs","position":12,"original_position":12,"commit_id":"bc0b1af9d948a08b94e7b82d6213999f883bf743","original_commit_id":"bc0b1af9d948a08b94e7b82d6213999f883bf743","user":{"login":"tohling","id":14911331,"avatar_url":"https://avatars.githubusercontent.com/u/14911331?v=3","gravatar_id":"","url":"https://api.github.com/users/tohling","html_url":"https://github.com/tohling","followers_url":"https://api.github.com/users/tohling/followers","following_url":"https://api.github.com/users/tohling/following{/other_user}","gists_url":"https://api.github.com/users/tohling/gists{/gist_id}","starred_url":"https://api.github.com/users/tohling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tohling/subscriptions","organizations_url":"https://api.github.com/users/tohling/orgs","repos_url":"https://api.github.com/users/tohling/repos","events_url":"https://api.github.com/users/tohling/events{/privacy}","received_events_url":"https://api.github.com/users/tohling/received_events","type":"User","site_admin":false},"body":"Overall, I would say that you should add tests for this and ensure that loading of modules works without errors when loading from both **rootModuleDirectory** and **moduleDirectory**.  Verify that if a DLL is duplicated in both directories, the load behavior is as expected.","created_at":"2016-11-16T19:15:58Z","updated_at":"2016-11-16T19:17:48Z","html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906#discussion_r88309675","pull_request_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments/88309675"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906#discussion_r88309675"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906","id":93109394,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906","diff_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906.diff","patch_url":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906.patch","issue_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/906","number":906,"state":"open","locked":false,"title":"Change GetModuleFilePaths() to include a modules directory in root of Function App","user":{"login":"davidobrien1985","id":8554521,"avatar_url":"https://avatars.githubusercontent.com/u/8554521?v=3","gravatar_id":"","url":"https://api.github.com/users/davidobrien1985","html_url":"https://github.com/davidobrien1985","followers_url":"https://api.github.com/users/davidobrien1985/followers","following_url":"https://api.github.com/users/davidobrien1985/following{/other_user}","gists_url":"https://api.github.com/users/davidobrien1985/gists{/gist_id}","starred_url":"https://api.github.com/users/davidobrien1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidobrien1985/subscriptions","organizations_url":"https://api.github.com/users/davidobrien1985/orgs","repos_url":"https://api.github.com/users/davidobrien1985/repos","events_url":"https://api.github.com/users/davidobrien1985/events{/privacy}","received_events_url":"https://api.github.com/users/davidobrien1985/received_events","type":"User","site_admin":false},"body":"This commit should address https://github.com/Azure/azure-webjobs-sdk-script/issues/896\r\n\r\nI'm not really a C# dev, just starting and coming from PowerShell, so hopefully I haven't violated too many C# best practices here ;)\r\n\r\nThe code will now check for a folder named `modules` in the root of the Function App and search for all available module files, adding results to the `modulePaths` output variable.","created_at":"2016-11-10T08:52:54Z","updated_at":"2016-11-16T19:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7da15c72d667a18dba3bc6f3c6fde56e784e0795","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/906/comments","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/bc0b1af9d948a08b94e7b82d6213999f883bf743","head":{"label":"davidobrien1985:feature/powershell_module_root","ref":"feature/powershell_module_root","sha":"bc0b1af9d948a08b94e7b82d6213999f883bf743","user":{"login":"davidobrien1985","id":8554521,"avatar_url":"https://avatars.githubusercontent.com/u/8554521?v=3","gravatar_id":"","url":"https://api.github.com/users/davidobrien1985","html_url":"https://github.com/davidobrien1985","followers_url":"https://api.github.com/users/davidobrien1985/followers","following_url":"https://api.github.com/users/davidobrien1985/following{/other_user}","gists_url":"https://api.github.com/users/davidobrien1985/gists{/gist_id}","starred_url":"https://api.github.com/users/davidobrien1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidobrien1985/subscriptions","organizations_url":"https://api.github.com/users/davidobrien1985/orgs","repos_url":"https://api.github.com/users/davidobrien1985/repos","events_url":"https://api.github.com/users/davidobrien1985/events{/privacy}","received_events_url":"https://api.github.com/users/davidobrien1985/received_events","type":"User","site_admin":false},"repo":{"id":72529751,"name":"azure-webjobs-sdk-script","full_name":"davidobrien1985/azure-webjobs-sdk-script","owner":{"login":"davidobrien1985","id":8554521,"avatar_url":"https://avatars.githubusercontent.com/u/8554521?v=3","gravatar_id":"","url":"https://api.github.com/users/davidobrien1985","html_url":"https://github.com/davidobrien1985","followers_url":"https://api.github.com/users/davidobrien1985/followers","following_url":"https://api.github.com/users/davidobrien1985/following{/other_user}","gists_url":"https://api.github.com/users/davidobrien1985/gists{/gist_id}","starred_url":"https://api.github.com/users/davidobrien1985/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidobrien1985/subscriptions","organizations_url":"https://api.github.com/users/davidobrien1985/orgs","repos_url":"https://api.github.com/users/davidobrien1985/repos","events_url":"https://api.github.com/users/davidobrien1985/events{/privacy}","received_events_url":"https://api.github.com/users/davidobrien1985/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidobrien1985/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":true,"url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/davidobrien1985/azure-webjobs-sdk-script/deployments","created_at":"2016-11-01T11:25:04Z","updated_at":"2016-11-01T11:25:06Z","pushed_at":"2016-11-15T23:48:13Z","git_url":"git://github.com/davidobrien1985/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:davidobrien1985/azure-webjobs-sdk-script.git","clone_url":"https://github.com/davidobrien1985/azure-webjobs-sdk-script.git","svn_url":"https://github.com/davidobrien1985/azure-webjobs-sdk-script","homepage":"","size":16813,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"1ddb3bfc611bf4b8dd4ce50dc15251ac1bdd3d84","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":42548553,"name":"azure-webjobs-sdk-script","full_name":"Azure/azure-webjobs-sdk-script","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-webjobs-sdk-script","description":"Scripting the Azure WebJobs SDK","fork":false,"url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script","forks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/forks","keys_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/teams","hooks_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/events","assignees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/tags","blobs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/subscription","commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/merges","archive_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/downloads","issues_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/deployments","created_at":"2015-09-15T21:48:19Z","updated_at":"2016-11-15T17:59:50Z","pushed_at":"2016-11-16T18:53:46Z","git_url":"git://github.com/Azure/azure-webjobs-sdk-script.git","ssh_url":"git@github.com:Azure/azure-webjobs-sdk-script.git","clone_url":"https://github.com/Azure/azure-webjobs-sdk-script.git","svn_url":"https://github.com/Azure/azure-webjobs-sdk-script","homepage":"","size":17452,"stargazers_count":163,"watchers_count":163,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":159,"forks":63,"open_issues":159,"watchers":163,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906"},"html":{"href":"https://github.com/Azure/azure-webjobs-sdk-script/pull/906"},"issue":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/906"},"comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/issues/906/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/pulls/906/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-webjobs-sdk-script/statuses/bc0b1af9d948a08b94e7b82d6213999f883bf743"}}}}
{"actor":{"display_login":"tohling"}}