{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments/232730474","pull_request_review_id":173991875,"id":232730474,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjczMDQ3NA==","diff_hunk":"@@ -39,24 +40,24 @@ export async function editScmType(client: SiteClient, node: AzureTreeItem): Prom\n     return newScmType;\n }\n \n-async function showScmPrompt(currentScmType: string): Promise<string> {\n+async function showScmPrompt(currentScmType: string): Promise<ScmType> {\n     const currentSource: string = localize('currentSource', '(Current source)');\n-    const scmQuickPicks: IAzureQuickPickItem<string | undefined>[] = [];\n+    const scmQuickPicks: IAzureQuickPickItem<ScmType | undefined>[] = [];\n     // generate quickPicks to not include current type\n     for (const scmType of Object.keys(ScmType)) {\n         if (scmType === currentScmType) {\n             // put the current source at the top of the list\n             scmQuickPicks.unshift({ label: scmType, description: currentSource, data: undefined });\n         } else {\n-            scmQuickPicks.push({ label: scmType, description: '', data: scmType });\n+            scmQuickPicks.push({ label: scmType, description: '', data: <ScmType>scmType });","path":"appservice/src/editScmType.ts","position":29,"original_position":29,"commit_id":"190ee0e223db1c21c6f4c1e95ea7445fc02648e5","original_commit_id":"190ee0e223db1c21c6f4c1e95ea7445fc02648e5","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":"Honestly there's a bug here and you're just getting lucky because the key and value are the same:\r\n```\r\nexport enum ScmType {\r\n    None = 'None', // default scmType\r\n    LocalGit = 'LocalGit',\r\n    GitHub = 'GitHub'\r\n}\r\n```\r\n\r\nIf your enum was like this it wouldn't work:\r\n```\r\nexport enum ScmType {\r\n    None = 'hi', // default scmType\r\n    LocalGit = 'nathan',\r\n    GitHub = 'wassup'\r\n}\r\n```\r\n\r\nYou have to do something like this:\r\n```\r\nfor (const key of Object.keys(ScmType)) {\r\n    const scmType = <ScmType>ScmType[key];\r\n    ...\r\n}\r\n```\r\n","created_at":"2018-11-12T16:41:15Z","updated_at":"2018-11-12T16:41:15Z","html_url":"https://github.com/Microsoft/vscode-azuretools/pull/311#discussion_r232730474","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments/232730474"},"html":{"href":"https://github.com/Microsoft/vscode-azuretools/pull/311#discussion_r232730474"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311"}},"in_reply_to_id":232435080},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311","id":229790012,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NzkwMDEy","html_url":"https://github.com/Microsoft/vscode-azuretools/pull/311","diff_url":"https://github.com/Microsoft/vscode-azuretools/pull/311.diff","patch_url":"https://github.com/Microsoft/vscode-azuretools/pull/311.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/311","number":311,"state":"open","locked":false,"title":"editScmType with ScmType typedef and programmatic option","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":"We'll need to edit the scmType of apps without user input (ie connecting/disconnecting to a GitHub repo) so this is necessary.  Without a scmType, it will run as per usual.\r\n\r\nAlso new function that detects whether or not the user has a repo in their project and if that repo is a GitHub remote.  This may be used to suggest a LocalGit/GitHub deploy in the future, but for now I'd want to see how many `zipdeploys` we have that are .git projects.","created_at":"2018-11-09T19:06:22Z","updated_at":"2018-11-12T16:41:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2d9b7b108d0627939f46dcbcf9cbad96cae1efe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/311/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/190ee0e223db1c21c6f4c1e95ea7445fc02648e5","head":{"label":"Microsoft:nat/SCMConfiguration","ref":"nat/SCMConfiguration","sha":"190ee0e223db1c21c6f4c1e95ea7445fc02648e5","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":106758861,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY3NTg4NjE=","name":"vscode-azuretools","full_name":"Microsoft/vscode-azuretools","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-azuretools","description":"Common packages for building Azure extensions for VS Code","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-azuretools","forks_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/deployments","created_at":"2017-10-13T00:27:20Z","updated_at":"2018-11-12T09:04:20Z","pushed_at":"2018-11-10T01:24:56Z","git_url":"git://github.com/Microsoft/vscode-azuretools.git","ssh_url":"git@github.com:Microsoft/vscode-azuretools.git","clone_url":"https://github.com/Microsoft/vscode-azuretools.git","svn_url":"https://github.com/Microsoft/vscode-azuretools","homepage":null,"size":742,"stargazers_count":15,"watchers_count":15,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":31,"watchers":15,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"afb35885c4aba73ea889b169e6dccc54f9254eb1","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":106758861,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY3NTg4NjE=","name":"vscode-azuretools","full_name":"Microsoft/vscode-azuretools","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-azuretools","description":"Common packages for building Azure extensions for VS Code","fork":false,"url":"https://api.github.com/repos/Microsoft/vscode-azuretools","forks_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/forks","keys_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/teams","hooks_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/events","assignees_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/tags","blobs_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/subscription","commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/merges","archive_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/downloads","issues_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/deployments","created_at":"2017-10-13T00:27:20Z","updated_at":"2018-11-12T09:04:20Z","pushed_at":"2018-11-10T01:24:56Z","git_url":"git://github.com/Microsoft/vscode-azuretools.git","ssh_url":"git@github.com:Microsoft/vscode-azuretools.git","clone_url":"https://github.com/Microsoft/vscode-azuretools.git","svn_url":"https://github.com/Microsoft/vscode-azuretools","homepage":null,"size":742,"stargazers_count":15,"watchers_count":15,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":31,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311"},"html":{"href":"https://github.com/Microsoft/vscode-azuretools/pull/311"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/311"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/311/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/311/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/190ee0e223db1c21c6f4c1e95ea7445fc02648e5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"EricJizbaMSFT"}}