diff options
author | vince <vincetiu8@gmail.com> | 2020-07-09 14:59:47 +0800 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-02-14 12:17:48 +0100 |
commit | d96284da646cc1d3e3d7d3b2f7a1ab0e8e7a4d88 (patch) | |
tree | 032869cd4c3ff959a42b7489795cc2cd8afc6423 /bug/op_create.go | |
parent | 2788c5fc87507974d3237d4edc233fda3f784b35 (diff) | |
download | git-bug-d96284da646cc1d3e3d7d3b2f7a1ab0e8e7a4d88.tar.gz |
Change the comment ID to use both bug and comment ID references.
Add comment edit command
This commit adds the comment edit command, which provides a CLI tool that allows a user to edit a comment.
Diffstat (limited to 'bug/op_create.go')
-rw-r--r-- | bug/op_create.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bug/op_create.go b/bug/op_create.go index 41e0fca1..15fb69b5 100644 --- a/bug/op_create.go +++ b/bug/op_create.go @@ -59,8 +59,9 @@ func (op *CreateOperation) Apply(snapshot *Snapshot) { snapshot.Title = op.Title + commentId := DeriveCommentId(snapshot.Id(), op.Id()) comment := Comment{ - id: op.Id(), + id: commentId, Message: op.Message, Author: op.Author, UnixTime: timestamp.Timestamp(op.UnixTime), @@ -72,7 +73,7 @@ func (op *CreateOperation) Apply(snapshot *Snapshot) { snapshot.Timeline = []TimelineItem{ &CreateTimelineItem{ - CommentTimelineItem: NewCommentTimelineItem(op.Id(), comment), + CommentTimelineItem: NewCommentTimelineItem(commentId, comment), }, } } |