Fix issue-prefix config fallback to config.yaml (GH#1145) (#1146)
The config.yaml file uses "issue-prefix" (with hyphen) but this setting was only read during bd init. After initialization, all code read from the database's "issue_prefix" key, so subsequent changes to config.yaml were silently ignored. This fix adds a fallback to config.yaml's "issue-prefix" in the key locations where the prefix is retrieved from the database: 1. autoflush.go: Auto-import now checks config.yaml before falling back to auto-detection from JSONL or directory name 2. autoflush.go: filterByMultiRepoPrefix now checks config.yaml as fallback 3. create.go: Direct mode prefix validation now checks config.yaml as fallback Priority order is preserved: 1. Database issue_prefix (if set) 2. Config.yaml issue-prefix (new fallback) 3. Auto-detection from JSONL/directory (existing fallback) Fixes #1145 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -432,8 +432,11 @@ var createCmd = &cobra.Command{
|
||||
}
|
||||
// If error, continue without validation (non-fatal)
|
||||
} else {
|
||||
// Direct mode - check config
|
||||
// Direct mode - check config (GH#1145: fallback to config.yaml)
|
||||
dbPrefix, _ = store.GetConfig(ctx, "issue_prefix")
|
||||
if dbPrefix == "" {
|
||||
dbPrefix = config.GetString("issue-prefix")
|
||||
}
|
||||
allowedPrefixes, _ = store.GetConfig(ctx, "allowed_prefixes")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user