Skip to content

Commit 572ca6c

Browse files
committed
enhance issue reporter with title and required description prompts
1 parent e305eff commit 572ca6c

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

src/extension.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,38 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron
447447
),
448448
commands.registerCommand('python-envs.reportIssue', async () => {
449449
try {
450+
// Prompt for issue title
451+
const title = await window.showInputBox({
452+
title: 'Report Issue - Title',
453+
prompt: 'Enter a brief title for the issue',
454+
placeHolder: 'e.g., Environment not detected, activation fails, etc.',
455+
ignoreFocusOut: true,
456+
});
457+
458+
if (!title) {
459+
// User cancelled or provided empty title
460+
return;
461+
}
462+
463+
// Prompt for issue description
464+
const description = await window.showInputBox({
465+
title: 'Report Issue - Description',
466+
prompt: 'Describe the issue in more detail',
467+
placeHolder: 'Provide additional context about what happened...',
468+
ignoreFocusOut: true,
469+
});
470+
471+
if (!description) {
472+
// User cancelled or provided empty description
473+
return;
474+
}
475+
450476
const issueData = await collectEnvironmentInfo(context, envManagers, projectManager);
451477

452478
await commands.executeCommand('workbench.action.openIssueReporter', {
453479
extensionId: 'ms-python.vscode-python-envs',
454-
issueTitle: '[Python Environments] ',
455-
issueBody: `<!-- Please describe the issue you're experiencing -->\n\n<!-- The following information was automatically generated -->\n\n<details>\n<summary>Environment Information</summary>\n\n\`\`\`\n${issueData}\n\`\`\`\n\n</details>`,
480+
issueTitle: `[Python Environments] ${title}`,
481+
issueBody: `## Description\n${description}\n\n## Steps to Reproduce\n1. \n2. \n3. \n\n## Expected Behavior\n\n\n## Actual Behavior\n\n\n<!-- The following information was automatically generated -->\n\n<details>\n<summary>Environment Information</summary>\n\n\`\`\`\n${issueData}\n\`\`\`\n\n</details>`,
456482
});
457483
} catch (error) {
458484
window.showErrorMessage(`Failed to open issue reporter: ${error}`);

0 commit comments

Comments
 (0)