(ctx context.Context, input models.BugStatusCloseInput)
| 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) |
| 287 | if err != nil { |
| 288 | return nil, err |
| 289 | } |
| 290 | |
| 291 | author, err := auth.UserFromCtx(ctx, repo) |
| 292 | if err != nil { |
| 293 | return nil, err |
| 294 | } |
| 295 | |
| 296 | op, err := b.CloseRaw(author, time.Now().Unix(), nil) |
| 297 | if err != nil { |
| 298 | return nil, err |
| 299 | } |
| 300 | |
| 301 | err = b.Commit() |
| 302 | if err != nil { |
| 303 | return nil, err |
| 304 | } |
| 305 | |
| 306 | return &models.BugStatusClosePayload{ |
| 307 | ClientMutationID: input.ClientMutationID, |
| 308 | Bug: models.NewLoadedBug(b.Snapshot()), |
| 309 | Operation: op, |
| 310 | }, nil |
| 311 | } |
| 312 | |
| 313 | func (r mutationResolver) BugSetTitle(ctx context.Context, input models.BugSetTitleInput) (*models.BugSetTitlePayload, error) { |
| 314 | repo, b, err := r.getBug(input.RepoRef, input.Prefix) |
nothing calls this directly
no test coverage detected