fix(core): branch-keyed repository cache with gated reference readiness (#38759)

This commit is contained in:
Kit Langton 2026-07-24 21:23:44 -04:00 committed by GitHub
commit 065dc274ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 89 additions and 52 deletions

View file

@ -17,6 +17,12 @@ describe("Repository", () => {
label: "owner/repo",
})
expect(Repository.cachePath("/cache", reference)).toBe(path.join("/cache", "github.com", "owner", "repo"))
expect(Repository.cachePath("/cache", reference, "main")).toBe(
path.join("/cache", "github.com", "owner", "repo@main"),
)
expect(Repository.cachePath("/cache", reference, "feature/x")).toBe(
path.join("/cache", "github.com", "owner", "repo@feature%2Fx"),
)
expect(Repository.cacheIdentity(reference)).toBe("github.com/owner/repo")
})