aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operations/set_title.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-18 00:16:06 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-18 00:16:06 +0200
commitba3281dc9918fa49f10c2a166b5b631a931d2d51 (patch)
treef6e9d17fa7828634f250c7af0674d5405ba0d224 /bug/operations/set_title.go
parent6f83d89274fc796e01149c84b91b8aa2066f0273 (diff)
downloadgit-bug-ba3281dc9918fa49f10c2a166b5b631a931d2d51.tar.gz
all operations now have an author and a timestamp
Diffstat (limited to 'bug/operations/set_title.go')
-rw-r--r--bug/operations/set_title.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/bug/operations/set_title.go b/bug/operations/set_title.go
index c5e0ab0e..ef934db1 100644
--- a/bug/operations/set_title.go
+++ b/bug/operations/set_title.go
@@ -1,6 +1,10 @@
package operations
-import "github.com/MichaelMure/git-bug/bug"
+import (
+ "github.com/MichaelMure/git-bug/bug"
+)
+
+// SetTitleOperation will change the title of a bug
var _ bug.Operation = SetTitleOperation{}
@@ -9,14 +13,15 @@ type SetTitleOperation struct {
Title string
}
-func NewSetTitleOp(title string) SetTitleOperation {
+func NewSetTitleOp(author bug.Person, title string) SetTitleOperation {
return SetTitleOperation{
- OpBase: bug.OpBase{OperationType: bug.SetTitleOp},
+ OpBase: bug.NewOpBase(bug.SetTitleOp, author),
Title: title,
}
}
func (op SetTitleOperation) Apply(snapshot bug.Snapshot) bug.Snapshot {
snapshot.Title = op.Title
+
return snapshot
}