diff options
author | Michael Muré <batolettre@gmail.com> | 2023-08-14 16:58:06 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2023-08-14 16:58:06 +0200 |
commit | 297e1931a7b5913275e8e9b0a46494d95e7e5e7c (patch) | |
tree | 5c5ef10f66bff4f9e6e3bbe87c70c02940bdbce3 /entities/bug/op_edit_comment.go | |
parent | f0167a1d6068d22af5ffff260e2848f7c14a71b3 (diff) | |
download | git-bug-bootstrap-rework-2.tar.gz git-bug-bootstrap-rework-2.zip |
WIP 2bootstrap-rework-2
Diffstat (limited to 'entities/bug/op_edit_comment.go')
-rw-r--r-- | entities/bug/op_edit_comment.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/entities/bug/op_edit_comment.go b/entities/bug/op_edit_comment.go index 788d16d92..d2f47db94 100644 --- a/entities/bug/op_edit_comment.go +++ b/entities/bug/op_edit_comment.go @@ -5,7 +5,6 @@ import ( "github.com/pkg/errors" - "github.com/MichaelMure/git-bug/entities/identity" "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/entity/dag" "github.com/MichaelMure/git-bug/repository" @@ -107,7 +106,7 @@ func (op *EditCommentOperation) Validate() error { return nil } -func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash) *EditCommentOperation { +func NewEditCommentOp(author entity.Identity, unixTime int64, target entity.Id, message string, files []repository.Hash) *EditCommentOperation { return &EditCommentOperation{ OpBase: dag.NewOpBase(EditCommentOp, author, unixTime), Target: target, @@ -117,7 +116,7 @@ func NewEditCommentOp(author identity.Interface, unixTime int64, target entity.I } // EditComment is a convenience function to apply the operation -func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { +func EditComment(b Interface, author entity.Identity, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { op := NewEditCommentOp(author, unixTime, target, message, files) for key, val := range metadata { op.SetMetadata(key, val) @@ -130,7 +129,7 @@ func EditComment(b Interface, author identity.Interface, unixTime int64, target } // EditCreateComment is a convenience function to edit the body of a bug (the first comment) -func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { +func EditCreateComment(b Interface, author entity.Identity, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) { createOp := b.FirstOp().(*CreateOperation) return EditComment(b, author, unixTime, createOp.Id(), message, files, metadata) } |