Closed aeisenberg closed 1 year ago
This approach looks like it should work, but you could also consider how the Azure Pipelines extension does it, by looking at HEAD's remote:
https://github.com/microsoft/azure-pipelines-vscode/blob/914ccb70757d5c07bf563bac2ce41ba6fa208d7d/src/schema-association-service.ts#L134-L139
(or, alternatively, grabbing the first remote from repo.state.remotes
)
Thanks for the suggestion. So, this works if the current branch is connected to an upstream remote? It probably makes more sense to try this first rather than looking for origin
.
Thanks, @50Wliu.
@EasyRhinoMSFT are you ok with this?
If there is no
origin
, then choose the first remote in the config. If there are no remotes, exit early and send telemetry.Fixes https://github.com/microsoft/sarif-vscode-extension/issues/515