Add comments feature (bd-162)
- Add comments table to SQLite schema - Add Comment type to internal/types - Implement AddIssueComment and GetIssueComments in storage layer - Update JSONL export/import to include comments - Add comments to 'bd show' output - Create 'bd comments' CLI command structure - Fix UpdateIssueID to update comments table and defer FK checks - Add GetIssueComments/AddIssueComment to Storage interface Note: CLI command needs daemon RPC support (tracked in bd-163) Amp-Thread-ID: https://ampcode.com/threads/T-ece10dd1-cf64-48ff-9adb-dd304d0bcb25 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -270,6 +270,15 @@ func exportToJSONL(ctx context.Context, jsonlPath string) error {
|
||||
issue.Labels = labels
|
||||
}
|
||||
|
||||
// Populate comments for all issues
|
||||
for _, issue := range issues {
|
||||
comments, err := store.GetIssueComments(ctx, issue.ID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get comments for %s: %w", issue.ID, err)
|
||||
}
|
||||
issue.Comments = comments
|
||||
}
|
||||
|
||||
// Create temp file for atomic write
|
||||
dir := filepath.Dir(jsonlPath)
|
||||
base := filepath.Base(jsonlPath)
|
||||
|
||||
Reference in New Issue
Block a user