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/label_change.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/label_change.go')
-rw-r--r-- | operations/label_change.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/operations/label_change.go b/operations/label_change.go index 478fbe30..83e3e692 100644 --- a/operations/label_change.go +++ b/operations/label_change.go @@ -74,16 +74,16 @@ func (op LabelChangeOperation) Validate() error { return nil } -func NewLabelChangeOperation(author bug.Person, added, removed []bug.Label) LabelChangeOperation { +func NewLabelChangeOperation(author bug.Person, unixTime int64, added, removed []bug.Label) LabelChangeOperation { return LabelChangeOperation{ - OpBase: bug.NewOpBase(bug.LabelChangeOp, author), + OpBase: bug.NewOpBase(bug.LabelChangeOp, author, unixTime), Added: added, Removed: removed, } } // ChangeLabels is a convenience function to apply the operation -func ChangeLabels(b bug.Interface, author bug.Person, add, remove []string) ([]LabelChangeResult, error) { +func ChangeLabels(b bug.Interface, author bug.Person, unixTime int64, add, remove []string) ([]LabelChangeResult, error) { var added, removed []bug.Label var results []LabelChangeResult @@ -131,7 +131,7 @@ func ChangeLabels(b bug.Interface, author bug.Person, add, remove []string) ([]L return results, fmt.Errorf("no label added or removed") } - labelOp := NewLabelChangeOperation(author, added, removed) + labelOp := NewLabelChangeOperation(author, unixTime, added, removed) if err := labelOp.Validate(); err != nil { return nil, err |