Fix broken automerge workflow: uncomment event triggers and declare missing dry-run input#6397
Open
Copilot wants to merge 4 commits into
Open
Fix broken automerge workflow: uncomment event triggers and declare missing dry-run input#6397Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/espnet/espnet/sessions/34a167ed-2d62-4faa-97ac-96dddd35e25d Co-authored-by: sw005320 <11741550+sw005320@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix automerge workflow by uncommenting event types
Fix broken automerge workflow: uncomment event triggers and declare missing dry-run input
Mar 27, 2026
Agent-Logs-Url: https://github.com/espnet/espnet/sessions/656dd5f5-9f6d-4e04-b297-51c74b9cff17 Co-authored-by: sw005320 <11741550+sw005320@users.noreply.github.com>
Member
|
pre-commit.ci autofix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GITHUB_TOKENis an integration token, blocked from/userAPI thatreitermarkus/automerge@v2requiresAUTOMERGE_TOKEN) instead ofGITHUB_TOKENOriginal prompt
The automerge workflow in
.github/workflows/automerge.ymlis broken due to two issues:Issue 1: Most
pull_request_targetevent types are commented outLines 22–27 have critical event types commented out:
The only active trigger is
ready_for_review, meaning the automerge workflow will not run when:automergelabelautomergelabel won't trigger a merge attemptnever-mergewon't trigger a re-checkFix: Uncomment these event types so the workflow triggers on all relevant PR events:
Issue 2:
dry-runreferences an undefined workflow_dispatch inputLine 53 references
github.event.inputs.dry-runbut this input is never declared in theworkflow_dispatch.inputssection:Fix: Add the
dry-runinput to theworkflow_dispatch.inputssection:Full fixed file
The corrected
.github/workflows/automerge.ymlshould be:The following is the prior conversation context from the user's chat exploration (may be truncated):
User: why automerge is broken?
Assistant: Based on my analysis of the automerge workflow in
espnet/espnet, here are the issues causing it to be broken:Root Causes
1. 🔴 Most
pull_request_targetevent types are commented out (Lines 22–27)The only active trigger is
ready_for_review, meaning the automerge workflow will not run when:automergelabelautomergelabel won't trigger a merge attemptnever-mergewon't trigger a re-checkThis is the most likely reason automerge appears broken — even if you add the
automergelabel, nothing happens because thelabeledevent is commented out.2. 🟡
dry-runreferences an undefined input (Line 53)