diff --git a/dev/dev-agent.sh b/dev/dev-agent.sh index 0e43171..21eba37 100755 --- a/dev/dev-agent.sh +++ b/dev/dev-agent.sh @@ -1244,8 +1244,7 @@ Instructions: REVIEW_SHA=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \ "${API}/pulls/${PR_NUMBER}" | jq -r '.head.sha') || true - REVIEW_COMMENT=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \ - "${API}/issues/${PR_NUMBER}/comments?limit=50" | \ + REVIEW_COMMENT=$(codeberg_api_all "/issues/${PR_NUMBER}/comments" | \ jq -r --arg sha "$REVIEW_SHA" \ '[.[] | select(.body | contains(" exists COMMENT_REVIEWED=$(echo "$ALL_COMMENTS" | \ @@ -797,8 +796,7 @@ if [ "$FOLLOWUP_COUNT" -gt 0 ]; then FU_DETAILS=$(printf '%s' "$fu" | jq -r '.details') # Check for duplicate - EXISTING=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \ - "${API_BASE}/issues?state=open&labels=tech-debt&limit=50" | \ + EXISTING=$(codeberg_api_all "/issues?state=open&labels=tech-debt" | \ jq -r --arg t "$FU_TITLE" '[.[] | select(.title == $t)] | length') if [ "${EXISTING:-0}" -gt 0 ]; then