[bug] Operations: add GetAuthor method for operation interface and

Amine Hilaly created

BaseOp

Change summary

bug/operation.go | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

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
+}