ci: paginate compare API when listing release contributors (#12913)

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Julian Risch
2026-09-24 13:29:11 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 97677b88f5
commit 56157f378c
+5 -8
View File
@@ -79,14 +79,11 @@ jobs:
START: v${{ steps.version.outputs.current_release }}-rc0
END: ${{ github.ref_name }}
run: |
JQ_EXPR='[.commits[].author.login]
| map(select(. != null and . != "HaystackBot" and . != "dependabot[bot]" and . != "github-actions[bot]"))
| unique
| sort_by(ascii_downcase)
| map("@\(.)")
| join(", ")'
CONTRIBUTORS=$(gh api "repos/deepset-ai/haystack/compare/$START...$END" \
--jq "$JQ_EXPR") || { echo "Unable to fetch contributors"; exit 1; }
# --paginate applies --jq per page, so dedupe and join after collecting all pages
CONTRIBUTORS=$(set -o pipefail; gh api --paginate "repos/deepset-ai/haystack/compare/$START...$END?per_page=100" \
--jq '.commits[].author.login | select(. != null)' \
| grep -vxE 'HaystackBot|dependabot\[bot\]|github-actions\[bot\]' \
| sort -fu | sed 's/^/@/' | paste -sd, - | sed 's/,/, /g') || { echo "Unable to fetch contributors"; exit 1; }
{
echo ""