From d55c328b5bd5c02e5c9fe202d41fb30360f9f44a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Jan 2018 14:49:22 +0100 Subject: gerrit-bot: comment out status check in move command processing contrary to expectations, the 'status' field is simply missing from the event streams change object. we'll let the worker script complain about the problem instead. Change-Id: Ie7cc6af462372f52a1e942fec836c680f0f51dd2 Reviewed-by: Orgad Shaneh --- git-hooks/gerrit-bot | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/git-hooks/gerrit-bot b/git-hooks/gerrit-bot index 2805cf8..1227185 100755 --- a/git-hooks/gerrit-bot +++ b/git-hooks/gerrit-bot @@ -247,9 +247,10 @@ sub do_move($$$) if ($target eq $branch) { return "The change already targets $branch"; } - my %allowed_status = ('NEW' => 1, 'DEFERRED' => 1, 'DRAFT' => 1, 'ABANDONED' => 1); - my $status = $$chg{'status'}; - return "$status changes cannot be moved" if (!$allowed_status{$status}); + # FIXME: this doesn't work, as for some reason the event stream does not include the status. + #my %allowed_status = ('NEW' => 1, 'DEFERRED' => 1, 'DRAFT' => 1, 'ABANDONED' => 1); + #my $status = $$chg{'status'}; + #return "$status changes cannot be moved" if (!$allowed_status{$status}); my $project = $$chg{'project'}; my $id = $$chg{'id'}; # First, check there's no such review on that branch already -- cgit v1.2.3