-
Notifications
You must be signed in to change notification settings - Fork 0
Add label glob pattern support for removal #126
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
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
- Added a new script "local-action" to package.json for running local GitHub actions. - Updated dependencies: added "minimatch" and "@github/local-action" to package.json.
…r label patterns in the action
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 pull request introduces glob pattern support for label removal, expanding the action's functionality to allow pattern-based label matching and removal. The changes maintain backward compatibility while adding significant new capabilities.
- Adds
label_patternsinput for glob-based label matching during removal operations - Updates input validation to make
labelsoptional and adds comprehensive error handling - Implements pattern matching using the minimatch library for flexible label removal
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.ts | Implements core pattern matching logic and enhanced input validation |
| action.yml | Adds new label_patterns input parameter and makes labels optional |
| package.json | Bumps version to 3.0.0 and adds minimatch dependency |
| tests/main.test.ts | Adds comprehensive test coverage for new pattern matching features |
| fixtures/octokit.ts | Adds mock for issues.get method to support pattern matching tests |
| README.md | Updates documentation with examples and behavior descriptions for new features |

This pull request introduces a major update to the label management action, adding support for glob pattern-based label removal and refining input validation. The changes enhance functionality, improve error handling, and update the version to
3.0.0. Below are the most important changes grouped by theme.Label Management Enhancements:
label_patternsinput to allow removal of labels matching specified glob patterns.labelsandlabel_patternsinputs to be optional, with validation ensuring at least one is provided for removal operations.Input Validation Improvements:
label_patternswith theaddaction.Test Coverage Expansion:
label_patterns, including matching patterns, empty inputs, and unsupported combinations.getmethod inoctokitto simulate fetching existing labels for pattern matching.Documentation Updates:
README.mdto reflect the new functionality, including examples of howlabel_patternscan be used alongside traditional label inputs.Versioning:
3.0.0to indicate breaking changes and new features.