feat: Add Git workspace management for build profiles and implement workspace cleanup

This commit is contained in:
2026-01-01 10:55:07 +00:00
parent b46249dcbc
commit e64962c3fd
10 changed files with 344 additions and 7 deletions
+9
View File
@@ -98,6 +98,7 @@ export const adminRouter = router({
.input(
z.object({
profileName: z.string().min(1),
commitSha: z.string().min(7).max(64),
})
)
.mutation(async ({ ctx, input }) => {
@@ -108,6 +109,7 @@ export const adminRouter = router({
{
requestedAt,
error: null,
commitSha: input.commitSha,
}
);
return result;
@@ -126,5 +128,12 @@ export const adminRouter = router({
await ctx.orchestrator.reconcileNow();
return { ok: true };
}),
cleanupWorkspaces: adminProcedure.mutation(async ({ ctx }) => {
const result = await ctx.orchestrator.cleanupStaleWorkspaces();
return {
removed: result.removed,
skipped: result.skipped,
};
}),
}),
});