feat(bd): add --ephemeral and --persistent flags to bd update (#1263)

Adds --ephemeral and --persistent flags to bd update command.

Author: aleiby
This commit is contained in:
aleiby
2026-01-22 15:54:04 -08:00
committed by GitHub
parent d037158624
commit 16749e6731
3 changed files with 109 additions and 1 deletions

View File

@@ -165,6 +165,19 @@ create, update, show, or close operation).`,
updates["defer_until"] = t
}
}
// Ephemeral/persistent flags
// Note: storage layer uses "wisp" field name, maps to "ephemeral" column
ephemeralChanged := cmd.Flags().Changed("ephemeral")
persistentChanged := cmd.Flags().Changed("persistent")
if ephemeralChanged && persistentChanged {
FatalErrorRespectJSON("cannot specify both --ephemeral and --persistent flags")
}
if ephemeralChanged {
updates["wisp"] = true
}
if persistentChanged {
updates["wisp"] = false
}
// Get claim flag
claimFlag, _ := cmd.Flags().GetBool("claim")
@@ -278,6 +291,10 @@ create, update, show, or close operation).`,
empty := ""
updateArgs.DeferUntil = &empty
}
// Ephemeral/persistent
if wisp, ok := updates["wisp"].(bool); ok {
updateArgs.Ephemeral = &wisp
}
// Set claim flag for atomic claim operation
updateArgs.Claim = claimFlag
@@ -613,6 +630,9 @@ func init() {
updateCmd.Flags().String("defer", "", "Defer until date (empty to clear). Issue hidden from bd ready until then")
// Gate fields (bd-z6kw)
updateCmd.Flags().String("await-id", "", "Set gate await_id (e.g., GitHub run ID for gh:run gates)")
// Ephemeral/persistent flags
updateCmd.Flags().Bool("ephemeral", false, "Mark issue as ephemeral (wisp) - not exported to JSONL")
updateCmd.Flags().Bool("persistent", false, "Mark issue as persistent (promote wisp to regular issue)")
updateCmd.ValidArgsFunction = issueIDCompletion
rootCmd.AddCommand(updateCmd)
}