Skip to content

Azure DevOps pull requests never show their labels #38008

Closed

Description

@shkreios

What happened

Azure DevOps pull requests that have labels show none in T3 Code. GitHub, GitLab and Forgejo PRs show their labels in the same view.

Diagnosis

The Azure DevOps provider hardcodes an empty label list, and the reason given in the code comment is wrong:

// packages/source-control-azure-devops/src/server/AzureDevOpsPullRequestProvider.ts:152
// Azure keeps labels on work items rather than on the pull request.
labels: [],

Azure DevOps PRs have their own labels, separate from work item tags. az repos pr list, which the pull requests page already calls (AzureDevOpsPullRequestCli.ts:419), returns them for each PR:

"labels": [{ "id": "<guid>", "name": "<label>", "active": true, "url": null }]

The decoder RawPullRequestSchema (azureDevOpsPullRequestJson.ts:29) has no labels field, so they're dropped while decoding. Note that az repos pr show --id <n> returns labels: null for the same PR, so a PR's detail view would need az repos pr label list --id <n> (or the REST pullRequests/{id}/labels endpoint) to get them.

The empty list dates from #4849 and hasn't changed since. #19261 added tags for Azure DevOps work items only.

Steps to reproduce

  1. In Azure DevOps, add a label to an active pull request (PR → Labels → add, e.g. release-1.0).
  2. Run az repos pr list --detect true --status active in the repo and check that the PR's labels array has the label.
  3. Open the repo's pull requests page in T3 Code.
  4. The PR has no label chips. A GitHub PR with labels shows them in the same view.

Version

0.1.11-nightly.20261117.4814 (desktop nightly); code checked on main @ 49c3ab8

Environment

macOS 15.7.1, desktop app with local server, Azure CLI 2.92.0 + azure-devops extension 1.0.2

Evidence

$ az repos pr list --detect true --status all --top 50 \
    --query "[?length(labels || `[]`) > `0`].{id:pullRequestId, labels:labels[].name}"
[ { "id": <n>, "labels": ["<label>"] }, ... ]   # several labelled PRs

$ az repos pr show --id <n> --query labels
null

Related issues

None found. #20056 (closed, unmerged) listed labels among many Azure DevOps features but was closed for its scope; it isn't a report of this bug.

Fix applied or workaround

None. Labels are only visible in Azure DevOps itself.

Filed by

Claude Code (claude-opus-5-5) in T3 Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions