fix(merge-slot): use daemon RPC to get issue_prefix in daemon mode
When running in daemon mode, getMergeSlotID() was not using the daemon RPC to retrieve the configured issue_prefix, causing it to fall back to the hardcoded "bd" default. This fix adds the missing daemon path that uses daemonClient.GetConfig() to properly retrieve the prefix, matching the pattern used in create.go. Fixes #1096 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -121,8 +121,13 @@ func getMergeSlotID() string {
|
||||
// First try config.yaml (issue-prefix)
|
||||
if configPrefix := config.GetString("issue-prefix"); configPrefix != "" {
|
||||
prefix = strings.TrimSuffix(configPrefix, "-")
|
||||
} else if daemonClient != nil {
|
||||
// Daemon mode - use RPC to get config
|
||||
if configResp, err := daemonClient.GetConfig(&rpc.GetConfigArgs{Key: "issue_prefix"}); err == nil && configResp.Value != "" {
|
||||
prefix = strings.TrimSuffix(configResp.Value, "-")
|
||||
}
|
||||
} else if store != nil {
|
||||
// Fall back to database config
|
||||
// Direct mode - check database config
|
||||
if dbPrefix, err := store.GetConfig(rootCtx, "issue_prefix"); err == nil && dbPrefix != "" {
|
||||
prefix = strings.TrimSuffix(dbPrefix, "-")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user