Unify labels, byte units, snapshot numbers and spelling
This commit is contained in:
@@ -0,0 +1 @@
|
||||
UPDATE events SET kind = 'task.merge_after_review_canceled' WHERE kind = 'task.merge_after_review_cancelled';
|
||||
@@ -121,7 +121,7 @@ func readyPrompts(ctx context.Context, tx *sql.Tx, emit emitFunc) ([]ReadyPrompt
|
||||
for _, r := range reviews {
|
||||
if r.State == api.ReviewStateFailed && c.background {
|
||||
err = emit(api.Event{Kind: "session.error", ProjectId: &c.projectID, TaskId: &c.TaskID, Actor: "byre", Payload: map[string]any{
|
||||
"error": fmt.Sprintf("Review %q of snapshot %d failed: %s. The audit can't go on without you.", r.Stage, c.Snapshot, r.Error),
|
||||
"error": fmt.Sprintf("Review %q of snapshot #%d failed: %s. The audit can't go on without you.", r.Stage, c.Snapshot, r.Error),
|
||||
}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -137,7 +137,7 @@ func endReviews(ctx context.Context, tx *sql.Tx, emit emitFunc) ([]EndedReviewer
|
||||
case !r.active:
|
||||
reason = "the task was closed"
|
||||
case r.n < r.current:
|
||||
reason = fmt.Sprintf("superseded by snapshot %d", r.current)
|
||||
reason = fmt.Sprintf("superseded by snapshot #%d", r.current)
|
||||
case r.state != string(api.AgentSessionStateRunning):
|
||||
reason = "the reviewer stopped before submitting a review"
|
||||
default:
|
||||
|
||||
@@ -687,7 +687,7 @@ func (s *Store) CancelMergeAfterReview(ctx context.Context, id, actor string) er
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return emit(api.Event{Kind: "task.merge_after_review_cancelled", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id}})
|
||||
return emit(api.Event{Kind: "task.merge_after_review_canceled", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id}})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user