File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6666
6767 echo "Scanning branch $BRANCH from $SINCE to $UNTIL" >&2
6868
69- # Get runs (paginated, only up to 100 runs per API call, modify as needed for deeper history)
70- RUNS=$(gh api "/repos/${TARGET_REPO}/actions/runs?branch=${BRANCH}&status=failure&per_page=100" | jq -c '.workflow_runs[] | select(.created_at >= "'${SINCE}'T00:00:00Z" and .created_at <= "'${UNTIL}'T23:59:59Z")')
69+
70+ RAW_RUNS=$(gh api "/repos/${TARGET_REPO}/actions/runs?branch=${BRANCH}&status=failure&per_page=100")
71+ if [ -z "$RAW_RUNS" ]; then
72+ echo "No API response or empty response for workflow runs." >&2
73+ else
74+ RUNS=$(echo "$RAW_RUNS" | jq -c '.workflow_runs[] | select(.created_at >= "'${SINCE}'T00:00:00Z" and .created_at <= "'${UNTIL}'T23:59:59Z")')
75+ fi
76+
7177 if [ -z "$RUNS" ]; then
7278 echo "No failed runs found in this window" >&2
7379 else
You can’t perform that action at this time.
0 commit comments