{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/comments/241504159","pull_request_review_id":184794535,"id":241504159,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTUwNDE1OQ==","diff_hunk":"@@ -0,0 +1,54 @@\n+/*---------------------------------------------------------------------------------------------\n+ *  Copyright (c) Microsoft Corporation. All rights reserved.\n+ *  Licensed under the MIT License. See License.txt in the project root for license information.\n+ *--------------------------------------------------------------------------------------------*/\n+\n+import { WebSiteManagementModels } from \"azure-arm-website\";\n+import { DotenvParseOutput } from \"dotenv\";\n+import * as fse from 'fs-extra';\n+import * as os from 'os';\n+import * as vscode from 'vscode';\n+import { AppSettingsTreeItem, SiteClient } from \"vscode-azureappservice\";\n+import { envFileName } from \"../../constants\";\n+import { ext } from \"../../extensionVariables\";\n+import * as workspaceUtil from '../../utils/workspace';\n+import { confirmOverwriteSettings } from \"./confirmOverwriteSettings\";\n+import { getLocalEnvironmentVariables } from './getLocalEnvironmentVariables';\n+\n+export async function downloadAppSettings(node?: AppSettingsTreeItem): Promise<void> {\n+    if (!node) {\n+        node = <AppSettingsTreeItem>await ext.tree.showTreeItemPicker(AppSettingsTreeItem.contextValue);\n+    }\n+\n+    const client: SiteClient = node.root.client;\n+\n+    const message: string = 'Select the destination file for your downloaded settings.';\n+    const envVarPath: string = await workspaceUtil.selectWorkspaceFile(ext.ui, message, () => envFileName);\n+    const envVarUri: vscode.Uri = vscode.Uri.file(envVarPath);\n+\n+    await node.runWithTemporaryDescription('Downloading...', async () => {\n+        ext.outputChannel.appendLine(`Downloading settings from \"${client.fullName}\"...`);","path":"src/commands/appSettings/downloadAppSettings.ts","position":29,"original_position":30,"commit_id":"0095c6ed5ffffc6f4f8b465a391706a869e8cb82","original_commit_id":"c3e52f0210cebac3fda16872fbc9aa567fc06993","user":{"login":"EricJizbaMSFT","id":11282622,"node_id":"MDQ6VXNlcjExMjgyNjIy","avatar_url":"https://avatars2.githubusercontent.com/u/11282622?v=4","gravatar_id":"","url":"https://api.github.com/users/EricJizbaMSFT","html_url":"https://github.com/EricJizbaMSFT","followers_url":"https://api.github.com/users/EricJizbaMSFT/followers","following_url":"https://api.github.com/users/EricJizbaMSFT/following{/other_user}","gists_url":"https://api.github.com/users/EricJizbaMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/EricJizbaMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EricJizbaMSFT/subscriptions","organizations_url":"https://api.github.com/users/EricJizbaMSFT/orgs","repos_url":"https://api.github.com/users/EricJizbaMSFT/repos","events_url":"https://api.github.com/users/EricJizbaMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/EricJizbaMSFT/received_events","type":"User","site_admin":false},"body":"I'm saying get rid of this line:\r\n```\r\next.outputChannel.appendLine(`Downloading settings from \"${client.fullName}\"...`);\r\n```\r\n\r\nIt's a somewhat common pattern that you do, but it's starting to feel redundant and can honestly make the code look a little confusing.","created_at":"2018-12-13T18:03:33Z","updated_at":"2018-12-13T18:03:34Z","html_url":"https://github.com/Microsoft/vscode-azureappservice/pull/779#discussion_r241504159","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/comments/241504159"},"html":{"href":"https://github.com/Microsoft/vscode-azureappservice/pull/779#discussion_r241504159"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779"}},"in_reply_to_id":240802259},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779","id":237530893,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NTMwODkz","html_url":"https://github.com/Microsoft/vscode-azureappservice/pull/779","diff_url":"https://github.com/Microsoft/vscode-azureappservice/pull/779.diff","patch_url":"https://github.com/Microsoft/vscode-azureappservice/pull/779.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/779","number":779,"state":"open","locked":false,"title":"Download App Settings as a .env and Upload local .env files as App Settings","user":{"login":"nturinski","id":5290572,"node_id":"MDQ6VXNlcjUyOTA1NzI=","avatar_url":"https://avatars0.githubusercontent.com/u/5290572?v=4","gravatar_id":"","url":"https://api.github.com/users/nturinski","html_url":"https://github.com/nturinski","followers_url":"https://api.github.com/users/nturinski/followers","following_url":"https://api.github.com/users/nturinski/following{/other_user}","gists_url":"https://api.github.com/users/nturinski/gists{/gist_id}","starred_url":"https://api.github.com/users/nturinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nturinski/subscriptions","organizations_url":"https://api.github.com/users/nturinski/orgs","repos_url":"https://api.github.com/users/nturinski/repos","events_url":"https://api.github.com/users/nturinski/events{/privacy}","received_events_url":"https://api.github.com/users/nturinski/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/Microsoft/vscode-azureappservice/issues/639\r\n\r\nI'll add `dotenv` to the thirdparty website after it is approved.\r\n\r\nI need some help (probably from @fiveisprime) for the wording here.  These aren't exactly local settings and app settings.  While `.env` files are local, they are environment variables.  When the user uploads their local env vars to app settings, what should I refer to them as??  The titles on the commands are just placeholder for now.\r\n","created_at":"2018-12-11T02:29:18Z","updated_at":"2018-12-13T18:03:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"add6020b427178838ccd104950873d16a390159a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/779/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/statuses/0095c6ed5ffffc6f4f8b465a391706a869e8cb82","head":{"label":"Microsoft:nat/downloadEnv","ref":"nat/downloadEnv","sha":"0095c6ed5ffffc6f4f8b465a391706a869e8cb82","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":98935458,"node_id":"MDEwOlJlcG9zaXRvcnk5ODkzNTQ1OA==","name":"vscode-azureappservice","full_name":"Microsoft/vscode-azureappservice","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/vscode-azureappservice","description":"Azure App Service extension for VS Code","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-azureappservice","forks_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/deployments","created_at":"2017-07-31T22:30:17Z","updated_at":"2018-12-07T17:53:04Z","pushed_at":"2018-12-13T01:12:21Z","git_url":"git://github.com/Microsoft/vscode-azureappservice.git","ssh_url":"git@github.com:Microsoft/vscode-azureappservice.git","clone_url":"https://github.com/Microsoft/vscode-azureappservice.git","svn_url":"https://github.com/Microsoft/vscode-azureappservice","homepage":"https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice","size":1779,"stargazers_count":34,"watchers_count":34,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":22,"open_issues":108,"watchers":34,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"bcab843ed969cf5234a36e828ec91807249add41","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":98935458,"node_id":"MDEwOlJlcG9zaXRvcnk5ODkzNTQ1OA==","name":"vscode-azureappservice","full_name":"Microsoft/vscode-azureappservice","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/vscode-azureappservice","description":"Azure App Service extension for VS Code","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-azureappservice","forks_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-azureappservice/deployments","created_at":"2017-07-31T22:30:17Z","updated_at":"2018-12-07T17:53:04Z","pushed_at":"2018-12-13T01:12:21Z","git_url":"git://github.com/Microsoft/vscode-azureappservice.git","ssh_url":"git@github.com:Microsoft/vscode-azureappservice.git","clone_url":"https://github.com/Microsoft/vscode-azureappservice.git","svn_url":"https://github.com/Microsoft/vscode-azureappservice","homepage":"https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice","size":1779,"stargazers_count":34,"watchers_count":34,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":22,"open_issues":108,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779"},"html":{"href":"https://github.com/Microsoft/vscode-azureappservice/pull/779"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/779"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/issues/779/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/pulls/779/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-azureappservice/statuses/0095c6ed5ffffc6f4f8b465a391706a869e8cb82"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"EricJizbaMSFT"}}