Skip to content

Commit

Permalink
Fix upload bug report (#1931)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt committed May 2, 2019
1 parent 0127ee2 commit e71ae5c
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/features/GenerateBugReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const extensions =
vscode.extensions.all.filter((element) => element.packageJSON.isBuiltin === false)
.sort((leftside, rightside): number => {
if (leftside.packageJSON.name.toLowerCase() < rightside.packageJSON.name.toLowerCase()) {
return -1;
return -1;
}
if (leftside.packageJSON.name.toLowerCase() > rightside.packageJSON.name.toLowerCase()) {
return 1;
Expand All @@ -37,37 +37,43 @@ export class GenerateBugReportFeature implements IFeature {
constructor(private sessionManager: SessionManager) {
this.command = vscode.commands.registerCommand("PowerShell.GenerateBugReport", () => {

const body = encodeURIComponent(`## Issue Description ##
const body = `Issue Description
=====
I am experiencing a problem with...
## Attached Logs ##
Attached Logs
=====
Follow the instructions in the [README](https://github.com/PowerShell/vscode-powershell#reporting-problems) about
capturing and sending logs.
## Environment Information ##
Environment Information
=====
### Visual Studio Code ###
Visual Studio Code
-----
| Name | Version |
| --- | --- |
| Operating System | ${os.type()} ${os.arch()} ${os.release()} |
| VSCode | ${vscode.version}|
| PowerShell Extension Version | ${extensionVersion} |
### PowerShell Information ###
PowerShell Information
-----
${this.getRuntimeInfo()}
### Visual Studio Code Extensions ###
Visual Studio Code Extensions
-----
<details><summary>Visual Studio Code Extensions(Click to Expand)</summary>
${this.generateExtensionTable(extensions)}
</details>
`);
`;

const encodedBody = encodeURIComponent(body);
const fullUrl = `${issuesUrl}${queryStringPrefix}body=${encodedBody}`;
Expand All @@ -80,7 +86,7 @@ ${this.generateExtensionTable(extensions)}
}

public setLanguageClient(languageclient: LanguageClient) {
// Elimiinate tslint warning.
// Eliminate tslint warning.
}

private generateExtensionTable(installedExtensions): string {
Expand Down

0 comments on commit e71ae5c

Please sign in to comment.