feat(plugins): add source-control extension contracts (#2117)

This commit is contained in:
José Almeida
2026-08-13 08:29:29 +01:00
committed by GitHub
parent 064b852884
commit f218880ecb
530 changed files with 39054 additions and 7518 deletions
@@ -64,7 +64,9 @@ describe("workspace source state payloads and validation", () => {
updateWorkspaceSourceRow([invalid, valid], "bad", { remoteUrl: "https://x/y.git" }),
).toEqual([{ ...invalid, remoteUrl: "https://x/y.git" }, valid]);
});
});
describe("workspace source state provider validation", () => {
it("accepts task-create's supported SCP remotes and rejects unsupported hosts", () => {
const rows = [
{
@@ -91,6 +93,16 @@ describe("workspace source state payloads and validation", () => {
remoteUrl: "https://bitbucket.org/acme/api.git",
baseBranch: "main",
},
{
key: "plugin-authorized",
kind: "repository" as const,
remoteUrl: "https://bitbucket.example.test/scm/acme/api.git",
provider: "bitbucket",
providerRepoId: "api-42",
providerOwner: "acme",
providerName: "api",
baseBranch: "main",
},
];
expect(getWorkspaceSourceValidation(rows)).toEqual({