From bcf37ab7059116dcbf30a8c0e2b6bb98c515dfa5 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 20 Aug 2021 21:40:25 -0400 Subject: [PATCH] GitlabStatus: $build -> $topbuild, $b -> $build (perlcritic) --- src/lib/Hydra/Plugin/GitlabStatus.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/Hydra/Plugin/GitlabStatus.pm b/src/lib/Hydra/Plugin/GitlabStatus.pm index ccbeb8d7..483d99bd 100644 --- a/src/lib/Hydra/Plugin/GitlabStatus.pm +++ b/src/lib/Hydra/Plugin/GitlabStatus.pm @@ -37,25 +37,25 @@ sub toGitlabState { } sub common { - my ($self, $build, $dependents, $status) = @_; + my ($self, $topbuild, $dependents, $status) = @_; my $baseurl = $self->{config}->{'base_uri'} || "http://localhost:3000"; # Find matching configs - foreach my $b ($build, @{$dependents}) { - my $jobName = showJobName $b; - my $evals = $build->jobsetevals; + foreach my $build ($topbuild, @{$dependents}) { + my $jobName = showJobName $build; + my $evals = $topbuild->jobsetevals; my $ua = LWP::UserAgent->new(); # Don't send out "pending/running" status updates if the build is already finished - next if $status < 2 && $b->finished == 1; + next if $status < 2 && $build->finished == 1; - my $state = toGitlabState($status, $b->buildstatus); + my $state = toGitlabState($status, $build->buildstatus); my $body = encode_json( { state => $state, - target_url => "$baseurl/build/" . $b->id, - description => "Hydra build #" . $b->id . " of $jobName", - name => "Hydra " . $b->get_column('job'), + target_url => "$baseurl/build/" . $build->id, + description => "Hydra build #" . $build->id . " of $jobName", + name => "Hydra " . $build->get_column('job'), }); while (my $eval = $evals->next) { my $gitlabstatusInput = $eval->jobsetevalinputs->find({ name => "gitlab_status_repo" });