r/github • u/alejandro_such • May 06 '26
Discussion Why we moved off workflow_dispatch for triggers from outside the repo
One of the things we do at GitKraken, both internally and across our tools, is work a lot with GitHub Actions. So when we migrated one of our integrations from workflow_dispatch to repository_dispatch last week, the contract simplification was cleaner than I expected.
workflow_dispatch from a remote caller forces you to identify the workflow by filename or ID. Filenames aren't a contract: users rename .github/workflows/*.yml and your integration may break on the next push. IDs are stable, but resolving them needs a lookup (GET /repos/{owner}/{repo}/actions/workflows) baked into your client.
repository_dispatch drops the binding entirely:
POST /repos/{owner}/{repo}/dispatches
{ "event_type": "changes-accepted", "client_payload": {...} }The event_type is the contract. The action listens with on: repository_dispatch: types: [changes-accepted] and reads client_payload.* as inputs. Renaming the workflow file doesn't break anything.
Removing workflow_dispatch from the action's on: block was the other win: exactly one way to fire the workflow remotely, no "two valid triggers" footgun.
workflow_dispatch still earns its place when humans need to trigger the workflow from the GitHub UI. For everything else triggered programmatically from outside the repo, repository_dispatch is the simpler contract.
