-
Notifications
You must be signed in to change notification settings - Fork 12
Add ignoreTags support to exclude old versions from packaging #118
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: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
…tterns Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
…syntax in README Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
5cd80ac to
d130220
Compare
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 excluding old version tags from being packaged while still keeping them in the configuration for historical reference. It introduces an optional ignoreTags field in action config JSON files that accepts regex patterns to filter out tags during script generation.
- Added
ignoreTagsfield to action config schema with proper handling across all scripts - Implemented CLI option
--ignore-tagsthat auto-generates regex patterns from simple version prefixes - Created helper script
add-ignore-tags.shfor adding ignore patterns to existing actions - Updated documentation with clear usage examples
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| script/internal/generate-scripts.sh | Implements tag filtering logic using regex patterns from ignoreTags field |
| script/internal/action-config.js | Adds ignoreTags property to ActionConfig class and updates add() function signature; fixes JSDoc typo |
| script/internal/add-action.js | Adds --ignore-tags CLI option with regex pattern generation from version prefixes |
| script/internal/update-action.js | Preserves ignoreTags field when updating existing configs |
| script/internal/add-ignore-tags.js | New helper script to add ignore tags to existing action configs with duplicate prevention |
| script/add-ignore-tags.sh | New bash wrapper script that calls add-ignore-tags.js and regenerates scripts |
| README.md | Documents the new ignoreTags feature with usage examples for both new and existing actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR implements a way to exclude certain old version tags from being packaged. The solution adds an optional
ignoreTagsfield to the action config JSON files that accepts an array of regex patterns.Summary of Changes:
Changes:
ignoreTagspatterns and skip tags that match any pattern during script generationignoreTagsproperty toActionConfigclass and updatedadd()function to accept and save the field--ignore-tagscommand-line option that accepts simple version prefixes (e.g.,v1,v2) and auto-generates the correct regex patterns - no escaping requiredignoreTagswhen updating existing configsUsage:
When adding a new action:
./script/add-action.sh --ignore-tags "v1,v2" actions/checkoutThis auto-generates regex patterns that match
v1,v1.x,v2,v2.x, etc.For existing actions, use the helper script:
./script/add-ignore-tags.sh --ignore-tags "v1,v2" actions/checkoutOr add
ignoreTagsdirectly to the JSON config:{ "ignoreTags": [ "^v1(\\..*)?$", "^v2(\\..*)?$" ] }The
ignoreTagsfield is preserved when runningupdate-action.sh.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.