Skip to content

Pull request branch view shows "Unable to find a remote" for Azure DevOps repositories #5068

@nikolay-1986

Description

@nikolay-1986

Summary

When expanding a pull request node in the Branches or Remotes view for an Azure DevOps repository, GitLens displays "Unable to find a remote for '[owner]'" with a question mark icon. Clicking the icon does nothing. The pull request details cannot be viewed.

Steps to Reproduce

  1. Connect the Azure DevOps integration in GitLens
  2. Open a workspace with a locally cloned Azure DevOps repository
  3. Open the Branches or Remotes view in GitLens
  4. Expand a branch that has an associated pull request
  5. Click on the pull request node to expand it

Expected Behavior

The pull request details (commits, files changed) are shown inside the tree node.

Actual Behavior

The tree node shows:
Unable to find a remote for '[organization-name]'
with a ? icon. Clicking the icon does nothing — no prompt to add a remote, no error message.

Image
Azure.PR.isn.t.loaded.mp4

Environment

  • GitLens version: 2026.3.2505

  • VS Code version:
    Version: 1.112.0 (user setup)
    Commit: 07ff9d6178ede9a1bd12ad3399074d726ebe6e43
    Date: 2026-03-17T18:09:23Z
    Electron: 39.8.0
    ElectronBuildId: 13470701
    Chromium: 142.0.7444.265
    Node.js: 22.22.0
    V8: 14.2.231.22-electron.0
    OS: Windows_NT x64 10.0.26200

  • Azure DevOps: cloud (dev.azure.com)

  • Repository remote URL format: https://<username>@dev.azure.com/<org>/<project>/_git/<repo>

Additional Context

The issue is not caused by a missing remote or authentication failure. The pull request is successfully fetched from the Azure DevOps API (visible in the branch node), and the "Open Pull Request on Remote" action correctly opens the PR URL in the browser.

The pull request details panel fails to load because the Azure DevOps API response for the pullRequests list endpoint returns an embedded repository object that does not include the webUrl field. GitLens relies on repository.webUrl to resolve the remote URL for matching against locally configured git remotes. When this field is absent (undefined), the remote matching logic fails immediately, and the "Add Remote" command handler also silently exits without prompting the user.

This affects all non-fork Azure DevOps pull requests fetched via the branch view.

Metadata

Metadata

Assignees

Labels

area-integrationsIssues or features related to integrationsintegration-azureIssues or features related to Azure DevOps integrationstriageNeeds to be looked at

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions