2 parents d2207f9 + 4aa69aa commit 82f8dbfCopy full SHA for 82f8dbf
1 file changed
.github/workflows/pr-preview-reaper.yml
@@ -68,7 +68,10 @@ jobs:
68
69
response_file="$(mktemp)"
70
api_exit=0
71
- gh api --include --silent "repos/$REPOSITORY/pulls/$pr_number" >"$response_file" || api_exit=$?
+ # No --silent here. It suppresses the response body, which leaves the
72
+ # file holding headers only, so the state parse below finds nothing
73
+ # and every run dies on the first preview it inspects.
74
+ gh api --include "repos/$REPOSITORY/pulls/$pr_number" >"$response_file" || api_exit=$?
75
status_code="$(awk '/^HTTP\/[^ ]+ / { code=$2 } END { print code }' "$response_file")"
76
77
if (( api_exit == 0 )); then
0 commit comments