fix: remove dispatch-repository dash alias from parser#39639
Conversation
|
Hey
If you'd like a hand completing the implementation, here's a ready-to-use prompt:
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
dispatch-repository dash alias from parser
There was a problem hiding this comment.
⚠️ Not ready to approve
A small regression test should be added to assert the dash-form key is now rejected, so the behavior change is protected against accidental reintroduction.
Pull request overview
This PR removes support for the dispatch-repository (dash) alias in parseDispatchRepositoryConfig, so the parser only accepts dispatch_repository (underscore) and stays consistent with the safe-outputs schema.
Changes:
- Removed the
dispatch-repositoryfallback lookup so onlydispatch_repositoryis recognized. - Removed the unit test that previously asserted the dash alias was accepted.
File summaries
| File | Description |
|---|---|
| pkg/workflow/dispatch_repository.go | Drops the dash-key fallback so parsing matches the schema’s underscore-only key. |
| pkg/workflow/dispatch_repository_test.go | Removes the dash-alias acceptance test (and leaves room for a replacement “rejected” test). |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| require.Len(t, config.Tools, 1, "Should have 1 tool") | ||
| } | ||
|
|
||
| // TestParseDispatchRepositoryConfig_Absent tests that nil is returned when key is absent |
|
@copilot review all comments and address unresolved review feedback for this PR.
|
parseDispatchRepositoryConfigaccepted bothdispatch_repositoryanddispatch-repository, but the safe-output schema only declared the underscore form — creating a silent parser-vs-schema gap where the dash form would parse but fail schema validation.Changes
pkg/workflow/dispatch_repository.go: Drop thedispatch-repositoryfallback lookup; onlydispatch_repositoryis now accepted.pkg/workflow/dispatch_repository_test.go: RemoveTestParseDispatchRepositoryConfig_DashAliaswhich covered the removed behaviour.