Skip to content

Commit 7a76c2b

Browse files
authored
Include isCopilot in openDescription telemetry (#7515)
Part of #7513
1 parent ae9738b commit 7a76c2b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/commands.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ export async function openDescription(
137137
// Create and show a new webview
138138
if (issue instanceof PullRequestModel) {
139139
await PullRequestOverviewPanel.createOrShow(telemetry, folderManager.context.extensionUri, folderManager, issue, undefined, preserveFocus);
140-
/* __GDPR__
141-
"pr.openDescription" : {}
142-
*/
143-
telemetry.sendTelemetryEvent('pr.openDescription');
144140
} else {
145141
await IssueOverviewPanel.createOrShow(telemetry, folderManager.context.extensionUri, folderManager, issue);
146142
/* __GDPR__

src/github/pullRequestOverview.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
88
import { OpenCommitChangesArgs } from '../../common/views';
99
import { openPullRequestOnGitHub } from '../commands';
1010
import { IComment } from '../common/comment';
11-
import { copilotEventToStatus, CopilotPRStatus, mostRecentCopilotEvent } from '../common/copilot';
11+
import { COPILOT_LOGINS, copilotEventToStatus, CopilotPRStatus, mostRecentCopilotEvent } from '../common/copilot';
1212
import { commands, contexts } from '../common/executeCommands';
1313
import { disposeAll } from '../common/lifecycle';
1414
import Logger from '../common/logger';
@@ -67,6 +67,14 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
6767
toTheSide: boolean = false,
6868
preserveFocus: boolean = true
6969
) {
70+
71+
/* __GDPR__
72+
"pr.openDescription" : {
73+
"isCopilot" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
74+
}
75+
*/
76+
telemetry.sendTelemetryEvent('pr.openDescription', { isCopilot: (issue.author.login === COPILOT_LOGINS[1]) ? 'true' : 'false' });
77+
7078
const activeColumn = toTheSide
7179
? vscode.ViewColumn.Beside
7280
: vscode.window.activeTextEditor

0 commit comments

Comments
 (0)