Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upload bug report by removing one call to encodeURIComponent #1931

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/features/GenerateBugReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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 @@ -35,37 +35,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 | ${sessionManager.HostVersion} |

### 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 @@ -78,7 +84,7 @@ ${this.generateExtensionTable(extensions)}
}

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

private generateExtensionTable(installedExtensions): string {
Expand Down