fix(init): update output to show hash-based ID format
The bd init and quickstart commands displayed outdated ID format examples showing sequential IDs (prefix-1, prefix-2, ...) but beads has used content-based hash IDs since bd-8e05. Updated output now correctly shows: Issues will be named: prefix-<hash> (e.g., prefix-a3f2dd) This matches the actual GenerateHashID implementation in internal/types/id_generator.go which generates 6-8 char hex hashes. test(init): update test expectations to match hash-based ID format Tests were checking for the old sequential format (prefix-1, prefix-2) but the code now outputs hash-based format (prefix-<hash>). Co-authored-by: cc-vps <crcatala+vps@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2b031b9441
commit
cb5ebfc667
@@ -222,7 +222,7 @@ With --stealth: configures global git settings for invisible beads usage:
|
|||||||
fmt.Printf(" Mode: %s\n", cyan("no-db (JSONL-only)"))
|
fmt.Printf(" Mode: %s\n", cyan("no-db (JSONL-only)"))
|
||||||
fmt.Printf(" Issues file: %s\n", cyan(jsonlPath))
|
fmt.Printf(" Issues file: %s\n", cyan(jsonlPath))
|
||||||
fmt.Printf(" Issue prefix: %s\n", cyan(prefix))
|
fmt.Printf(" Issue prefix: %s\n", cyan(prefix))
|
||||||
fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-1, "+prefix+"-2, ..."))
|
fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-<hash> (e.g., "+prefix+"-a3f2dd)"))
|
||||||
fmt.Printf("Run %s to get started.\n\n", cyan("bd --no-db quickstart"))
|
fmt.Printf("Run %s to get started.\n\n", cyan("bd --no-db quickstart"))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@@ -440,7 +440,7 @@ With --stealth: configures global git settings for invisible beads usage:
|
|||||||
fmt.Printf("\n%s bd initialized successfully!\n\n", green("✓"))
|
fmt.Printf("\n%s bd initialized successfully!\n\n", green("✓"))
|
||||||
fmt.Printf(" Database: %s\n", cyan(initDBPath))
|
fmt.Printf(" Database: %s\n", cyan(initDBPath))
|
||||||
fmt.Printf(" Issue prefix: %s\n", cyan(prefix))
|
fmt.Printf(" Issue prefix: %s\n", cyan(prefix))
|
||||||
fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-1, "+prefix+"-2, ..."))
|
fmt.Printf(" Issues will be named: %s\n\n", cyan(prefix+"-<hash> (e.g., "+prefix+"-a3f2dd)"))
|
||||||
fmt.Printf("Run %s to get started.\n\n", cyan("bd quickstart"))
|
fmt.Printf("Run %s to get started.\n\n", cyan("bd quickstart"))
|
||||||
|
|
||||||
// Run bd doctor diagnostics to catch setup issues early (bd-zwtq)
|
// Run bd doctor diagnostics to catch setup issues early (bd-zwtq)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ func TestInitCommand(t *testing.T) {
|
|||||||
name: "init with custom prefix",
|
name: "init with custom prefix",
|
||||||
prefix: "myproject",
|
prefix: "myproject",
|
||||||
quiet: false,
|
quiet: false,
|
||||||
wantOutputText: "myproject-1, myproject-2",
|
wantOutputText: "myproject-<hash>",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "init with quiet flag",
|
name: "init with quiet flag",
|
||||||
@@ -39,7 +39,7 @@ func TestInitCommand(t *testing.T) {
|
|||||||
name: "init with prefix ending in hyphen",
|
name: "init with prefix ending in hyphen",
|
||||||
prefix: "test-",
|
prefix: "test-",
|
||||||
quiet: false,
|
quiet: false,
|
||||||
wantOutputText: "test-1, test-2",
|
wantOutputText: "test-<hash>",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ var quickstartCmd = &cobra.Command{
|
|||||||
fmt.Printf(" Auto-detects prefix from directory name (e.g., myapp-1, myapp-2)\n\n")
|
fmt.Printf(" Auto-detects prefix from directory name (e.g., myapp-1, myapp-2)\n\n")
|
||||||
|
|
||||||
fmt.Printf(" %s Initialize with custom prefix\n", cyan("bd init --prefix api"))
|
fmt.Printf(" %s Initialize with custom prefix\n", cyan("bd init --prefix api"))
|
||||||
fmt.Printf(" Issues will be named: api-1, api-2, ...\n\n")
|
fmt.Printf(" Issues will be named: api-<hash> (e.g., api-a3f2dd)\n\n")
|
||||||
|
|
||||||
fmt.Printf("%s\n", bold("CREATING ISSUES"))
|
fmt.Printf("%s\n", bold("CREATING ISSUES"))
|
||||||
fmt.Printf(" %s\n", cyan("bd create \"Fix login bug\""))
|
fmt.Printf(" %s\n", cyan("bd create \"Fix login bug\""))
|
||||||
|
|||||||
Reference in New Issue
Block a user