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

Function Open

entities/bug/op_set_status.go:75–85  ·  view source on GitHub ↗

Open is a convenience function to change a bugs state to Open

(b Interface, author identity.Interface, unixTime int64, metadata map[string]string)

Source from the content-addressed store, hash-verified

73
74// Open is a convenience function to change a bugs state to Open
75func Open(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) {
76 op := NewSetStatusOp(author, unixTime, common.OpenStatus)
77 for key, value := range metadata {
78 op.SetMetadata(key, value)
79 }
80 if err := op.Validate(); err != nil {
81 return nil, err
82 }
83 b.Append(op)
84 return op, nil
85}
86
87// Close is a convenience function to change a bugs state to Close
88func Close(b Interface, author identity.Interface, unixTime int64, metadata map[string]string) (*SetStatusOperation, error) {

Callers 2

OpenRawMethod · 0.92
openFunction · 0.92

Calls 4

NewSetStatusOpFunction · 0.85
SetMetadataMethod · 0.65
ValidateMethod · 0.65
AppendMethod · 0.65

Tested by

no test coverage detected