{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/comments/151232668","pull_request_review_id":76907566,"id":151232668,"diff_hunk":"@@ -0,0 +1,90 @@\n+import { Injectable } from '@angular/core';\n+import { IMessageFlowProvider } from '../../interfaces/imessageflowprovider';\n+import { Message, TextMessage, ButtonActionType, ButtonListMessage, MessageSender } from '../../models/message';\n+import { MessageGroup } from '../../models/message-group';\n+import { RegisterMessageFlowWithFactory } from '../message-flow.factory';\n+import { SolutionsMessage } from '../../common/solutions-message/solutions-message.component';\n+import { GraphMessage } from '../../common/graph-message/graph-message.component';\n+import { ProblemStatementMessage } from '../../common/problem-statement-message/problem-statement-message.component';\n+import { AppAnalysisService, AuthService } from '../../../shared/services';\n+import { IDetectorResponse } from '../../../shared/models/detectorresponse';\n+\n+\n+@Injectable()\n+@RegisterMessageFlowWithFactory()\n+export class CpuAnalysisChatFlow implements IMessageFlowProvider {\n+\n+    public cpuDetectorResponse: IDetectorResponse;\n+\n+    private subscription;\n+    private resourceGroup;\n+    private siteName;\n+    private slotName;\n+\n+    constructor(private _appAnalysisService: AppAnalysisService, private _authService: AuthService) {\n+        this._authService.getStartupInfo().subscribe(info => {\n+            let pieces = info.resourceId.toLowerCase().split('/');\n+            this.subscription = pieces[pieces.indexOf('subscriptions') + 1];\n+            this.resourceGroup = pieces[pieces.indexOf('resourcegroups') + 1];\n+            this.siteName = pieces[pieces.indexOf('sites') + 1];","path":"app/supportbot/message-flow/cpu-analysis-chat/cpu-analysis-chat-flow.ts","position":29,"original_position":29,"commit_id":"cd217759e02fd5365ce89ab32b8f3f237c795684","original_commit_id":"cd217759e02fd5365ce89ab32b8f3f237c795684","user":{"login":"ShekharGupta1988","id":11183841,"avatar_url":"https://avatars3.githubusercontent.com/u/11183841?v=4","gravatar_id":"","url":"https://api.github.com/users/ShekharGupta1988","html_url":"https://github.com/ShekharGupta1988","followers_url":"https://api.github.com/users/ShekharGupta1988/followers","following_url":"https://api.github.com/users/ShekharGupta1988/following{/other_user}","gists_url":"https://api.github.com/users/ShekharGupta1988/gists{/gist_id}","starred_url":"https://api.github.com/users/ShekharGupta1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShekharGupta1988/subscriptions","organizations_url":"https://api.github.com/users/ShekharGupta1988/orgs","repos_url":"https://api.github.com/users/ShekharGupta1988/repos","events_url":"https://api.github.com/users/ShekharGupta1988/events{/privacy}","received_events_url":"https://api.github.com/users/ShekharGupta1988/received_events","type":"User","site_admin":false},"body":"maybe add this logic somewhere in common utilities class that can be utilized by anyone. I had a same functionality in one of my components (not yet checked in)","created_at":"2017-11-15T19:46:31Z","updated_at":"2017-11-15T19:46:35Z","html_url":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40#discussion_r151232668","pull_request_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/comments/151232668"},"html":{"href":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40#discussion_r151232668"},"pull_request":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40","id":152853570,"html_url":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40","diff_url":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40.diff","patch_url":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40.patch","issue_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/40","number":40,"state":"open","locked":false,"title":"Better solutions","user":{"login":"stevenernst131","id":7739017,"avatar_url":"https://avatars2.githubusercontent.com/u/7739017?v=4","gravatar_id":"","url":"https://api.github.com/users/stevenernst131","html_url":"https://github.com/stevenernst131","followers_url":"https://api.github.com/users/stevenernst131/followers","following_url":"https://api.github.com/users/stevenernst131/following{/other_user}","gists_url":"https://api.github.com/users/stevenernst131/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenernst131/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenernst131/subscriptions","organizations_url":"https://api.github.com/users/stevenernst131/orgs","repos_url":"https://api.github.com/users/stevenernst131/repos","events_url":"https://api.github.com/users/stevenernst131/events{/privacy}","received_events_url":"https://api.github.com/users/stevenernst131/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-15T18:41:07Z","updated_at":"2017-11-15T19:46:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d61ab53808d3c79247d33d35deb58d8dc361b32","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40/commits","review_comments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40/comments","review_comment_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/40/comments","statuses_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/statuses/cd217759e02fd5365ce89ab32b8f3f237c795684","head":{"label":"Azure:better-solutions","ref":"better-solutions","sha":"cd217759e02fd5365ce89ab32b8f3f237c795684","user":{"login":"Azure","id":6844498,"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":100755397,"name":"Azure-WebApps-Support-Center","full_name":"Azure/Azure-WebApps-Support-Center","owner":{"login":"Azure","id":6844498,"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},"private":false,"html_url":"https://github.com/Azure/Azure-WebApps-Support-Center","description":"Azure Web Apps Support Center provides developers with various features to troubleshoot their applications hosted on App Service.","fork":false,"url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center","forks_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/forks","keys_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/teams","hooks_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/hooks","issue_events_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/events","assignees_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/tags","blobs_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/languages","stargazers_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/stargazers","contributors_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/contributors","subscribers_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/subscribers","subscription_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/subscription","commits_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/merges","archive_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/downloads","issues_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/labels{/name}","releases_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/deployments","created_at":"2017-08-18T22:44:50Z","updated_at":"2017-11-02T22:30:35Z","pushed_at":"2017-11-15T18:41:07Z","git_url":"git://github.com/Azure/Azure-WebApps-Support-Center.git","ssh_url":"git@github.com:Azure/Azure-WebApps-Support-Center.git","clone_url":"https://github.com/Azure/Azure-WebApps-Support-Center.git","svn_url":"https://github.com/Azure/Azure-WebApps-Support-Center","homepage":null,"size":298,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"783c6e11342968190a9f2fdf7c2e6a17452a7d0c","user":{"login":"Azure","id":6844498,"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":100755397,"name":"Azure-WebApps-Support-Center","full_name":"Azure/Azure-WebApps-Support-Center","owner":{"login":"Azure","id":6844498,"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},"private":false,"html_url":"https://github.com/Azure/Azure-WebApps-Support-Center","description":"Azure Web Apps Support Center provides developers with various features to troubleshoot their applications hosted on App Service.","fork":false,"url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center","forks_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/forks","keys_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/teams","hooks_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/hooks","issue_events_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/events","assignees_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/tags","blobs_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/languages","stargazers_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/stargazers","contributors_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/contributors","subscribers_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/subscribers","subscription_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/subscription","commits_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/merges","archive_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/downloads","issues_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/labels{/name}","releases_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/deployments","created_at":"2017-08-18T22:44:50Z","updated_at":"2017-11-02T22:30:35Z","pushed_at":"2017-11-15T18:41:07Z","git_url":"git://github.com/Azure/Azure-WebApps-Support-Center.git","ssh_url":"git@github.com:Azure/Azure-WebApps-Support-Center.git","clone_url":"https://github.com/Azure/Azure-WebApps-Support-Center.git","svn_url":"https://github.com/Azure/Azure-WebApps-Support-Center","homepage":null,"size":298,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40"},"html":{"href":"https://github.com/Azure/Azure-WebApps-Support-Center/pull/40"},"issue":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/40"},"comments":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/Azure-WebApps-Support-Center/statuses/cd217759e02fd5365ce89ab32b8f3f237c795684"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ShekharGupta1988"}}