Skip to content

Commit

Permalink
Issue reporter uses name and publisher id (#24570)
Browse files Browse the repository at this point in the history
Fixes #23126
  • Loading branch information
karthiknadig authored Dec 10, 2024
1 parent 91a74e8 commit 01e745d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/client/common/application/commands/reportIssueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,18 @@ export class ReportIssueCommandHandler implements IExtensionSingleActivationServ
const installedExtensions = getExtensions()
.filter((extension) => !extension.id.startsWith('vscode.'))
.sort((a, b) => {
if (a.packageJSON.displayName && b.packageJSON.displayName) {
return a.packageJSON.displayName.localeCompare(b.packageJSON.displayName);
if (a.packageJSON.name && b.packageJSON.name) {
return a.packageJSON.name.localeCompare(b.packageJSON.name);
}
return a.id.localeCompare(b.id);
})
.map(
(extension) =>
`|${extension.packageJSON.displayName}|${extension.id}|${extension.packageJSON.version}|`,
);
.map((extension) => {
let publisher: string = extension.packageJSON.publisher as string;
if (publisher) {
publisher = publisher.substring(0, 3);
}
return `|${extension.packageJSON.name}|${publisher}|${extension.packageJSON.version}|`;
});

await this.commandManager.executeCommand('workbench.action.openIssueReporter', {
extensionId: 'ms-python.python',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ pipenvPath: "<placeholder>"

|Extension Name|Extension Id|Version|
|---|---|---|
|Python|ms-python.python|2020.2|
|python|ms-|2020.2|
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ venvPath: "<placeholder>"

|Extension Name|Extension Id|Version|
|---|---|---|
|Python|ms-python.python|2020.2|
|python|ms-|2020.2|
</details>
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ suite('Report Issue Command', () => {
packageJSON: {
displayName: 'Python',
version: '2020.2',
name: 'python',
publisher: 'ms-python',
},
},
]);
Expand Down

0 comments on commit 01e745d

Please sign in to comment.