aboutsummaryrefslogtreecommitdiffstats
path: root/operations/set_title.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/set_title.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/set_title.go')
-rw-r--r--operations/set_title.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/operations/set_title.go b/operations/set_title.go
index 154998cf..e6964a65 100644
--- a/operations/set_title.go
+++ b/operations/set_title.go
@@ -52,16 +52,16 @@ func (op SetTitleOperation) Validate() error {
return nil
}
-func NewSetTitleOp(author bug.Person, title string, was string) SetTitleOperation {
+func NewSetTitleOp(author bug.Person, unixTime int64, title string, was string) SetTitleOperation {
return SetTitleOperation{
- OpBase: bug.NewOpBase(bug.SetTitleOp, author),
+ OpBase: bug.NewOpBase(bug.SetTitleOp, author, unixTime),
Title: title,
Was: was,
}
}
// Convenience function to apply the operation
-func SetTitle(b bug.Interface, author bug.Person, title string) error {
+func SetTitle(b bug.Interface, author bug.Person, unixTime int64, title string) error {
it := bug.NewOperationIterator(b)
var lastTitleOp bug.Operation
@@ -79,7 +79,7 @@ func SetTitle(b bug.Interface, author bug.Person, title string) error {
was = b.FirstOp().(CreateOperation).Title
}
- setTitleOp := NewSetTitleOp(author, title, was)
+ setTitleOp := NewSetTitleOp(author, unixTime, title, was)
if err := setTitleOp.Validate(); err != nil {
return err