Skip to content

Commit 82f8dbf

Browse files
authored
Merge pull request #69 from isaaclins/fix/reaper-api-body
Fix the preview reaper: it never actually read a PR state
2 parents d2207f9 + 4aa69aa commit 82f8dbf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/pr-preview-reaper.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ jobs:
6868
6969
response_file="$(mktemp)"
7070
api_exit=0
71-
gh api --include --silent "repos/$REPOSITORY/pulls/$pr_number" >"$response_file" || api_exit=$?
71+
# 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=$?
7275
status_code="$(awk '/^HTTP\/[^ ]+ / { code=$2 } END { print code }' "$response_file")"
7376
7477
if (( api_exit == 0 )); then

0 commit comments

Comments
 (0)