@devries-cameron20 / t3code-1 / commits / df13391fb1
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(azure-devops): a fork's same-named branch no longer hides the branch's own pull request (#29817)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Alex Southwell committed Nov 6, 2026 at 19:42 UTC df13391fb1b321b810cfab0e721ca858c65b931f
2 files changed +23
packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.test.ts
+18
@@ -1,8 +1,11 @@
1 import { processOutput } from "@t3tools/source-control-testing/TestSourceControlHost";
2 import { assert, it } from "@effect/vitest";
3 +import * as Effect from "effect/Effect";
4 +import * as Layer from "effect/Layer";
5 import * as Option from "effect/Option";
6 import { ChildProcessSpawner } from "effect/process";
7
8 +import * as AzureDevOpsCli from "./AzureDevOpsCli.ts";
9 import * as AzureDevOpsSourceControlProvider from "./AzureDevOpsSourceControlProvider.ts";
10
11 const { parseAuth } = AzureDevOpsSourceControlProvider.discovery;
@@ -25,3 +28,18 @@ it("reads the signed-in Azure account and says when az is signed out", () => {
28 );
29 assert.strictEqual(parseAuth(processOutput("\n")).status, "unknown");
30 });
31 +
32 +it.effect(
33 + "looks up a branch's pull requests a full page at a time, past forks' same-named branches",
34 + () =>
35 + Effect.gen(function* () {
36 + const provider = yield* AzureDevOpsSourceControlProvider.make;
37 + assert.deepStrictEqual(
38 + provider.headBranchProbe?.({
39 + headSelectors: ["octocat:feature", "feature"],
40 + state: "open",
41 + }),
42 + { headSelectors: ["feature"], limit: 100 },
43 + );
44 + }).pipe(Effect.provide(Layer.mock(AzureDevOpsCli.AzureDevOpsCli)({}))),
45 +);
packages/source-control-azure-devops/src/server/AzureDevOpsSourceControlProvider.ts
+5
@@ -76,6 +76,11 @@ export const make = Effect.gen(function* () {
76
77 return SourceControlProvider.SourceControlProvider.of({
78 kind: SourceControlProviderKind.make("azure-devops"),
79 + // Azure lists fork pull requests by source branch with no owner filter, so read a full page.
80 + headBranchProbe: ({ headSelectors }) => ({
81 + headSelectors: headSelectors.filter((selector) => !selector.includes(":")),
82 + limit: 100,
83 + }),
84 listChangeRequests: Effect.fn("AzureDevOpsSourceControlProvider.listChangeRequests")(
85 function (input) {
86 const source = SourceControlProvider.sourceControlRefFromInput(input);