feat(sling): implement --convoy flag logic (gt-9o4)
Add --convoy flag to gt sling that allows adding an issue to an existing convoy instead of creating a new one. When specified: - Validates the convoy exists and is open - Adds tracking relation between convoy and issue - Skips auto-convoy creation Changes: - Add slingConvoy variable and --convoy flag registration - Add addToExistingConvoy() helper function in sling_convoy.go - Modify auto-convoy logic to check slingConvoy first Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -377,9 +377,21 @@ func runSling(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-convoy: check if issue is already tracked by a convoy
|
||||
// If not, create one for dashboard visibility (unless --no-convoy is set)
|
||||
if !slingNoConvoy && formulaName == "" {
|
||||
// Convoy handling: --convoy adds to existing, otherwise auto-create (unless --no-convoy)
|
||||
if slingConvoy != "" {
|
||||
// Use existing convoy specified by --convoy flag
|
||||
if slingDryRun {
|
||||
fmt.Printf("Would add to convoy %s\n", slingConvoy)
|
||||
fmt.Printf("Would add tracking relation to %s\n", beadID)
|
||||
} else {
|
||||
if err := addToExistingConvoy(slingConvoy, beadID); err != nil {
|
||||
return fmt.Errorf("adding to convoy: %w", err)
|
||||
}
|
||||
fmt.Printf("%s Added to convoy %s\n", style.Bold.Render("→"), slingConvoy)
|
||||
}
|
||||
} else if !slingNoConvoy && formulaName == "" {
|
||||
// Auto-convoy: check if issue is already tracked by a convoy
|
||||
// If not, create one for dashboard visibility
|
||||
existingConvoy := isTrackedByConvoy(beadID)
|
||||
if existingConvoy == "" {
|
||||
if slingDryRun {
|
||||
|
||||
Reference in New Issue
Block a user