MCPcopy Index your code
hub / github.com/git-bug/git-bug / EditComment

Function EditComment

entities/bug/op_edit_comment.go:114–124  ·  view source on GitHub ↗

EditComment is a convenience function to apply the operation

(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string)

Source from the content-addressed store, hash-verified

112
113// EditComment is a convenience function to apply the operation
114func EditComment(b Interface, author identity.Interface, unixTime int64, target entity.Id, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) {
115 op := NewEditCommentOp(author, unixTime, target, message, files)
116 for key, val := range metadata {
117 op.SetMetadata(key, val)
118 }
119 if err := op.Validate(); err != nil {
120 return entity.UnsetCombinedId, nil, err
121 }
122 b.Append(op)
123 return entity.CombineIds(b.Id(), target), op, nil
124}
125
126// EditCreateComment is a convenience function to edit the body of a bug (the first comment)
127func EditCreateComment(b Interface, author identity.Interface, unixTime int64, message string, files []repository.Hash, metadata map[string]string) (entity.CombinedId, *EditCommentOperation, error) {

Callers 2

EditCommentRawMethod · 0.92
EditCreateCommentFunction · 0.85

Calls 6

CombineIdsFunction · 0.92
NewEditCommentOpFunction · 0.85
SetMetadataMethod · 0.65
ValidateMethod · 0.65
AppendMethod · 0.65
IdMethod · 0.65

Tested by

no test coverage detected