From d5b3f9e6e58340b05fb765049f433e8cd752eb57 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 08:25:22 +0000 Subject: [PATCH] fix: codeberg_api_all propagates API errors instead of silently returning [] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove || break from the codeberg_api call in the pagination loop. With set -euo pipefail in all callers, a failed fetch now exits the function non-zero — matching the original curl -sf behaviour where a network or auth error aborted the script rather than returning empty results and risking a duplicate review. Co-Authored-By: Claude Sonnet 4.6 --- lib/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/env.sh b/lib/env.sh index 38a4820..85e28bf 100755 --- a/lib/env.sh +++ b/lib/env.sh @@ -68,7 +68,7 @@ codeberg_api_all() { esac page=1 while true; do - page_items=$(codeberg_api GET "${path_prefix}${sep}limit=50&page=${page}") || break + page_items=$(codeberg_api GET "${path_prefix}${sep}limit=50&page=${page}") count=$(printf '%s' "$page_items" | jq 'length') [ "$count" -eq 0 ] && break all_items=$(printf '%s\n%s' "$all_items" "$page_items" | jq -s 'add')