From d3ff59fd8ad98a39847bab64ee3857daaecff8cc Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Sat, 5 Sep 2026 00:47:33 -0700 Subject: [PATCH] fix(cost-map-sync): keep the reconcile step green when arming auto-merge fails A failed `gh pr merge --auto` in the fallback arm aborted the step under `set -e` before the warning and before `sync` was written, so every later tick went red on the same PR. The failure now prints a warning naming the PR for a human to merge and the tick carries on. --- .github/workflows/cost-map-sync.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cost-map-sync.yml b/.github/workflows/cost-map-sync.yml index 2758a2082ea..45aa71a9195 100644 --- a/.github/workflows/cost-map-sync.yml +++ b/.github/workflows/cost-map-sync.yml @@ -72,10 +72,10 @@ jobs: SUCCESS,pass|SUCCESS,pass,skipping|SUCCESS,skipping) if gh pr merge "$number" --repo "$GITHUB_REPOSITORY" --merge --delete-branch; then echo "Merged sync PR #$number; the next scheduled run syncs from the merged registry." + elif [ "$(jq -r .autoMergeRequest <<< "$pr")" = "null" ] \ + && ! gh pr merge "$number" --repo "$GITHUB_REPOSITORY" --auto --merge --delete-branch; then + echo "::warning::Sync PR #$number is green but the app can neither merge it nor arm auto-merge on $GITHUB_REF_NAME; a human has to merge it." else - if [ "$(jq -r .autoMergeRequest <<< "$pr")" = "null" ]; then - gh pr merge "$number" --repo "$GITHUB_REPOSITORY" --auto --merge --delete-branch - fi echo "::warning::Sync PR #$number is green but the app is not a bypass actor on $GITHUB_REF_NAME; auto-merge is armed, so one approval lands it." fi ;;