Merge pull request #924 from hackworthltd/fix-flake-github-status

Fix GitHub status update for private flakes.
This commit is contained in:
Eelco Dolstra 2021-05-03 16:24:51 +02:00 committed by GitHub
commit 886e6f85e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,8 +93,11 @@ sub common {
if (defined $eval->flake) { if (defined $eval->flake) {
my $fl = $eval->flake; my $fl = $eval->flake;
print STDERR "Flake is $fl\n"; print STDERR "Flake is $fl\n";
$eval->flake =~ m!github:([^/]+)/([^/]+)/(.+)$!; if ($eval->flake =~ m!github:([^/]+)/([^/]+)/([[:xdigit:]]{40})$! or $eval->flake =~ m!git\+ssh://git\@github.com/([^/]+)/([^/]+)\?.*rev=([[:xdigit:]]{40})$!) {
$sendStatus->("src", $1, $2, $3); $sendStatus->("src", $1, $2, $3);
} else {
print STDERR "Can't parse flake, skipping GitHub status update\n";
}
} else { } else {
foreach my $input (@inputs) { foreach my $input (@inputs) {
my $i = $eval->jobsetevalinputs->find({ name => $input, altnr => 0 }); my $i = $eval->jobsetevalinputs->find({ name => $input, altnr => 0 });