Fix Github status plugin for flakes
[?]
Feb 5, 2021, 11:02 PM
6XZA5RB6BSKGDOK7DM4BFIMVZ46NY6IETDORSRISGZAVR2ZEK4PACDependencies
- [2]
YH2ITHUE[DEVOPS-1126] throttle github status calls to remain under api ratelimits - [3]
7LD275CWallow using a shorter context and increase hydra-notify debug - [4]
NSRWW6LCAdd a plugin to interact with the github status API. - [5]
WIM6VQOHGithubStatus: Include the full job name and build ID in the context. - [6]
5K2OOGOQGithub status API: Pull authorization from github_authorization by default
Change contents
- replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 60
foreach my $input (@inputs) {my $i = $eval->jobsetevalinputs->find({ name => $input, altnr => 0 });next unless defined $i;my $uri = $i->uri;my $rev = $i->revision;my $key = $uri . "-" . $rev;next if exists $seen{$input}->{$key};my $sendStatus = sub {my ($input, $owner, $repo, $rev) = @_;my $key = $owner . "-" . $repo . "-" . $rev;return if exists $seen{$input}->{$key}; - replacement in src/lib/Hydra/Plugin/GithubStatus.pm at line 67
$uri =~ m/([^/]+?)(?:.git)?$!;my $owner = $1;my $repo = $2; - edit in src/lib/Hydra/Plugin/GithubStatus.pm at line 90
}};if (defined $eval->flake) {my $fl = $eval->flake;print STDERR "Flake is $fl\n";$eval->flake =~ m!github:([^/]+)/([^/]+)/(.+)$!;$sendStatus->("src", $1, $2, $3);} else {foreach my $input (@inputs) {my $i = $eval->jobsetevalinputs->find({ name => $input, altnr => 0 });if (! defined $i) {print STDERR "Evaluation $eval doesn't have input $input\n";}next unless defined $i;my $uri = $i->uri;my $rev = $i->revision;$uri =~ m/([^/]+?)(?:.git)?$!;$sendStatus->($input, $1, $2, $rev);