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)
| 237 | // well as metadata for the Create operation. |
| 238 | // The new bug is written in the repository (commit) |
| 239 | func (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 | } |