feat: add comments display to bd show command (#177)
This commit is contained in:
@@ -1222,12 +1222,16 @@ func (s *Server) handleShow(req *Request) Response {
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch comments
|
||||
comments, _ := store.GetIssueComments(ctx, issue.ID)
|
||||
|
||||
// Create detailed response with related data
|
||||
type IssueDetails struct {
|
||||
*types.Issue
|
||||
Labels []string `json:"labels,omitempty"`
|
||||
Dependencies []*types.IssueWithDependencyMetadata `json:"dependencies,omitempty"`
|
||||
Dependents []*types.IssueWithDependencyMetadata `json:"dependents,omitempty"`
|
||||
Comments []*types.Comment `json:"comments,omitempty"`
|
||||
}
|
||||
|
||||
details := &IssueDetails{
|
||||
@@ -1235,6 +1239,7 @@ func (s *Server) handleShow(req *Request) Response {
|
||||
Labels: labels,
|
||||
Dependencies: deps,
|
||||
Dependents: dependents,
|
||||
Comments: comments,
|
||||
}
|
||||
|
||||
data, _ := json.Marshal(details)
|
||||
|
||||
@@ -81,9 +81,19 @@ func MigrateTombstoneClosedAt(db *sql.DB) error {
|
||||
}
|
||||
|
||||
// Step 2: Copy data from old table to new table
|
||||
// List all columns explicitly to handle cases where old table has fewer columns
|
||||
// Note: created_by is added in migration 029, so don't reference it here
|
||||
_, err = db.Exec(`
|
||||
INSERT INTO issues_new
|
||||
SELECT * FROM issues
|
||||
SELECT
|
||||
id, content_hash, title, description, design, acceptance_criteria, notes,
|
||||
status, priority, issue_type, assignee, estimated_minutes,
|
||||
created_at, updated_at, closed_at, external_ref,
|
||||
source_repo, compaction_level, compacted_at, compacted_at_commit, original_size,
|
||||
deleted_at, deleted_by, delete_reason, original_type,
|
||||
sender, ephemeral, close_reason, pinned, is_template,
|
||||
await_type, await_id, timeout_ns, waiters
|
||||
FROM issues
|
||||
`)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to copy issues data: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user