diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-18 00:16:06 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-18 00:16:06 +0200 |
commit | ba3281dc9918fa49f10c2a166b5b631a931d2d51 (patch) | |
tree | f6e9d17fa7828634f250c7af0674d5405ba0d224 /bug/operations/set_status.go | |
parent | 6f83d89274fc796e01149c84b91b8aa2066f0273 (diff) | |
download | git-bug-ba3281dc9918fa49f10c2a166b5b631a931d2d51.tar.gz |
all operations now have an author and a timestamp
Diffstat (limited to 'bug/operations/set_status.go')
-rw-r--r-- | bug/operations/set_status.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bug/operations/set_status.go b/bug/operations/set_status.go index aa673bb1..7c718cd6 100644 --- a/bug/operations/set_status.go +++ b/bug/operations/set_status.go @@ -1,6 +1,8 @@ package operations -import "github.com/MichaelMure/git-bug/bug" +import ( + "github.com/MichaelMure/git-bug/bug" +) // SetStatusOperation will change the status of a bug @@ -11,14 +13,15 @@ type SetStatusOperation struct { Status bug.Status } -func NewSetStatusOp(status bug.Status) SetStatusOperation { +func NewSetStatusOp(author bug.Person, status bug.Status) SetStatusOperation { return SetStatusOperation{ - OpBase: bug.OpBase{OperationType: bug.SetStatusOp}, + OpBase: bug.NewOpBase(bug.SetStatusOp, author), Status: status, } } func (op SetStatusOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { snapshot.Status = op.Status + return snapshot } |