aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operations/set_title.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/operations/set_title.go')
-rw-r--r--bug/operations/set_title.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/bug/operations/set_title.go b/bug/operations/set_title.go
index 1e2ef20a..39f4b332 100644
--- a/bug/operations/set_title.go
+++ b/bug/operations/set_title.go
@@ -5,19 +5,17 @@ import "github.com/MichaelMure/git-bug/bug"
var _ bug.Operation = SetTitleOperation{}
type SetTitleOperation struct {
- Title string
+ bug.OpBase
+ Title string `json:"t"`
}
func NewSetTitleOp(title string) SetTitleOperation {
return SetTitleOperation{
- Title: title,
+ OpBase: bug.OpBase{OperationType: bug.SET_TITLE},
+ Title: title,
}
}
-func (op SetTitleOperation) OpType() bug.OperationType {
- return bug.SET_TITLE
-}
-
func (op SetTitleOperation) Apply(snapshot bug.Snapshot) bug.Snapshot {
snapshot.Title = op.Title
return snapshot