diff options
author | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:56:58 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-09-25 17:56:58 +0200 |
commit | 40c6e64e4badfd543dc98237e1aeb3d8958cfe90 (patch) | |
tree | 03a992d71a1bfa3f069a5ef179649c0cf8479764 /operations/add_comment.go | |
parent | 5d7c3a76af85a857a6bb0bff5bac5282c0a9908f (diff) | |
download | git-bug-40c6e64e4badfd543dc98237e1aeb3d8958cfe90.tar.gz |
cache: add raw edit functions to allow setting up the author, the timestamp and the metadatas
Diffstat (limited to 'operations/add_comment.go')
-rw-r--r-- | operations/add_comment.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/operations/add_comment.go b/operations/add_comment.go index 65606d77..56a2c606 100644 --- a/operations/add_comment.go +++ b/operations/add_comment.go @@ -52,21 +52,21 @@ func (op AddCommentOperation) Validate() error { return nil } -func NewAddCommentOp(author bug.Person, message string, files []git.Hash) AddCommentOperation { +func NewAddCommentOp(author bug.Person, unixTime int64, message string, files []git.Hash) AddCommentOperation { return AddCommentOperation{ - OpBase: bug.NewOpBase(bug.AddCommentOp, author), + OpBase: bug.NewOpBase(bug.AddCommentOp, author, unixTime), Message: message, Files: files, } } // Convenience function to apply the operation -func Comment(b bug.Interface, author bug.Person, message string) error { - return CommentWithFiles(b, author, message, nil) +func Comment(b bug.Interface, author bug.Person, unixTime int64, message string) error { + return CommentWithFiles(b, author, unixTime, message, nil) } -func CommentWithFiles(b bug.Interface, author bug.Person, message string, files []git.Hash) error { - addCommentOp := NewAddCommentOp(author, message, files) +func CommentWithFiles(b bug.Interface, author bug.Person, unixTime int64, message string, files []git.Hash) error { + addCommentOp := NewAddCommentOp(author, unixTime, message, files) if err := addCommentOp.Validate(); err != nil { return err } |