feat(config): support daemon.auto_* settings in config.yaml (GH#871)
Allow team-wide auto-sync configuration via config.yaml instead of SQLite. This enables teams to share auto-commit/auto-push settings through version control. Changes: - Add daemon.auto_commit, daemon.auto_push, daemon.auto_pull to YamlOnlyKeys - Add daemon.* prefix to YAML-only prefixes - Update daemon startup to read from config.yaml first, then fall back to SQLite - Update bd init --team to write daemon settings to config.yaml Usage: # In .beads/config.yaml (version controlled, shared by team) daemon.auto_commit: true daemon.auto_push: true # Or via bd config set bd config set daemon.auto_commit true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/steveyegge/beads/internal/config"
|
||||
"github.com/steveyegge/beads/internal/storage"
|
||||
"github.com/steveyegge/beads/internal/ui"
|
||||
)
|
||||
@@ -117,11 +118,12 @@ func runTeamWizard(ctx context.Context, store storage.Storage) error {
|
||||
autoSync := !(response == "n" || response == "no")
|
||||
|
||||
if autoSync {
|
||||
if err := store.SetConfig(ctx, "daemon.auto_commit", "true"); err != nil {
|
||||
// GH#871: Write to config.yaml for team-wide settings (version controlled)
|
||||
if err := config.SetYamlConfig("daemon.auto_commit", "true"); err != nil {
|
||||
return fmt.Errorf("failed to enable auto-commit: %w", err)
|
||||
}
|
||||
|
||||
if err := store.SetConfig(ctx, "daemon.auto_push", "true"); err != nil {
|
||||
if err := config.SetYamlConfig("daemon.auto_push", "true"); err != nil {
|
||||
return fmt.Errorf("failed to enable auto-push: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user