From 41f014fb78cba5e517f4fb17a6e079fe2395dfc3 Mon Sep 17 00:00:00 2001 From: Katsute <58778985+Katsute@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:43:03 -0400 Subject: [PATCH 1/5] add id to issue form --- .github/ISSUE_TEMPLATE/bug.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index b55cc91c..fb90896d 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -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: | @@ -33,6 +35,7 @@ body: required: true - type: input + id: version attributes: label: Extension Version description: | @@ -49,6 +52,7 @@ body: required: true - type: textarea + id: settings attributes: label: Settings description: | From 3cf355cc88ef1e51d6610f980363a4a2b40eed5c Mon Sep 17 00:00:00 2001 From: Katsute <58778985+Katsute@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:41:16 -0400 Subject: [PATCH 2/5] autofill except config --- src/command/config.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/command/config.ts b/src/command/config.ts index cb47f400..ef6b331b 100644 --- a/src/command/config.ts +++ b/src/command/config.ts @@ -18,6 +18,8 @@ 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"; @@ -35,7 +37,7 @@ import * as glob from "../lib/glob"; // interface -const issues: vscode.Uri = vscode.Uri.parse(pkg.bugs.url); +const yt: vscode.Uri = vscode.Uri.parse("https://issues.katsute.dev/form/"); // TODO const sponsor: vscode.Uri = vscode.Uri.parse(pkg.sponsor.url); export const command: vscode.Disposable = vscode.commands.registerCommand("background.config", () => config()); @@ -118,8 +120,16 @@ export const config: () => void = () => { handle: () => vscode.commands.executeCommand("background.changelog") }), quickPickItem({ - label: `$(bug) Report an issue`, - handle: () => vscode.env.openExternal(issues) + label: `$(bug) Report an issue via email`, + handle: () => vscode.env.openExternal(yt) + }), + quickPickItem({ + label: `$(github) Report an issue via GitHub`, + handle: () => { + // TODO: config & glob parsing + matches + + 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)}`)); + } }), quickPickItem({ label: "$(heart) Sponsor this extension", From c4dbce7c8edea9a352a3ebbb9d3f392f2666088b Mon Sep 17 00:00:00 2001 From: Katsute <58778985+Katsute@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:28:59 -0400 Subject: [PATCH 3/5] autofill config --- src/command/config.ts | 7 ++----- src/vs/vsconfig.ts | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/command/config.ts b/src/command/config.ts index ef6b331b..f2571578 100644 --- a/src/command/config.ts +++ b/src/command/config.ts @@ -23,6 +23,7 @@ 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"; @@ -125,11 +126,7 @@ export const config: () => void = () => { }), quickPickItem({ label: `$(github) Report an issue via GitHub`, - handle: () => { - // TODO: config & glob parsing + matches - - 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)}`)); - } + 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)}&config=${encodeURI("```json\n" + JSON.stringify(cfg.config(), null, 4) + "\n```")}`)) }), quickPickItem({ label: "$(heart) Sponsor this extension", diff --git a/src/vs/vsconfig.ts b/src/vs/vsconfig.ts index aa7db161..1ee17c0c 100644 --- a/src/vs/vsconfig.ts +++ b/src/vs/vsconfig.ts @@ -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 From 116e84ef142b2b11eff2ce69e5d4a75c86eb280d Mon Sep 17 00:00:00 2001 From: Katsute <58778985+Katsute@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:31:47 -0400 Subject: [PATCH 4/5] fix id --- src/command/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/config.ts b/src/command/config.ts index f2571578..ad51ebba 100644 --- a/src/command/config.ts +++ b/src/command/config.ts @@ -126,7 +126,7 @@ export const config: () => void = () => { }), quickPickItem({ label: `$(github) Report an issue via 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)}&config=${encodeURI("```json\n" + JSON.stringify(cfg.config(), null, 4) + "\n```")}`)) + 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", From 3102c6b88146761bfc709e714b948a06f0e964ea Mon Sep 17 00:00:00 2001 From: Katsute <58778985+Katsute@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:40:22 -0400 Subject: [PATCH 5/5] move youtrack to later PR --- src/command/config.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/command/config.ts b/src/command/config.ts index ad51ebba..b73257ab 100644 --- a/src/command/config.ts +++ b/src/command/config.ts @@ -38,7 +38,6 @@ import * as glob from "../lib/glob"; // interface -const yt: vscode.Uri = vscode.Uri.parse("https://issues.katsute.dev/form/"); // TODO const sponsor: vscode.Uri = vscode.Uri.parse(pkg.sponsor.url); export const command: vscode.Disposable = vscode.commands.registerCommand("background.config", () => config()); @@ -121,11 +120,7 @@ export const config: () => void = () => { handle: () => vscode.commands.executeCommand("background.changelog") }), quickPickItem({ - label: `$(bug) Report an issue via email`, - handle: () => vscode.env.openExternal(yt) - }), - quickPickItem({ - label: `$(github) Report an issue via GitHub`, + 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({