Skip to content

chore(pr-automation): verify auto-merge success with 10s retry#1930

Merged
piorpua merged 5 commits intomainfrom
zynx/chore/pr-automation-merge-retry
Mar 30, 2026
Merged

chore(pr-automation): verify auto-merge success with 10s retry#1930
piorpua merged 5 commits intomainfrom
zynx/chore/pr-automation-merge-retry

Conversation

@piorpua
Copy link
Copy Markdown
Contributor

@piorpua piorpua commented Mar 30, 2026

Summary

  • Add verification after gh pr merge --squash --auto to confirm merge was actually enabled (check state == MERGED or autoMergeRequest != null)
  • Add 10s sleep + one retry when first check fails, to handle transient GitHub mergeStateStatus: UNKNOWN state right after CI completes
  • Fall back to bot:ready-to-merge with a comment if both attempts fail, instead of silently labeling bot:done

Test plan

  • Trigger pr-automation on a PR with all CI passing — verify it merges and labels bot:done
  • Simulate transient failure: verify retry after 10s succeeds
  • Simulate persistent failure: verify PR is labeled bot:ready-to-merge with a comment

@piorpua piorpua enabled auto-merge (squash) March 30, 2026 08:59
@piorpua piorpua disabled auto-merge March 30, 2026 09:02
@piorpua piorpua enabled auto-merge March 30, 2026 09:02
@piorpua piorpua merged commit 4919241 into main Mar 30, 2026
7 checks passed
@piorpua piorpua deleted the zynx/chore/pr-automation-merge-retry branch March 30, 2026 09:05
@ucef94
Copy link
Copy Markdown

ucef94 commented Apr 2, 2026

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants