aboutsummaryrefslogtreecommitdiffstats
path: root/operations
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-09-24 20:19:16 +0200
committerMichael Muré <batolettre@gmail.com>2018-09-24 20:19:16 +0200
commita72ea453a919b8f456cc46fbb7a1156d9f649442 (patch)
treefd3b0abae75df2d29184a3b98c681badce8ee4c8 /operations
parentc4a207622a894ba9839f1a3c47c9d78beff9b861 (diff)
downloadgit-bug-a72ea453a919b8f456cc46fbb7a1156d9f649442.tar.gz
bug: add the ability to store arbitrary metadata on an operation
Diffstat (limited to 'operations')
-rw-r--r--operations/add_comment.go2
-rw-r--r--operations/create.go2
-rw-r--r--operations/label_change.go2
-rw-r--r--operations/operations_test.go2
-rw-r--r--operations/set_status.go2
-rw-r--r--operations/set_title.go2
6 files changed, 6 insertions, 6 deletions
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"`
}