Fix: fall back to default branch when workflow_dispatch trigger missing on PR branch#40441
Closed
Copilot wants to merge 2 commits into
Closed
Fix: fall back to default branch when workflow_dispatch trigger missing on PR branch#40441Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…ng on PR branch When the router dispatches a workflow (e.g. skillet) on a PR's head branch and that branch doesn't have the compiled .lock.yml, GitHub returns HTTP 422 "Workflow does not have 'workflow_dispatch' trigger". The router now detects this error and retries on the default branch. 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 20, 2026 06:22
View session
This was referenced Jun 20, 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.
Copilot-generated PR branches (e.g.
copilot/add-auto-updates-field) only contain files the agent directly modified — they don't carry compiled.lock.ymlworkflows likeskillet.lock.yml. When the centralized router dispatchedskillet.lock.ymlon such a branch, GitHub returned HTTP 422 "Workflow does not have 'workflow_dispatch' trigger", crashing the router instead of running skillet.Changes
isMissingWorkflowDispatchTriggerError()— new helper that detects the specific 422 "does not have 'workflow_dispatch' trigger" error, modeled after the existingisDisabledWorkflowDispatchErrordispatchWorkflow()fallback — accepts an optionalfallbackRef; on trigger-missing error, retries onfallbackRefwith no further recursion (passesundefinedon the retry to prevent loops)main()wiring — both slash-command and label-route dispatch calls now pass the repository's default branch asfallbackRef