feat(pull-requests): link multiple pull requests to threads (#10839)

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-09 15:50:58 -07:00
1 parent 383cc40f4d
commit afb84898be
172 files changed
+12063 -914

No files matched your search

+32
View File
@@ -1,6 +1,7 @@
import { describe, expect, it } from "vite-plus/test";
import {
sourceControlRepositorySelector,
detectSourceControlProviderFromRemoteUrl,
getChangeRequestTerminologyForKind,
isSshRemoteUrl,
@@ -160,3 +161,34 @@ describe("isSshRemoteUrl", () => {
expect(isSshRemoteUrl("[email protected]/project/repo")).toBe(false);
});
});
it("names an Azure DevOps repository by its own name, not its project path", () => {
// `az repos pr list --repository` takes a name and detects the organisation and project from
// the checkout; the recorded `org/project/_git/repo` path is refused, and the repository then
// reads as unavailable on the page.
const selector = sourceControlRepositorySelector({
provider: "azure-devops",
displayName: "contoso/payments/_git/checkout",
owner: "contoso",
name: "checkout",
});
expect(selector).toBe("checkout");
});
it("falls back to the path's last segment where an Azure identity has no name", () => {
const selector = sourceControlRepositorySelector({
provider: "azure-devops",
displayName: "contoso/payments/_git/checkout",
});
expect(selector).toBe("checkout");
});
it("keeps a GitLab identity's whole path, because a nested group is part of the name", () => {
const selector = sourceControlRepositorySelector({
provider: "gitlab",
displayName: "group/subgroup/service",
owner: "group",
name: "service",
});
expect(selector).toBe("group/subgroup/service");
});