aboutsummaryrefslogtreecommitdiffstats
path: root/bug/timeline.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/timeline.go')
-rw-r--r--bug/timeline.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/bug/timeline.go b/bug/timeline.go
index d8ee2c6b..4af1b92a 100644
--- a/bug/timeline.go
+++ b/bug/timeline.go
@@ -3,14 +3,15 @@ package bug
import (
"strings"
+ "github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/util/git"
"github.com/MichaelMure/git-bug/util/timestamp"
)
type TimelineItem interface {
- // Hash return the hash of the item
- Hash() git.Hash
+ // ID return the identifier of the item
+ Id() entity.Id
}
// CommentHistoryStep hold one version of a message in the history
@@ -25,7 +26,7 @@ type CommentHistoryStep struct {
// CommentTimelineItem is a TimelineItem that holds a Comment and its edition history
type CommentTimelineItem struct {
- hash git.Hash
+ id entity.Id
Author identity.Interface
Message string
Files []git.Hash
@@ -34,9 +35,9 @@ type CommentTimelineItem struct {
History []CommentHistoryStep
}
-func NewCommentTimelineItem(hash git.Hash, comment Comment) CommentTimelineItem {
+func NewCommentTimelineItem(ID entity.Id, comment Comment) CommentTimelineItem {
return CommentTimelineItem{
- hash: hash,
+ id: ID,
Author: comment.Author,
Message: comment.Message,
Files: comment.Files,
@@ -51,8 +52,8 @@ func NewCommentTimelineItem(hash git.Hash, comment Comment) CommentTimelineItem
}
}
-func (c *CommentTimelineItem) Hash() git.Hash {
- return c.hash
+func (c *CommentTimelineItem) Id() entity.Id {
+ return c.id
}
// Append will append a new comment in the history and update the other values