feat(jobs/runners): worktree prune two-phase + workspace prune queries/repo methods

This commit is contained in:
2026-05-06 07:55:56 +08:00
parent 0111135e78
commit c50621eeca
8 changed files with 638 additions and 12 deletions
@@ -86,6 +86,18 @@ func (f *fakeRepo) ListWorktreesByWorkspace(_ context.Context, _ uuid.UUID) ([]*
return nil, nil
}
func (f *fakeRepo) DeleteWorktree(_ context.Context, _ uuid.UUID) error { return nil }
func (f *fakeRepo) ListWorktreesNeedingPruneWarning(_ context.Context, _ time.Time) ([]*Worktree, error) {
return nil, nil
}
func (f *fakeRepo) ListWorktreesNeedingPrune(_ context.Context, _ time.Time) ([]*Worktree, error) {
return nil, nil
}
func (f *fakeRepo) MarkPruneWarning(_ context.Context, _ uuid.UUID) error { return nil }
func (f *fakeRepo) TryStartPrune(_ context.Context, _ uuid.UUID) (*Worktree, error) {
return nil, nil
}
func (f *fakeRepo) FinishPruneSuccess(_ context.Context, _ uuid.UUID) error { return nil }
func (f *fakeRepo) FinishPruneRollback(_ context.Context, _ uuid.UUID) error { return nil }
func (f *fakeRepo) UpsertCredential(_ context.Context, c *Credential) (*Credential, error) {
cp := *c
f.creds[c.WorkspaceID] = &cp