Add support for filing an issue on an extension within the issue reporter, #45673

This commit is contained in:
Rachel Macfarlane
2018-03-26 11:49:44 -07:00
parent d2d9d65efc
commit 60b9d1ba02
6 changed files with 122 additions and 101 deletions

View File

@@ -28,7 +28,8 @@ export interface IssueReporterData {
numberOfThemeExtesions?: number;
enabledNonThemeExtesions?: ILocalExtension[];
extensionsDisabled?: boolean;
reprosWithoutExtensions?: boolean;
fileOnExtension?: boolean;
selectedExtension?: ILocalExtension;
actualSearchResults?: ISettingSearchResult[];
query?: string;
filterResultCount?: number;
@@ -44,8 +45,7 @@ export class IssueReporterModel {
includeProcessInfo: true,
includeExtensions: true,
includeSearchedExtensions: true,
includeSettingsSearchDetails: true,
reprosWithoutExtensions: false
includeSettingsSearchDetails: true
};
this._data = initialData ? assign(defaultData, initialData) : defaultData;
@@ -64,7 +64,7 @@ export class IssueReporterModel {
Issue Type: <b>${this.getIssueTypeTitle()}</b>
${this._data.issueDescription}
${this.getExtensionVersion()}
VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
@@ -72,6 +72,14 @@ ${this.getInfos()}
<!-- generated by issue reporter -->`;
}
private getExtensionVersion(): string {
if (this._data.fileOnExtension) {
return `\nExtension version: ${this._data.selectedExtension.manifest.version}`;
} else {
return '';
}
}
private getIssueTypeTitle(): string {
if (this._data.issueType === IssueType.Bug) {
return 'Bug';
@@ -108,8 +116,6 @@ ${this.getInfos()}
if (this._data.includeExtensions) {
info += this.generateExtensionsMd();
}
info += this._data.reprosWithoutExtensions ? '\nReproduces without extensions' : '\nReproduces only with extensions';
}
if (this._data.issueType === IssueType.SettingsSearchIssue) {