{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments/165731673","pull_request_review_id":93723318,"id":165731673,"diff_hunk":"@@ -0,0 +1,18 @@\n+/*---------------------------------------------------------------------------------------------\r\n+ *  Copyright (c) Microsoft Corporation. All rights reserved.\r\n+ *  Licensed under the MIT License. See License.txt in the project root for license information.\r\n+ *--------------------------------------------------------------------------------------------*/\r\n+\r\n+import { AzureNode } from '../treeDataProvider/AzureNode';\r\n+\r\n+// returns the index of where the node should be inserted\r\n+export function insertionSearch(node: AzureNode, array: AzureNode[]): number {\r\n+\r\n+    // tslint:disable-next-line:no-increment-decrement\r\n+    for (let i: number = 0; i < array.length; i++) {\r","path":"ui/src/utils/insertionSearch.ts","position":12,"original_position":12,"commit_id":"53309bcccdbd4ca0a6a1cc3cf744e2fd4725a1fa","original_commit_id":"53309bcccdbd4ca0a6a1cc3cf744e2fd4725a1fa","user":{"login":"EricJizbaMSFT","id":11282622,"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 think we should discourage putting stuff in 'utils' whenever possible (otherwise it becomes a dumping ground). No strong opinion, but I don't think this for-loop warrants its own file","created_at":"2018-02-02T19:05:41Z","updated_at":"2018-02-02T19:06:27Z","html_url":"https://github.com/Microsoft/vscode-azuretools/pull/64#discussion_r165731673","pull_request_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/comments/165731673"},"html":{"href":"https://github.com/Microsoft/vscode-azuretools/pull/64#discussion_r165731673"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64","id":166677685,"html_url":"https://github.com/Microsoft/vscode-azuretools/pull/64","diff_url":"https://github.com/Microsoft/vscode-azuretools/pull/64.diff","patch_url":"https://github.com/Microsoft/vscode-azuretools/pull/64.patch","issue_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/64","number":64,"state":"open","locked":false,"title":"Insert created node alphabetically","user":{"login":"nturinski","id":5290572,"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":"Insertion sort is worst case O(n).  While a Binary sort would be faster, I don't know if the size of nodes would ever be large enough to notice a performance drop.\r\n\r\nFixes https://github.com/Microsoft/vscode-azureappservice/issues/260","created_at":"2018-02-01T23:10:34Z","updated_at":"2018-02-02T19:06:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08eacf103ef40d86ab8ecbba3a39b1f2a2da1748","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64/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/64/comments","statuses_url":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/53309bcccdbd4ca0a6a1cc3cf744e2fd4725a1fa","head":{"label":"Microsoft:nturinski/createNodeSort","ref":"nturinski/createNodeSort","sha":"53309bcccdbd4ca0a6a1cc3cf744e2fd4725a1fa","user":{"login":"Microsoft","id":6154722,"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,"name":"vscode-azuretools","full_name":"Microsoft/vscode-azuretools","owner":{"login":"Microsoft","id":6154722,"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},"private":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-02-01T01:53:26Z","pushed_at":"2018-02-02T00:49:35Z","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":229,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","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":8,"license":null,"forks":3,"open_issues":8,"watchers":6,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"ed48df254f870c0e7bcfbe4900c83f05c9b10e15","user":{"login":"Microsoft","id":6154722,"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,"name":"vscode-azuretools","full_name":"Microsoft/vscode-azuretools","owner":{"login":"Microsoft","id":6154722,"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},"private":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-02-01T01:53:26Z","pushed_at":"2018-02-02T00:49:35Z","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":229,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","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":8,"license":null,"forks":3,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64"},"html":{"href":"https://github.com/Microsoft/vscode-azuretools/pull/64"},"issue":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/64"},"comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/pulls/64/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/64/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vscode-azuretools/statuses/53309bcccdbd4ca0a6a1cc3cf744e2fd4725a1fa"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"EricJizbaMSFT"}}