MCPcopy Create free account
hub / github.com/git-bug/git-bug / SetMetadata

Function SetMetadata

entities/bug/op_set_metadata.go:14–21  ·  view source on GitHub ↗

SetMetadata is a convenience function to add metadata on another operation

(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string)

Source from the content-addressed store, hash-verified

12
13// SetMetadata is a convenience function to add metadata on another operation
14func SetMetadata(b Interface, author identity.Interface, unixTime int64, target entity.Id, newMetadata map[string]string) (*dag.SetMetadataOperation[*Snapshot], error) {
15 op := NewSetMetadataOp(author, unixTime, target, newMetadata)
16 if err := op.Validate(); err != nil {
17 return nil, err
18 }
19 b.Append(op)
20 return op, nil
21}

Callers 1

SetMetadataRawMethod · 0.92

Calls 3

NewSetMetadataOpFunction · 0.70
ValidateMethod · 0.65
AppendMethod · 0.65

Tested by

no test coverage detected