Conversation
- Bumps Node.js - Uses vitest over jest - Uses bare minimum eslint + prettier - Updates tsconfig - Updates UX
There was a problem hiding this comment.
Pull Request Overview
This PR implements a subject pattern feature for conventional commit validation, allowing users to specify a regex pattern to validate the subject portion of pull request titles. The changes also modernize the codebase by migrating from Jest to Vitest, updating Node.js version, and switching to ES modules.
- Adds a new
subject_patterninput parameter that accepts regex patterns for validating commit message subjects - Modernizes the build system with ES modules, updated dependencies (Vitest, ESLint, Rollup), and Node.js 22
- Replaces external
conventional-commit-typesdependency with local implementation and improves GitHub token handling
Reviewed Changes
Copilot reviewed 19 out of 38 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lint.ts | Implements subject pattern validation logic and updates import statements to ES modules |
| src/lint.test.ts | New comprehensive test file using Vitest with subject pattern test coverage |
| src/github.ts | Improves GitHub token handling with fallbacks and converts to ES module imports |
| src/conventional-commit-types.ts | New local implementation of conventional commit types replacing external dependency |
| package.json | Major dependency updates including Vitest, ESLint, and Node.js version bump to 22 |
| action.yaml | Adds subject_pattern input and makes token optional with default value |
Comments suppressed due to low confidence (1)
src/lint.ts:34
- The variable name
matchedTypeis misleading as it stores a regex pattern, not the actual type. Consider renaming it tomatchingRegexorfoundMatch.
const matchedType = matches.find((regex) => regex.test(title));
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…its-pr-action into feat/subject-regex
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
Testing
Updates some tests
New dependencies