aboutsummaryrefslogtreecommitdiffstats
path: root/operations/add_comment.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-25 17:56:58 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-25 17:56:58 +0200
commit40c6e64e4badfd543dc98237e1aeb3d8958cfe90 (patch)
tree03a992d71a1bfa3f069a5ef179649c0cf8479764 /operations/add_comment.go
parent5d7c3a76af85a857a6bb0bff5bac5282c0a9908f (diff)
downloadgit-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.go12
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
}