microsoft / azure-devops-extension-sdk

Client SDK for developing Azure DevOps extensions
MIT License
122 stars 38 forks source link

No way to find current repository id from code hub #102

Open snydergd opened 5 months ago

snydergd commented 5 months ago

I'd like to make an extension to help analyze and show information about a repository. Right now I'd like to do it using the code hub extension point.

When I navigate to my hub the current repository is shown in the repository selector at the top of the page. However, I've been unable to find an API method - either directly in the SDK, or in the services listed in CommonServiceIds that will provide the ID or name of the selected repository.

I've also done several searches including searching the issues here, and am unable to find any solution that way either. I did find this issue on the previous repository: https://github.com/microsoft/vss-web-extension-sdk/issues/114 -- But this does not provide a solution. IIt sounded like maybe it would be possible to get this using getConfiguration, getPageContext, or getWebContext, but when I try this they come back empty pageContext has webContext in it, but is otherwise empty).

For me, not having this means probably having my users go without the functionality that I was planning to create an extension for.

Is there some way for me to get this value? Can I somehow make it show up in the result of getPageContext or something like that?