Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/pr-preview-reaper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ jobs:

response_file="$(mktemp)"
api_exit=0
gh api --include --silent "repos/$REPOSITORY/pulls/$pr_number" >"$response_file" || api_exit=$?
# No --silent here. It suppresses the response body, which leaves the
# file holding headers only, so the state parse below finds nothing
# and every run dies on the first preview it inspects.
gh api --include "repos/$REPOSITORY/pulls/$pr_number" >"$response_file" || api_exit=$?
status_code="$(awk '/^HTTP\/[^ ]+ / { code=$2 } END { print code }' "$response_file")"

if (( api_exit == 0 )); then
Expand Down
Loading