diff options
author | Michael Muré <batolettre@gmail.com> | 2018-10-01 23:34:45 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-10-01 23:34:45 +0200 |
commit | 8ec1dd092656aed5dae22a0301bd3f85b5dabb88 (patch) | |
tree | 26ee832a2d629d48e9ac9f43fc808f17a4a77154 /bug/operation.go | |
parent | f18c2d278352f556b90ad9a52c33499665e16fa2 (diff) | |
download | git-bug-8ec1dd092656aed5dae22a0301bd3f85b5dabb88.tar.gz |
github: working incremental + comment history for the first comment
Diffstat (limited to 'bug/operation.go')
-rw-r--r-- | bug/operation.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bug/operation.go b/bug/operation.go index f42a1192..bb88af1f 100644 --- a/bug/operation.go +++ b/bug/operation.go @@ -21,6 +21,7 @@ const ( SetStatusOp LabelChangeOp EditCommentOp + NoOpOp ) // Operation define the interface to fulfill for an edit operation of a Bug @@ -43,6 +44,8 @@ type Operation interface { SetMetadata(key string, value string) // GetMetadata retrieve arbitrary metadata about the operation GetMetadata(key string) (string, bool) + // AllMetadata return all metadata for this operation + AllMetadata() map[string]string } func hashRaw(data []byte) git.Hash { @@ -145,3 +148,8 @@ func (op *OpBase) GetMetadata(key string) (string, bool) { val, ok := op.Metadata[key] return val, ok } + +// AllMetadata return all metadata for this operation +func (op *OpBase) AllMetadata() map[string]string { + return op.Metadata +} |