Skip to content

Commit

Permalink
Reset reviewing user for all auto-accepts
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 11, 2024
1 parent 7211918 commit 9347ea1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Cavil/Controller/Queue.pm
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ sub import_package ($self) {
if (my $state = $validation->param('state')) {
$obj->{state} = $state;
if ($state eq 'new') {
$obj->{obsolete} = 0;
$reindex = 1;
$obj->{reviewing_user} = undef;
$obj->{obsolete} = 0;
$reindex = 1;
}
}
$pkgs->update($obj);
Expand Down
3 changes: 3 additions & 0 deletions lib/Cavil/Task/Analyze.pm
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ sub _analyzed ($job, $id) {
if (my $f_id = $found_acceptable_by_lawyer || $found_acceptable) {
$pkg->{state} = $found_acceptable_by_lawyer ? 'acceptable_by_lawyer' : 'acceptable';
$pkg->{review_timestamp} = 1;
$pkg->{reviewing_user} = undef;
$pkg->{result} = "Accepted because previously reviewed under the same license ($f_id)";
$pkgs->update($pkg);
return;
Expand All @@ -176,6 +177,7 @@ sub _analyzed ($job, $id) {

$pkg->{state} = 'acceptable';
$pkg->{review_timestamp} = 1;
$pkg->{reviewing_user} = undef;
$pkg->{result} = "Accepted because of low risk ($risk)";
$pkgs->update($pkg);
}
Expand Down Expand Up @@ -205,6 +207,7 @@ sub _look_for_smallest_delta ($app, $pkg, $allow_accept, $has_human_review) {
$pkg->{result} = "Accepted because of no significant difference ($old->{id})";
$pkg->{state} = 'acceptable';
$pkg->{review_timestamp} = 1;
$pkg->{reviewing_user} = undef;
}
$pkg->{notice} = "Not found any significant difference against $old->{id}";
$pkg->{notice} .= ', manual review is required because previous reports are missing a reviewing user'
Expand Down

0 comments on commit 9347ea1

Please sign in to comment.