{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/comments/241228681","pull_request_review_id":184449698,"id":241228681,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTIyODY4MQ==","diff_hunk":"@@ -23,6 +25,14 @@ internal class PowerShellManager\n     {\n         private readonly ILogger _logger;\n         private readonly PowerShell _pwsh;\n+        private const string PROFILE_FILENAME = \"Profile.ps1\";\n+        private readonly EnumerationOptions ENUMERATION_OPTIONS = new EnumerationOptions {\n+            MatchCasing = MatchCasing.CaseInsensitive\n+        };\n+\n+        // The path to the FunctionApp root. This is set at the first FunctionLoad message\n+        //and used for determining the path to the 'Profile.ps1' and 'Modules' folder.\n+        internal string FunctionAppRootLocation { get; set; } = AppDomain.CurrentDomain.BaseDirectory;","path":"src/PowerShell/PowerShellManager.cs","position":null,"original_position":21,"commit_id":"cf31290175290c1a70d29e2aa9c1145751b4eb3d","original_commit_id":"a740efd29ddd0a9691ed3b328779e1c1bd205485","user":{"login":"TylerLeonhardt","id":2644648,"node_id":"MDQ6VXNlcjI2NDQ2NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2644648?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerLeonhardt","html_url":"https://github.com/TylerLeonhardt","followers_url":"https://api.github.com/users/TylerLeonhardt/followers","following_url":"https://api.github.com/users/TylerLeonhardt/following{/other_user}","gists_url":"https://api.github.com/users/TylerLeonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerLeonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerLeonhardt/subscriptions","organizations_url":"https://api.github.com/users/TylerLeonhardt/orgs","repos_url":"https://api.github.com/users/TylerLeonhardt/repos","events_url":"https://api.github.com/users/TylerLeonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/TylerLeonhardt/received_events","type":"User","site_admin":false},"body":"hmm actually... would it be better to put this in `FunctionMetadata`?","created_at":"2018-12-12T23:53:46Z","updated_at":"2018-12-12T23:53:46Z","html_url":"https://github.com/Azure/azure-functions-powershell-worker/pull/114#discussion_r241228681","pull_request_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/comments/241228681"},"html":{"href":"https://github.com/Azure/azure-functions-powershell-worker/pull/114#discussion_r241228681"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114"}},"in_reply_to_id":241206867},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114","id":237878578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3ODc4NTc4","html_url":"https://github.com/Azure/azure-functions-powershell-worker/pull/114","diff_url":"https://github.com/Azure/azure-functions-powershell-worker/pull/114.diff","patch_url":"https://github.com/Azure/azure-functions-powershell-worker/pull/114.patch","issue_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/114","number":114,"state":"open","locked":false,"title":"Profile.ps1 support and removal of auto-auth to azure","user":{"login":"TylerLeonhardt","id":2644648,"node_id":"MDQ6VXNlcjI2NDQ2NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2644648?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerLeonhardt","html_url":"https://github.com/TylerLeonhardt","followers_url":"https://api.github.com/users/TylerLeonhardt/followers","following_url":"https://api.github.com/users/TylerLeonhardt/following{/other_user}","gists_url":"https://api.github.com/users/TylerLeonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerLeonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerLeonhardt/subscriptions","organizations_url":"https://api.github.com/users/TylerLeonhardt/orgs","repos_url":"https://api.github.com/users/TylerLeonhardt/repos","events_url":"https://api.github.com/users/TylerLeonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/TylerLeonhardt/received_events","type":"User","site_admin":false},"body":"This allows you to put a `Profile.ps1` in your Function App root that will be run at every COLD START of your Function App. Please refer to the empty `example/PSCoreApp/Profile.ps1` for usecases.\r\n\r\nfixes #110 ","created_at":"2018-12-12T00:56:17Z","updated_at":"2018-12-12T23:53:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d0feb526ee9c0a49eecd0c57959e7b7a674f38c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"SteveL-MSFT","id":11859881,"node_id":"MDQ6VXNlcjExODU5ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/11859881?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveL-MSFT","html_url":"https://github.com/SteveL-MSFT","followers_url":"https://api.github.com/users/SteveL-MSFT/followers","following_url":"https://api.github.com/users/SteveL-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/SteveL-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveL-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveL-MSFT/subscriptions","organizations_url":"https://api.github.com/users/SteveL-MSFT/orgs","repos_url":"https://api.github.com/users/SteveL-MSFT/repos","events_url":"https://api.github.com/users/SteveL-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/SteveL-MSFT/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/114/comments","statuses_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/statuses/cf31290175290c1a70d29e2aa9c1145751b4eb3d","head":{"label":"TylerLeonhardt:add-profilesupport","ref":"add-profilesupport","sha":"cf31290175290c1a70d29e2aa9c1145751b4eb3d","user":{"login":"TylerLeonhardt","id":2644648,"node_id":"MDQ6VXNlcjI2NDQ2NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2644648?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerLeonhardt","html_url":"https://github.com/TylerLeonhardt","followers_url":"https://api.github.com/users/TylerLeonhardt/followers","following_url":"https://api.github.com/users/TylerLeonhardt/following{/other_user}","gists_url":"https://api.github.com/users/TylerLeonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerLeonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerLeonhardt/subscriptions","organizations_url":"https://api.github.com/users/TylerLeonhardt/orgs","repos_url":"https://api.github.com/users/TylerLeonhardt/repos","events_url":"https://api.github.com/users/TylerLeonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/TylerLeonhardt/received_events","type":"User","site_admin":false},"repo":{"id":148859867,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg4NTk4Njc=","name":"azure-functions-powershell-worker","full_name":"TylerLeonhardt/azure-functions-powershell-worker","private":false,"owner":{"login":"TylerLeonhardt","id":2644648,"node_id":"MDQ6VXNlcjI2NDQ2NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2644648?v=4","gravatar_id":"","url":"https://api.github.com/users/TylerLeonhardt","html_url":"https://github.com/TylerLeonhardt","followers_url":"https://api.github.com/users/TylerLeonhardt/followers","following_url":"https://api.github.com/users/TylerLeonhardt/following{/other_user}","gists_url":"https://api.github.com/users/TylerLeonhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerLeonhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerLeonhardt/subscriptions","organizations_url":"https://api.github.com/users/TylerLeonhardt/orgs","repos_url":"https://api.github.com/users/TylerLeonhardt/repos","events_url":"https://api.github.com/users/TylerLeonhardt/events{/privacy}","received_events_url":"https://api.github.com/users/TylerLeonhardt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/TylerLeonhardt/azure-functions-powershell-worker","description":"PowerShell language worker for Azure Functions.","fork":true,"url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker","forks_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/forks","keys_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/teams","hooks_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/hooks","issue_events_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/issues/events{/number}","events_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/events","assignees_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/assignees{/user}","branches_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/branches{/branch}","tags_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/tags","blobs_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/languages","stargazers_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/stargazers","contributors_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/contributors","subscribers_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/subscribers","subscription_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/subscription","commits_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/contents/{+path}","compare_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/merges","archive_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/downloads","issues_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/issues{/number}","pulls_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/labels{/name}","releases_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/releases{/id}","deployments_url":"https://api.github.com/repos/TylerLeonhardt/azure-functions-powershell-worker/deployments","created_at":"2018-09-15T01:58:39Z","updated_at":"2018-09-15T01:59:43Z","pushed_at":"2018-12-12T23:47:03Z","git_url":"git://github.com/TylerLeonhardt/azure-functions-powershell-worker.git","ssh_url":"git@github.com:TylerLeonhardt/azure-functions-powershell-worker.git","clone_url":"https://github.com/TylerLeonhardt/azure-functions-powershell-worker.git","svn_url":"https://github.com/TylerLeonhardt/azure-functions-powershell-worker","homepage":null,"size":230,"stargazers_count":0,"watchers_count":0,"language":"C#","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":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"4593c4366ed5ed92466576fb195bf66d746665c7","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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":142599157,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1OTkxNTc=","name":"azure-functions-powershell-worker","full_name":"Azure/azure-functions-powershell-worker","private":false,"owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","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},"html_url":"https://github.com/Azure/azure-functions-powershell-worker","description":"PowerShell language worker for Azure Functions.","fork":false,"url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker","forks_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/forks","keys_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/teams","hooks_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/events","assignees_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/tags","blobs_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/subscription","commits_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/merges","archive_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/downloads","issues_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/deployments","created_at":"2018-07-27T16:17:14Z","updated_at":"2018-12-12T20:09:03Z","pushed_at":"2018-12-12T23:47:05Z","git_url":"git://github.com/Azure/azure-functions-powershell-worker.git","ssh_url":"git@github.com:Azure/azure-functions-powershell-worker.git","clone_url":"https://github.com/Azure/azure-functions-powershell-worker.git","svn_url":"https://github.com/Azure/azure-functions-powershell-worker","homepage":null,"size":231,"stargazers_count":25,"watchers_count":25,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":24,"watchers":25,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114"},"html":{"href":"https://github.com/Azure/azure-functions-powershell-worker/pull/114"},"issue":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/114"},"comments":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-functions-powershell-worker/statuses/cf31290175290c1a70d29e2aa9c1145751b4eb3d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"TylerLeonhardt"}}