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

Method NewRaw

cache/bug_subcache.go:239–256  ·  view source on GitHub ↗

NewRaw create a new bug with attached files for the message, as well as metadata for the Create operation. The new bug is written in the repository (commit)

(author identity.Interface, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string)

Source from the content-addressed store, hash-verified

237// well as metadata for the Create operation.
238// The new bug is written in the repository (commit)
239func (c *RepoCacheBug) NewRaw(author identity.Interface, unixTime int64, title string, message string, files []repository.Hash, metadata map[string]string) (*BugCache, *bug.CreateOperation, error) {
240 b, op, err := bug.Create(author, unixTime, title, message, files, metadata)
241 if err != nil {
242 return nil, nil, err
243 }
244
245 err = b.Commit(c.repo)
246 if err != nil {
247 return nil, nil, err
248 }
249
250 cached, err := c.add(b)
251 if err != nil {
252 return nil, nil, err
253 }
254
255 return cached, op, nil
256}

Callers 15

NewWithFilesMethod · 0.95
TestCacheFunction · 0.45
TestLongDescriptionFunction · 0.45
ensureIssueMethod · 0.45
ensurePersonMethod · 0.45
getGhostMethod · 0.45
ensurePersonMethod · 0.45
ImportAllMethod · 0.45
ensureIssueMethod · 0.45
ensurePersonMethod · 0.45
ensurePersonMethod · 0.45
ensureIssueMethod · 0.45

Calls 3

CreateFunction · 0.92
addMethod · 0.80
CommitMethod · 0.65

Tested by 3

TestCacheFunction · 0.36
TestLongDescriptionFunction · 0.36
TestSelectFunction · 0.36