From 07f0c4b8f99eb6c84a2a5035c22f1be3215642e5 Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Thu, 15 Aug 2024 13:20:12 +0200 Subject: [PATCH] Mention why a manual review is required --- lib/Cavil/Task/Analyze.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Cavil/Task/Analyze.pm b/lib/Cavil/Task/Analyze.pm index fb57cd0a4..5430ded37 100644 --- a/lib/Cavil/Task/Analyze.pm +++ b/lib/Cavil/Task/Analyze.pm @@ -112,7 +112,7 @@ sub _analyzed ($job, $id) { # Every package needs a human review before future versions can be auto-accepted (still gets a diff) unless ($pkgs->has_human_review($pkg->{name})) { - _look_for_smallest_delta($app, $pkg, 0) if $pkg->{state} eq 'new'; + _look_for_smallest_delta($app, $pkg, 0, 0) if $pkg->{state} eq 'new'; return; } @@ -173,10 +173,10 @@ sub _analyzed ($job, $id) { $pkgs->update($pkg); } - _look_for_smallest_delta($app, $pkg, 1) if $pkg->{state} eq 'new'; + _look_for_smallest_delta($app, $pkg, 1, 1) if $pkg->{state} eq 'new'; } -sub _look_for_smallest_delta ($app, $pkg, $allow_accept) { +sub _look_for_smallest_delta ($app, $pkg, $allow_accept, $has_human_review) { my $reports = $app->reports; my $pkgs = $app->packages; @@ -198,6 +198,8 @@ sub _look_for_smallest_delta ($app, $pkg, $allow_accept) { $pkg->{review_timestamp} = 1; } $pkg->{result} = "Not found any signficant difference against $old->{id}"; + $pkg->{result} .= ', manual review is required because previous reports are missing a reviewing user' + unless $has_human_review; $pkgs->update($pkg); return; }