-
Couldn't load subscription status.
- Fork 458
Add none option for inverse matching the changes to a label
#904
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
base: main
Are you sure you want to change the base?
Conversation
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 a new none option to the labeler action that enables inverse matching for labels. This allows users to apply labels when certain conditions are NOT met, such as when documentation or test files are missing from a PR.
- Adds
nonematching option to complement existinganyandalloptions - Updates type definitions and configuration parsing to support the new option
- Adds comprehensive test coverage for the new functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/labeler.ts | Implements the core logic for none matching using inverse of checkAny |
| src/api/get-label-configs.ts | Adds none to type definitions and configuration parsing |
| tests/labeler.test.ts | Adds test cases for both positive and negative none matching scenarios |
| tests/fixtures/all_options.yml | Updates test fixture to include none configuration examples |
| README.md | Documents the new none option with examples and usage guidance |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description:
We have a requirement to add an advisory label to PRs where there's missing documentation change or missing unit tests.
This seems to fit into the labeler model via a new top level key
none.Please consider this PR for inclusion in this useful action.
Related issue:
Add link to the related issue.
Check list: