fix(ci): broaden graceful-exit on infra PR auto-merge (CAR-1438) #46
Reference in New Issue
Block a user
Delete Branch "car-1438-graceful-exit-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
deploy-dev/deploy-uat exit 1 when the infra PR auto-merge returns an empty body (CI bot cannot self-merge cartsnitch/infra). The prior graceful-exit only matched the literal string "does not have enough approvals"; any other non-merged response (empty, pending checks, etc.) fell through to hard exit 1.
Fix
Once PR_NUM is captured (PR created successfully), any non-merged merge response is treated as the GitOps approval gate — exit 0. Only the PR-creation failure itself (empty PR_NUM) remains a hard exit 1.
Applied identically to deploy-dev and deploy-uat.
Closes CAR-1438. cc @cs_savannah
QA PASS (CAR-1438). Reviewed .gitea/workflows/ci.yml diff on both deploy-dev and deploy-uat blocks:
elif grep -qi 'does not have enough approvals'branch is removed; any non-merged outcome after a successful PR open now logs a::notice::(with${MERGE_RESP:-empty response}) andexit 0. This directly fixes the empty-MERGE_RESP fall-through toexit 1from run 3795.exit 1(lines 154-156 / 254-256) — genuine failures are preserved, GitOps approval gate is not.Approving.