提交 32282d2b 编写于 作者: K kieferrm 提交者: Kai Maetzel

GDPR classification for git extension

上级 8705413b
......@@ -264,6 +264,11 @@ export class CommandCenter {
});
if (!url) {
/* __GDPR__
"clone" : {
"outcome" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_URL' });
return;
}
......@@ -278,6 +283,11 @@ export class CommandCenter {
});
if (!parentPath) {
/* __GDPR__
"clone" : {
"outcome" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' });
return;
}
......@@ -295,14 +305,30 @@ export class CommandCenter {
const result = await window.showInformationMessage(localize('proposeopen', "Would you like to open the cloned repository?"), open);
const openFolder = result === open;
/* __GDPR__
"clone" : {
"outcome" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"openFolder": { "endPoint": "none", "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'success' }, { openFolder: openFolder ? 1 : 0 });
if (openFolder) {
commands.executeCommand('vscode.openFolder', Uri.file(repositoryPath));
}
} catch (err) {
if (/already exists and is not an empty directory/.test(err && err.stderr || '')) {
/* __GDPR__
"clone" : {
"outcome" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'directory_not_empty' });
} else {
/* __GDPR__
"clone" : {
"outcome" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'error' });
}
throw err;
......@@ -1315,6 +1341,11 @@ export class CommandCenter {
});
}
/* __GDPR__
"git.command" : {
"command" : { "endPoint": "none", "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryReporter.sendTelemetryEvent('git.command', { command: id });
return result.catch(async err => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册