Files
iptvnator/.github
4grayandClaude Opus 5 3300ed13ea ci(release): only a confirmed 404 excuses a failed draft delete
Greptile and Codex both flagged the same hole in the sweep's error
handling: `gh api` exits 1 for every failure alike, so a rate limit,
permission loss or outage that hit the DELETE would hit the follow-up GET
too — and the GET's nonzero exit was read as proof the draft was already
gone. `failed` stayed 0 and the sweep went green over a draft it never
deleted.

Read the response status instead of the exit code. `gh api -i` prints the
status line even for an error status, so a genuine 404 (the event job
racing the sweep to the same draft) is distinguishable from everything
else; a request that never got a response leaves the status empty, which
is not 404 and so stays a failure.

Verified against the live API: a deleted release re-checks as 404 and is
excused, an existing release re-checks as 200 and fails the job, and an
unreachable host yields no status and fails the job.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 20:37:56 +02:00
..
2024-06-30 18:54:51 +02:00