From a72ea453a919b8f456cc46fbb7a1156d9f649442 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 24 Sep 2018 20:19:16 +0200 Subject: bug: add the ability to store arbitrary metadata on an operation --- operations/add_comment.go | 2 +- operations/create.go | 2 +- operations/label_change.go | 2 +- operations/operations_test.go | 2 +- operations/set_status.go | 2 +- operations/set_title.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'operations') diff --git a/operations/add_comment.go b/operations/add_comment.go index 01572eb7..65606d77 100644 --- a/operations/add_comment.go +++ b/operations/add_comment.go @@ -13,7 +13,7 @@ import ( var _ bug.Operation = AddCommentOperation{} type AddCommentOperation struct { - bug.OpBase + *bug.OpBase Message string `json:"message"` // TODO: change for a map[string]util.hash to store the filename ? Files []git.Hash `json:"files"` diff --git a/operations/create.go b/operations/create.go index efd4492f..49c69482 100644 --- a/operations/create.go +++ b/operations/create.go @@ -14,7 +14,7 @@ import ( var _ bug.Operation = CreateOperation{} type CreateOperation struct { - bug.OpBase + *bug.OpBase Title string `json:"title"` Message string `json:"message"` Files []git.Hash `json:"files"` diff --git a/operations/label_change.go b/operations/label_change.go index 0ae4e032..478fbe30 100644 --- a/operations/label_change.go +++ b/operations/label_change.go @@ -12,7 +12,7 @@ var _ bug.Operation = LabelChangeOperation{} // LabelChangeOperation define a Bug operation to add or remove labels type LabelChangeOperation struct { - bug.OpBase + *bug.OpBase Added []bug.Label `json:"added"` Removed []bug.Label `json:"removed"` } diff --git a/operations/operations_test.go b/operations/operations_test.go index 6fba7917..b74dd8d1 100644 --- a/operations/operations_test.go +++ b/operations/operations_test.go @@ -34,7 +34,7 @@ func TestValidate(t *testing.T) { NewSetStatusOp(bug.Person{Name: "René Descartes", Email: "rene@descartes.fr\u001b"}, bug.ClosedStatus), NewSetStatusOp(bug.Person{Name: "René \nDescartes", Email: "rene@descartes.fr"}, bug.ClosedStatus), NewSetStatusOp(bug.Person{Name: "René Descartes", Email: "rene@\ndescartes.fr"}, bug.ClosedStatus), - CreateOperation{OpBase: bug.OpBase{ + CreateOperation{OpBase: &bug.OpBase{ Author: rene, UnixTime: 0, OperationType: bug.CreateOp, diff --git a/operations/set_status.go b/operations/set_status.go index 07dcf208..6ef95320 100644 --- a/operations/set_status.go +++ b/operations/set_status.go @@ -10,7 +10,7 @@ import ( var _ bug.Operation = SetStatusOperation{} type SetStatusOperation struct { - bug.OpBase + *bug.OpBase Status bug.Status `json:"status"` } diff --git a/operations/set_title.go b/operations/set_title.go index 46addce6..154998cf 100644 --- a/operations/set_title.go +++ b/operations/set_title.go @@ -13,7 +13,7 @@ import ( var _ bug.Operation = SetTitleOperation{} type SetTitleOperation struct { - bug.OpBase + *bug.OpBase Title string `json:"title"` Was string `json:"was"` } -- cgit