(ctx context.Context, input models.BugStatusOpenInput)
| 255 | } |
| 256 | |
| 257 | func (r mutationResolver) BugStatusOpen(ctx context.Context, input models.BugStatusOpenInput) (*models.BugStatusOpenPayload, error) { |
| 258 | repo, b, err := r.getBug(input.RepoRef, input.Prefix) |
| 259 | if err != nil { |
| 260 | return nil, err |
| 261 | } |
| 262 | |
| 263 | author, err := auth.UserFromCtx(ctx, repo) |
| 264 | if err != nil { |
| 265 | return nil, err |
| 266 | } |
| 267 | |
| 268 | op, err := b.OpenRaw(author, time.Now().Unix(), nil) |
| 269 | if err != nil { |
| 270 | return nil, err |
| 271 | } |
| 272 | |
| 273 | err = b.Commit() |
| 274 | if err != nil { |
| 275 | return nil, err |
| 276 | } |
| 277 | |
| 278 | return &models.BugStatusOpenPayload{ |
| 279 | ClientMutationID: input.ClientMutationID, |
| 280 | Bug: models.NewLoadedBug(b.Snapshot()), |
| 281 | Operation: op, |
| 282 | }, nil |
| 283 | } |
| 284 | |
| 285 | func (r mutationResolver) BugStatusClose(ctx context.Context, input models.BugStatusCloseInput) (*models.BugStatusClosePayload, error) { |
| 286 | repo, b, err := r.getBug(input.RepoRef, input.Prefix) |
nothing calls this directly
no test coverage detected