feat(vcs): expose branch info (#40368)

This commit is contained in:
Aiden Cline 2026-08-03 23:18:13 -05:00 committed by GitHub
parent 28d784b83a
commit 42e8d11552
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 576 additions and 31 deletions

View file

@ -13,6 +13,20 @@ const DiffQuery = Schema.Struct({
})
export const VcsGroup = HttpApiGroup.make("server.vcs")
.add(
HttpApiEndpoint.get("vcs.get", "/api/vcs", {
query: LocationQuery,
success: Location.response(Vcs.Info),
})
.annotateMerge(locationQueryOpenApi)
.annotateMerge(
OpenApi.annotations({
identifier: "v2.vcs.get",
summary: "VCS info",
description: "Get current and default branch information for the requested location.",
}),
),
)
.add(
HttpApiEndpoint.get("vcs.status", "/api/vcs/status", {
query: LocationQuery,