Skip to content

Conversation

jef
Copy link
Owner

@jef jef commented Jul 21, 2025

Description

Testing

Updates some tests

New dependencies

  • Bumps Node.js
  • Uses vitest over jest
  • Uses bare minimum eslint + prettier

@jef jef requested a review from Copilot July 21, 2025 03:38
Copy link

@Copilot Copilot AI left a 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 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_pattern input 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-types dependency 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 matchedType is misleading as it stores a regex pattern, not the actual type. Consider renaming it to matchingRegex or foundMatch.
  const matchedType = matches.find((regex) => regex.test(title));

@jef jef merged commit 3eb7399 into main Jul 21, 2025
3 checks passed
@jef jef deleted the feat/subject-regex branch July 21, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce subject regex
1 participant