From 0a81ff53fdfe8cae0e0ad60d43e30fccf4d8121e Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 13 May 2026 22:16:13 +0200 Subject: [PATCH] tools.func: encode GitHub tag, refine pin logic, add Codeberg (#14473) * Encode GitHub tag, refine pin logic, add Codeberg Encode pinned GitHub tag slashes for API requests and avoid stripping a leading 'v' unless followed by a digit. Refactor pinned-version handling to match clean tags to raw tags, report missing pins, and set CHECK_UPDATE_RELEASE/messages appropriately. Add a new check_for_codeberg_release function to query Codeberg releases (uses jq, DNS check, handles legacy migration, pinned/latest comparison) so updates can be detected from Codeberg-hosted repos. * Update tools.func --- misc/tools.func | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 72cd3384d..2fcd6749e 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -2394,11 +2394,12 @@ check_for_gh_release() { # For pinned versions, query the specific release tag directly if [[ -n "$pinned_version_in" ]]; then + local pinned_version_encoded="${pinned_version_in//\//%2F}" http_code=$(curl -sSL --max-time 20 -w "%{http_code}" -o /tmp/gh_check.json \ -H 'Accept: application/vnd.github+json' \ -H 'X-GitHub-Api-Version: 2022-11-28' \ "${header_args[@]}" \ - "https://api.github.com/repos/${source}/releases/tags/${pinned_version_in}" 2>/dev/null) || true + "https://api.github.com/repos/${source}/releases/tags/${pinned_version_encoded}" 2>/dev/null) || true if [[ "$http_code" == "200" ]] && [[ -s /tmp/gh_check.json ]]; then releases_json="[$(