Skip to content

Add a "Report a problem on GitHub" command that automates filing a bug on GitHub #820

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

Closed
daviwil opened this issue Jun 1, 2017 · 16 comments · Fixed by #963
Closed

Add a "Report a problem on GitHub" command that automates filing a bug on GitHub #820

daviwil opened this issue Jun 1, 2017 · 16 comments · Fixed by #963
Labels
Issue-Enhancement A feature request (enhancement).

Comments

@daviwil
Copy link
Contributor

daviwil commented Jun 1, 2017

We need a command that will make it super easy for users to file new issues on GitHub so that they don't have to manually gather details on versions and environment information. I imagine this will be a combination of TypeScript and PowerShell code. @rkeithhill has started some of the PowerShell side code in PowerShell Editor Services.

You can see how VS Code generates their issue data here:

https://github.com/Microsoft/vscode/blob/f1f3f60e300abae4055a2a9fe3c40c63be5a8e82/src/vs/workbench/electron-browser/actions.ts#L704

@PowerSchill has expressed an interest in working on this :)

@rkeithhill
Copy link
Contributor

FWIW now that I'm a bit more node knowledgeable, I would rip all that stuff out of PSES and do the version gathering and log dir compression in the extension. There is a node archiver module that can be used to do the log dir compression. And we can get the PSES version from the sessionManager.

The problem with relying on PSES is that sometimes the issue is that PSES never started. :-)

@daviwil
Copy link
Contributor Author

daviwil commented Jun 1, 2017

Yep, it's true that there are cases where PSES won't be started, but my approach would be to provide a command in the PSES module that can be run in plain old powershell.exe without requiring an actual session to be active.

The problem with using the Node.js archiver module is that we'd have to get OSS appoval to use it, so it's probably better to continue using what we have available in PowerShell for zipping the log files.

@rkeithhill
Copy link
Contributor

Ah, so no need to wire up a PSES request to trigger and get data back to the extension. We would just spawn PowerShell with the PSES command, right?

@daviwil
Copy link
Contributor Author

daviwil commented Jun 1, 2017

Yep, exactly! We would run whichever PowerShell the user had configured just long enough to run that command and scrape its output.

@daviwil
Copy link
Contributor Author

daviwil commented Jun 1, 2017

Let's give @PowerSchill a shot at implementing this so that he can get comfortable contributing features :)

@PowerSchill
Copy link
Contributor

Making progress... Is it acceptable to exclude the builtin extensions from extension list or do you feel it is useful to leave them included?

@daviwil
Copy link
Contributor Author

daviwil commented Jun 3, 2017

Let's exclude for now, I think it's only useful to know the non-standard extensions the user has. Awesome that you're making progress!

@PowerSchill
Copy link
Contributor

I have created the code for creating the bug report. When selected it will collect the information below and open a new issue in the GitHub project. There is still some cleanup involved as well as handling log files. Is there any adjustments anyone see needed?

Below is the output generated from running the code on my own system.

Issue Description

I am experiencing a problem with...

Attached Logs

Follow the instructions in the README about capturing and sending logs.

Environment Information

Visual Studio Code

Name Version
Operating System Darwin x64 16.6.0
VSCode 1.14.0-insider
PowerShell Extension Version 1.4.1
PSES

PowerShell Information

Name Value
PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
GitCommitId v6.0.0-beta.2
OS Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017, root:xnu-3789.60.24~6/RELEASE_X86_64
Platform Unix
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Extension Author Version
alignment annsk 0.3.0
beautify HookyQR 1.1.1
Bookmarks alefragnani 0.15.2
bracketselection guosong 1.0.3
Chef Pendrica 0.6.3
cobalt2-Theme kamranmackey 0.0.3
code-runner formulahendry 0.6.24
code-settings-sync Shan 2.8.2
code-spell-checker streetsidesoftware 1.2.1
compulim-vscode-closetag Compulim 1.1.0
copy-github-url mattlott 0.1.0
copy-markdown-as-html jerriepelser 1.0.0
csharp ms-vscode 1.11.0
expand-region letrieu 0.0.3
fontsize-shortcuts peterjuras 1.3.0
gc-excelviewer GrapeCity 1.1.15
githistory donjayamanne 0.2.1
gitignore codezombiech 0.5.0
gitignore michelemelluso 1.0.1
gitlens eamodio 4.3.1
indenticator SirTori 0.4.2
inspec burtlo 0.1.2
intelligence-change-case zhengxiaoyao0716 1.1.0
java redhat 0.7.0
join-lines wmaurer 0.2.2
licenser ymotongpoo 1.0.0
markdown-shortcuts mdickin 0.8.1
markdown-table-formatter josa 0.2.3
markdown-toc AlanWalk 1.5.5
Material-theme zhuangtongfa 2.9.1
path-intellisense christian-kohler 1.4.2
PowerShell ms-vscode 1.4.1
prettify-json mohsen1 0.0.3
python donjayamanne 0.6.7
sublime-keybindings ms-vscode 2.9.0
theme-material-ocean-next-plus fthiagogv 0.0.14
theme-sapphire Tyriar 0.2.1
todotasks sandy081 0.5.0
transpose v4run 0.0.5
tslint eg2 0.16.0
vscode-gist dbankier 0.5.3
vscode-icons robertohuertasm 7.10.1
vscode-markdownlint DavidAnson 0.9.1
vscode-paste-and-indent Rubymaniac 0.0.8
vscode-paste-image mushan 0.9.4
vscode-table-formatter shuworks 1.1.2
vscode-todo-parser minhthai 1.8.10
xml DotJoshJohnson 1.9.2

@rkeithhill
Copy link
Contributor

Any chance we can automatically attach the logs via a zip file?

@PowerSchill
Copy link
Contributor

I will look into it but I don't know that it is possible to attach a file to the issue via URL. If that is in fact the case then I might just have to create the zip and then instruct the user to attach it to the ticket manually.

@rkeithhill
Copy link
Contributor

At one point I thought @daviwil said there was a way to upload attachments to GitHub but I don't see it in the v3 REST API.

Dude, that is quite the list of extensions you have installed. :-) I wonder if we should put the VSCode extensions list in a collapsible section? E.g.:

Visual Studio Code Extension (click to expand) ...

Not all browsers support this HTML tag (Edge doesn't) but FireFox does and I suspect Chrome does as well.

@PowerSchill
Copy link
Contributor

I added the code to collapse the extension listing.

@rkeithhill
Copy link
Contributor

Good news on the Edge front. Just installed today's Windows 10 Insider build and Edge displays the "details" section as collapsed.

@daviwil daviwil modified the milestones: June 2017, July 2017 Jul 11, 2017
@PowerSchill
Copy link
Contributor

In logging.ts there are comments about it not being easy to open the logs in the operating system file browser. Is that still the case?

@daviwil
Copy link
Contributor Author

daviwil commented Jul 11, 2017

Yeah, there isn't an API to open the native file browser for each platform. We could try to do it manually but it'd require having unique code for Windows, macOS, and Linux.

I could have sworn I had seen an API for attaching a file to an issue, but looks like it never existed!

@PowerSchill
Copy link
Contributor

@daviwil In relation to the above conversation about compression can we use the Node zlib library without legal issues? Also would that be a function better at home with the Logger class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants