Bug 30367: (follow-up) Same adjustment for gitlab

This adds the same update for gitlab code. I was unable to trigger the error,
however, I confirm searching for 'PayPal' returns a result after this patch
as well as before.

JD amended patch: fix indentation

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-05-03 10:58:22 +00:00 committed by Tomas Cohen Arazi
parent b12aa543e2
commit 88000fbccb
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ if ($plugins_enabled) {
my $project_id = $result->{id};
my $description = $result->{description} // '';
my $web_url = $result->{web_url};
my $releases_url = "https://gitlab.com/api/v4/projects/$project_id/releases";
my @releases = @{ from_json( get($releases_url) ) };
my $releases_url = "https://gitlab.com/api/v4/projects/$project_id/releases";
my $releases_info = get($releases_url);
next unless $releases_info;
my @releases = @{ from_json($releases_info) };
if ( scalar @releases > 0 ) {