From e649a503963887c1fe5cdc3deaa0e2951261d76b Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Thu, 20 Jun 2019 23:56:49 +0200 Subject: [PATCH] [bug] Operations: add GetAuthor method for operation interface and BaseOp --- bug/operation.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bug/operation.go b/bug/operation.go index 8e77eed83c97d71584eaad8596343727045acd44..2cb27d18cba34a021ba53fa76d2c85da8b60a7d8 100644 --- a/bug/operation.go +++ b/bug/operation.go @@ -49,6 +49,8 @@ type Operation interface { GetMetadata(key string) (string, bool) // AllMetadata return all metadata for this operation AllMetadata() map[string]string + // GetAuthor return author identity + GetAuthor() identity.Interface } func hashRaw(data []byte) git.Hash { @@ -222,3 +224,7 @@ func (op *OpBase) AllMetadata() map[string]string { return result } + +func (op *OpBase) GetAuthor() identity.Interface { + return op.Author +}