From 32b7fee8d85555f15eb98f0ce7ee70532cbf5956 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 6 Mar 2026 16:32:44 +0800 Subject: [PATCH] Fix version extraction to fallback on repository name if tag name is absent --- src/StaticPHP/Artifact/Downloader/Type/GitHubTarball.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StaticPHP/Artifact/Downloader/Type/GitHubTarball.php b/src/StaticPHP/Artifact/Downloader/Type/GitHubTarball.php index a9283722..61517a9e 100644 --- a/src/StaticPHP/Artifact/Downloader/Type/GitHubTarball.php +++ b/src/StaticPHP/Artifact/Downloader/Type/GitHubTarball.php @@ -42,12 +42,12 @@ class GitHubTarball implements DownloadTypeInterface, CheckUpdateInterface } if ($match_url === null) { $url = $rel['tarball_url'] ?? null; - $version = $rel['tag_name'] ?? null; + $version = $rel['tag_name'] ?? $rel['name'] ?? null; break; } if (preg_match("|{$match_url}|", $rel['tarball_url'] ?? '')) { $url = $rel['tarball_url']; - $version = $rel['tag_name'] ?? null; + $version = $rel['tag_name'] ?? $rel['name'] ?? null; break; } }