Skip to content

Commit

Permalink
Mention why a manual review is required
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 15, 2024
1 parent 65bd2e7 commit 07f0c4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Cavil/Task/Analyze.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down

0 comments on commit 07f0c4b

Please sign in to comment.