GithubStatus: $build -> $topbuild, $b -> $build (perlcritic)

[?]
Aug 21, 2021, 1:45 AM
OALLGBOPQIVXWK6GU5VCIC4GFPRV43PI7XB75B6TC7PJUQB6AQEAC

Dependencies

  • [2] GLINJE24 GithubStatus: Don't send a pending status for already-finished builds
  • [3] 7LD275CW allow using a shorter context and increase hydra-notify debug
  • [4] NSRWW6LC Add a plugin to interact with the github status API.
  • [5] 3STSGGIY GithubStatus: Allow config to specify the integration description and context
  • [6] 5WNGKHLZ Plugins: Add isEnabled method
  • [7] WIM6VQOH GithubStatus: Include the full job name and build ID in the context.

Change contents

  • replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 28
    [4.529][4.529:582]()
    my ($self, $build, $dependents, $finished) = @_;
    [4.529]
    [4.582]
    my ($self, $topbuild, $dependents, $finished) = @_;
  • replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 34
    [4.809][4.809:933]()
    foreach my $b ($build, @{$dependents}) {
    my $jobName = showJobName $b;
    my $evals = $build->jobsetevals;
    [4.809]
    [4.933]
    foreach my $build ($topbuild, @{$dependents}) {
    my $jobName = showJobName $build;
    my $evals = $topbuild->jobsetevals;
  • replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 42
    [2.87][2.87:140]()
    next if !$finished && $b->finished == 1;
    [2.87]
    [4.1398]
    next if !$finished && $build->finished == 1;
  • replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 44
    [4.1399][4.2:91]()
    my $contextTrailer = $conf->{excludeBuildFromContext} ? "" : (":" . $b->id);
    [4.1399]
    [3.163]
    my $contextTrailer = $conf->{excludeBuildFromContext} ? "" : (":" . $build->id);
  • replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 51
    [4.145][4.145:292](),[4.292][4.0:102]()
    state => $finished ? toGithubState($b->buildstatus) : "pending",
    target_url => "$baseurl/build/" . $b->id,
    description => $conf->{description} // "Hydra build #" . $b->id . " of $jobName",
    [4.145]
    [3.528]
    state => $finished ? toGithubState($build->buildstatus) : "pending",
    target_url => "$baseurl/build/" . $build->id,
    description => $conf->{description} // "Hydra build #" . $build->id . " of $jobName",