ci: paginate CA updater PR discovery
CI / format (pull_request) Successful in 2m12s
CI / lint (pull_request) Successful in 2m30s
CI / install (pull_request) Successful in 7m37s
CI / typetest (pull_request) Successful in 2m9s
CI / node-tests (pull_request) Successful in 2m33s
CI / typecheck (pull_request) Successful in 2m35s
CI / browser-tests (pull_request) Successful in 4m0s

Co-Authored-By: gpt-5.6-sol <noreply@openai.com>
This commit is contained in:
2026-07-31 17:45:54 +00:00
co-authored by Codex
parent 61d9269293
commit 5e24823570
+10 -3
View File
@@ -58,9 +58,16 @@ jobs:
api="$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY"
auth_header="Authorization: token $GITEA_TOKEN"
body="$(jq -Rs . < "$RUNNER_TEMP/pr-body.md")"
pulls="$(curl -fsSL -H "$auth_header" "$api/pulls?state=open&limit=50")"
number="$(jq -r --arg branch "$UPDATE_BRANCH" \
'.[] | select(.head.ref == $branch) | .number' <<< "$pulls" | head -n 1)"
page=1
number=""
while [[ -z "$number" ]]; do
pulls="$(curl -fsSL -H "$auth_header" \
"$api/pulls?state=open&limit=50&page=$page")"
number="$(jq -r --arg branch "$UPDATE_BRANCH" \
'.[] | select(.head.ref == $branch) | .number' <<< "$pulls" | head -n 1)"
[[ "$(jq length <<< "$pulls")" -lt 50 ]] && break
page=$((page + 1))
done
if [[ -n "$number" ]]; then
payload="$(jq -n --arg title "$PR_TITLE" --argjson body "$body" \