Attach a refs/notes/byre note to each squash merge and push it

This commit is contained in:
Ian Gulliver
2026-10-15 19:44:53 -07:00
parent c5e3a680d8
commit 6741177f53
8 changed files with 275 additions and 11 deletions
+18
View File
@@ -55,6 +55,18 @@ func New(dataDir string, portFirst int, spa fs.FS) (*Server, error) {
return nil, err
}
projects, err := s.store.ListProjects(context.Background())
if err != nil {
s.store.Close()
return nil, err
}
for _, p := range projects {
err = git.ConfigureNotesFetch(p.RepoPath)
if err != nil {
slog.Error("configure notes fetch", "project", p.Id, "repo", p.RepoPath, "err", err)
}
}
s.agents = agents.New(s.store, filepath.Join(dataDir, "worktrees"), filepath.Join(dataDir, "leads"), filepath.Join(dataDir, "codex"))
err = s.agents.Recover(context.Background())
if err != nil {
@@ -198,6 +210,12 @@ func (s *Server) CreateProject(w http.ResponseWriter, r *http.Request) {
return
}
err = git.ConfigureNotesFetch(info.Root)
if err != nil {
writeError(w, http.StatusInternalServerError, err)
return
}
p := api.Project{
Id: store.NewID(),
Name: req.Name,