mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-31 08:44:32 +00:00
feat(vcs): expose branch info (#40368)
This commit is contained in:
parent
28d784b83a
commit
42e8d11552
17 changed files with 576 additions and 31 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue