From 6a12373965aff9f80147f8b5bff6a5a104927365 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 25 Jul 2018 18:01:32 +0200 Subject: more refactoring to have reusable bug action across different UI --- bug/operations/add_comment.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bug/operations/add_comment.go') diff --git a/bug/operations/add_comment.go b/bug/operations/add_comment.go index 9ee8dc64..66725915 100644 --- a/bug/operations/add_comment.go +++ b/bug/operations/add_comment.go @@ -31,3 +31,8 @@ func (op AddCommentOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { return snapshot } + +func Comment(b *bug.Bug, author bug.Person, message string) { + addCommentOp := NewAddCommentOp(author, message) + b.Append(addCommentOp) +} -- cgit