From f730e69cb2a0ebe4e73d5c00df6a5076d674babf Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 26 Apr 2026 23:28:33 -0700 Subject: [PATCH] feat: record sync runs --- internal/syncer/syncer.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/syncer/syncer.go b/internal/syncer/syncer.go index 317869c..dfd7a21 100644 --- a/internal/syncer/syncer.go +++ b/internal/syncer/syncer.go @@ -99,6 +99,17 @@ func (s *Syncer) Sync(ctx context.Context, options Options) (Stats, error) { } } stats.FinishedAt = s.now().Format(time.RFC3339Nano) + if _, err := s.store.RecordRun(ctx, store.RunRecord{ + RepoID: repoID, + Kind: "sync", + Scope: "open", + Status: "success", + StartedAt: stats.StartedAt, + FinishedAt: stats.FinishedAt, + StatsJSON: mustJSON(stats), + }); err != nil { + return Stats{}, err + } return stats, nil }