From 6a949d91b8b6dbf7524aef09992946985cf104e6 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 21 Dec 2025 21:18:43 -0800 Subject: [PATCH] fix: rename customID to customTitle in mol bond for consistency (bd-e7ou) The --as flag description correctly says "Custom title" but the variable was named customID and dry-run output said "Custom ID". Fixed for consistency: - Renamed variable customID -> customTitle - Changed dry-run output from "Custom ID" to "Custom title" Closes bd-e7ou --- cmd/bd/mol_bond.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/bd/mol_bond.go b/cmd/bd/mol_bond.go index 14039409..a9422542 100644 --- a/cmd/bd/mol_bond.go +++ b/cmd/bd/mol_bond.go @@ -67,7 +67,7 @@ func runMolBond(cmd *cobra.Command, args []string) { } bondType, _ := cmd.Flags().GetString("type") - customID, _ := cmd.Flags().GetString("as") + customTitle, _ := cmd.Flags().GetString("as") dryRun, _ := cmd.Flags().GetBool("dry-run") varFlags, _ := cmd.Flags().GetStringSlice("var") @@ -123,8 +123,8 @@ func runMolBond(cmd *cobra.Command, args []string) { fmt.Printf(" Bond type: %s\n", bondType) if aIsProto && bIsProto { fmt.Printf(" Result: compound proto\n") - if customID != "" { - fmt.Printf(" Custom ID: %s\n", customID) + if customTitle != "" { + fmt.Printf(" Custom title: %s\n", customTitle) } } else if aIsProto || bIsProto { fmt.Printf(" Result: spawn proto, attach to molecule\n") @@ -138,7 +138,7 @@ func runMolBond(cmd *cobra.Command, args []string) { var result *BondResult switch { case aIsProto && bIsProto: - result, err = bondProtoProto(ctx, store, issueA, issueB, bondType, customID, actor) + result, err = bondProtoProto(ctx, store, issueA, issueB, bondType, customTitle, actor) case aIsProto && !bIsProto: result, err = bondProtoMol(ctx, store, issueA, issueB, bondType, vars, actor) case !aIsProto && bIsProto: @@ -186,12 +186,12 @@ func operandType(isProtoIssue bool) string { } // bondProtoProto bonds two protos to create a compound proto -func bondProtoProto(ctx context.Context, s storage.Storage, protoA, protoB *types.Issue, bondType, customID, actorName string) (*BondResult, error) { +func bondProtoProto(ctx context.Context, s storage.Storage, protoA, protoB *types.Issue, bondType, customTitle, actorName string) (*BondResult, error) { // Create compound proto: a new root that references both protos as children // The compound root will be a new issue that ties them together compoundTitle := fmt.Sprintf("Compound: %s + %s", protoA.Title, protoB.Title) - if customID != "" { - compoundTitle = customID + if customTitle != "" { + compoundTitle = customTitle } var compoundID string