Attach a refs/notes/byre note to each squash merge and push it
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user