Skip to content

Commit 667441c

Browse files
msivasubramaniaandgolovin
authored andcommitted
added issue report template for openshift.explorer.reportIssue command
Signed-off-by: msivasubramaniaan <[email protected]>
1 parent c8d8446 commit 667441c

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

resources/issueReport.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Describe the bug
2+
3+
## Expected Behavior
4+
<!--- What should happen -->
5+
6+
## Current Behavior
7+
<!--- What happens instead of the expected behavior -->
8+
9+
## Steps to Reproduce
10+
<!--- What steps can be done to reproduce -->
11+
1.
12+
2.
13+
3.
14+
15+
## Environment

src/explorer.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
} from 'vscode';
2121

2222
import * as path from 'path';
23+
import * as fs from 'fs';
2324
import { Platform } from './util/platform';
2425

2526
import { WatchUtil, FileContentChangeNotifier } from './util/watch';
@@ -253,7 +254,13 @@ export class OpenShiftExplorer implements TreeDataProvider<ExplorerItem>, Dispos
253254

254255
@vsCommand('openshift.explorer.reportIssue')
255256
static async reportIssue(): Promise<unknown> {
256-
return commands.executeCommand('vscode.open', Uri.parse(OpenShiftExplorer.issueUrl()));
257+
const extensionPath = path.resolve(__dirname, '..', '..');
258+
const templatePath = path.join(extensionPath,'resources', 'issueReport.md');
259+
const template = fs.readFileSync(templatePath, 'utf-8');
260+
return commands.executeCommand('workbench.action.openIssueReporter', {
261+
extensionId: 'redhat.vscode-openshift-connector',
262+
issueBody: template
263+
});
257264
}
258265

259266
@vsCommand('openshift.open.configFile')
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Describe the bug
2+
3+
## Expected Behavior
4+
<!--- What should happen -->
5+
6+
## Current Behavior
7+
<!--- What happens instead of the expected behavior -->
8+
9+
## Steps to Reproduce
10+
<!--- What steps can be done to reproduce -->
11+
1.
12+
2.
13+
3.
14+
15+
## Environment
16+
- [ ] Windows
17+
- [ ] Mac
18+
- [ ] Linux
19+
- [ ] other (please specify)

0 commit comments

Comments
 (0)