From ab6d81fad404af05dfeae7f74d1783a2f7367826 Mon Sep 17 00:00:00 2001 From: emily Date: Sun, 25 Aug 2024 13:53:19 +0200 Subject: [PATCH] api: fix github webhook --- src/lib/Hydra/Controller/API.pm | 2 +- t/Hydra/Controller/API/checks.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/API.pm b/src/lib/Hydra/Controller/API.pm index 06f35d4b..3105072d 100644 --- a/src/lib/Hydra/Controller/API.pm +++ b/src/lib/Hydra/Controller/API.pm @@ -273,7 +273,7 @@ sub push_github : Chained('api') PathPart('push-github') Args(0) { $c->{stash}->{json}->{jobsetsTriggered} = []; my $in = $c->request->{data}; - my $owner = $in->{repository}->{owner}->{name} or die; + my $owner = $in->{repository}->{owner}->{login} or die; my $repo = $in->{repository}->{name} or die; print STDERR "got push from GitHub repository $owner/$repo\n"; diff --git a/t/Hydra/Controller/API/checks.t b/t/Hydra/Controller/API/checks.t index 2b97b489..c2edf904 100644 --- a/t/Hydra/Controller/API/checks.t +++ b/t/Hydra/Controller/API/checks.t @@ -172,7 +172,7 @@ subtest "/api/push-github" => sub { "Content" => encode_json({ repository => { owner => { - name => "OWNER", + login => "OWNER", }, name => "LEGACY-REPO", } @@ -198,7 +198,7 @@ subtest "/api/push-github" => sub { "Content" => encode_json({ repository => { owner => { - name => "OWNER", + login => "OWNER", }, name => "FLAKE-REPO", }