aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operations/set_status.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/operations/set_status.go')
-rw-r--r--bug/operations/set_status.go9
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
}