Skip to content

Commit ee3ff94

Browse files
authored
Include isCopilot in openDescription telemetry (#7514)
Part of #7513
1 parent b35448f commit ee3ff94

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/commands.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ export async function openDescription(
157157
// Create and show a new webview
158158
if (issue instanceof PullRequestModel) {
159159
await PullRequestOverviewPanel.createOrShow(telemetry, folderManager.context.extensionUri, folderManager, issue, undefined, preserveFocus);
160-
/* __GDPR__
161-
"pr.openDescription" : {}
162-
*/
163-
telemetry.sendTelemetryEvent('pr.openDescription');
164160
} else {
165161
await IssueOverviewPanel.createOrShow(telemetry, folderManager.context.extensionUri, folderManager, issue);
166162
/* __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)