-
Notifications
You must be signed in to change notification settings - Fork 28
Add wildcard support for workflow names in add command #3374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for wildcard workflow specifications (e.g., owner/repo/*) that allow users to add all workflows from a repository at once. The implementation introduces a new IsWildcard field to WorkflowSpec, parses wildcard syntax, discovers all workflows in an installed package, and expands them during the add command processing.
- Adds wildcard specification parsing in
parseWorkflowSpecto recognizeowner/repo/*patterns - Implements
discoverWorkflowsInPackageto find all markdown files in an installed package - Expands wildcards after package installation in
AddWorkflowsfunction
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/spec.go | Adds IsWildcard field to WorkflowSpec and wildcard detection logic in parseWorkflowSpec |
| pkg/cli/packages.go | Implements discoverWorkflowsInPackage function to find all workflows in a package |
| pkg/cli/add_wildcard_test.go | Tests for wildcard parsing and workflow discovery functionality |
| pkg/cli/add_command.go | Adds wildcard expansion logic after package installation and updates help text |
| docs/src/content/docs/status.mdx | Adds new workflow entries to the status table (unrelated documentation update) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Refactored wildcard expansion logic into dedicated helper function per code review feedback.
Changes
Helper function (
pkg/cli/add_command.go)expandWildcardWorkflows()helper function fromAddWorkflows()Dedicated tests (
pkg/cli/add_wildcard_test.go)TestExpandWildcardWorkflowswith comprehensive test cases:TestExpandWildcardWorkflows_ErrorHandlingfor error cases:Benefits
All tests pass ✓
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.