Skip to content

Commit 5815529

Browse files
mattleibowCopilot
andauthored
Fix automerge: only trigger on success, not every status update (#83)
Filter status events to state=='success' in the job condition. Eliminates runs for pending/error/failure states. The workflow now only comments/merges once ALL required statuses are green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4ceec14 commit 5815529

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/automerge-docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ permissions:
1414

1515
jobs:
1616
check-and-merge:
17-
# Only run when a Learn Build status reports on the automation branch
17+
# Only run when a Learn Build status succeeds on the automation branch.
18+
# Ignore pending/error/failure — we only care when a status completes green.
1819
if: |
20+
github.event.state == 'success' &&
1921
(github.event.context == 'OpenPublishing.Build' ||
2022
github.event.context == 'PoliCheck Scan') &&
2123
contains(github.event.branches.*.name, 'automation/write-api-docs')

0 commit comments

Comments
 (0)