-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Try out the Issue Reporter UriHandler Proposed API #180757
Comments
Having trouble getting this API to work. Not sure if #180890 is the root cause but I'm also seeing: I added logging to confirm my provider is invoked in this case, but I still see the original issue reporter template instead of a link to my custom url |
Same here. |
I'm not sure why |
@roblourens I've a feeling this API is going to change but the idea of returning a dynamic URL allows the extension to encode additional data into the query parameters |
I agree from a consistency POV. We already have two ways to support issue reporting: the package-json field, and an API command to open the reporter directly I am hesitant to support a third completely different approach. Maybe we allow extensions to add a command to the package-json bugs property which we will invoke when filing an issue against the extension. Albeit less strongly typed it does allow for dynamic computation of data and/or uris. As a bonus it avoids the need for an activation event and is more similar to the solutions that are already in use |
@jrieken neither of those (static contribution/command) help if you want to provide environment specific data and the user has clicked |
Allowing a command for the bugs property doesn't allow for good fallback behavior for when the extension fails to activate. Today, if an extension fails to return an issue url, we fall back to the Maybe we could add another property to |
Pretty sure a command can do that |
Im just clearing up the reason for such an API. The "API" as we have it today is not sufficient. A command would do the trick and you've already called out the issues with that approach. |
Refs: #46726
Complexity: 4
Create Issue
First off, before we get into any good stuff, I'd like to to try out the Issue Reporter (
Help: Report Issue...
) and make sure I didn't break it at all. I refactored quite a bit moving away from raw IPC calls so it's possible that I missed a detail. Do a general smoke test, how ever you interpret that.Now for the fun part... this iteration we've introduced a new proposed API:
You can use this in your extension by adding this to your extension manifest (package.json):
and then run:
npx vscode-dts dev
which will fetch the proposed API and allow you to see types.So, the general idea is that when the Issue Reporter has selected an extension that implements this API, then the
handleIssueUrlRequest
will be fired and you want to return aUri
that you want to be opened... some examples:https://github.com/microsoft/vscode/issues/new/choose
https://github.com/orgs/community/discussions/new?category=codespaces
if you figure out how to fill in the body via query parameters in that new discussion form, tell me! I can't figure it out!https://github.com/PowerShell/vscode-powershell/issues/new?assignees=&labels=Issue-Bug&template=bug-report.yml&summary=hi&powershell-version=7
note that you can fill in some values via query parameters.When you use this API, the Issue Reporter will say that this extension uses an External Issue Reporter to handle issues and provides a big blue button to get to that issue experience. Make sure:
Let me know what you think overall!
Note: you must adopt this in an external extension (not a built-in to VS Code one)
Helpful links
The text was updated successfully, but these errors were encountered: