Ignore disabled workflow_dispatch targets in agentic maintenance routing#36739
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
June 3, 2026 22:08
View session
pelikhan
approved these changes
Jun 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the agentic maintenance router to gracefully handle GitHub API workflow_dispatch failures caused by disabled workflows, treating them as a skip so routing can continue and still provide a useful step summary.
Changes:
- Skip (instead of fail) when
createWorkflowDispatchreturns the disabled-workflow422error text (“Cannot trigger a 'workflow_dispatch' on a disabled workflow”). - Refactor step summary rendering to be shorter by default, with configured commands moved into a
<details>block and commands rendered as backticked list items. - Extend routing tests to cover the production disabled-workflow message and a mixed label-routing scenario where one disabled target does not block another dispatch.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/route_slash_command.cjs | Expands disabled-dispatch detection and updates step summary formatting to a shorter, progressive-disclosure layout. |
| actions/setup/js/route_slash_command.test.cjs | Updates summary assertions and adds coverage for the production disabled-workflow message plus mixed label-route dispatch behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
This was referenced Jun 4, 2026
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.
Agentic maintenance currently fails the routing job when one of the configured workflows is disabled and GitHub rejects its
workflow_dispatch. This changes routing to treat that case as a skip so other matching workflows still dispatch and the route step summary stays useful.Dispatch error handling
422response (Cannot trigger a 'workflow_dispatch' on a disabled workflow) in the centralized router.Route summary rendering
<details>so the default summary stays short.Coverage