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

Autofill bug reports #222

Merged
merged 5 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ body:
If your VSCode is blank or stops working please check [here](https://github.com/KatsuteDev/Background#%EF%B8%8F-vscode-stopped-working) first.

- type: input
id: os
attributes:
label: Operating System
validations:
required: true

- type: input
id: vs
attributes:
label: VSCode Version
description: |
Expand All @@ -33,6 +35,7 @@ body:
required: true

- type: input
id: version
attributes:
label: Extension Version
description: |
Expand All @@ -49,6 +52,7 @@ body:
required: true

- type: textarea
id: settings
attributes:
label: Settings
description: |
Expand Down
8 changes: 5 additions & 3 deletions src/command/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@

import * as vscode from "vscode";

import * as os from "os";

import { get, UI } from "../vs/vsconfig";
import { pkg } from "../vs/package";
import { quickPickItem, separator, showQuickPick } from "../vs/quickpick";
import * as cfg from "../vs/vsconfig";

import * as file from "./config/file";
import * as align from "./config/align";
Expand All @@ -35,7 +38,6 @@ import * as glob from "../lib/glob";

// interface

const issues: vscode.Uri = vscode.Uri.parse(pkg.bugs.url);
const sponsor: vscode.Uri = vscode.Uri.parse(pkg.sponsor.url);

export const command: vscode.Disposable = vscode.commands.registerCommand("background.config", () => config());
Expand Down Expand Up @@ -118,8 +120,8 @@ export const config: () => void = () => {
handle: () => vscode.commands.executeCommand("background.changelog")
}),
quickPickItem({
label: `$(bug) Report an issue`,
handle: () => vscode.env.openExternal(issues)
label: `$(github) Report an issue on GitHub`,
handle: () => vscode.env.openExternal(vscode.Uri.parse(`https://github.com/KatsuteDev/Background/issues/new?template=bug.yml&os=${encodeURI(`${os.platform()} ${os.release()}`)}&vs=${encodeURI(vscode.version)}&version=${encodeURI(pkg.version)}&settings=${encodeURI("```json\n" + JSON.stringify(cfg.config(), null, 4) + "\n```")}`))
}),
quickPickItem({
label: "$(heart) Sponsor this extension",
Expand Down
2 changes: 1 addition & 1 deletion src/vs/vsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { round } from "../lib/round";

// vs

const config: () => vscode.WorkspaceConfiguration = () => vscode.workspace.getConfiguration("background");
export const config: () => vscode.WorkspaceConfiguration = () => vscode.workspace.getConfiguration("background");

// UI

Expand Down