Add none option for inverse matching the changes to a label#904
Open
ashleyfrieze wants to merge 5 commits intoactions:mainfrom
Open
Add none option for inverse matching the changes to a label#904ashleyfrieze wants to merge 5 commits intoactions:mainfrom
none option for inverse matching the changes to a label#904ashleyfrieze wants to merge 5 commits intoactions:mainfrom
Conversation
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: