Skip to content

Conversation

@yaugenst-flex
Copy link
Collaborator

@yaugenst-flex yaugenst-flex commented Oct 20, 2025

See discussion in #2905

Greptile Overview

Updated On: 2025-10-21 06:48:01 UTC

Greptile Summary

This PR updates the commitlint configuration at the repository root to properly parse Conventional Commits breaking change syntax and accommodate the project's scope naming conventions. The changes add a custom parser preset with an explicit regex pattern that correctly captures the ! breaking change marker (supporting both type!: subject and type(scope)!: subject formats) and maps it to a dedicated field. Additionally, the scope-case rule is disabled to allow non-lowercase scopes such as JIRA ticket IDs (e.g., FXC-3760) and PascalCase component names, which are common in the project's commit messages. Line length limits are also increased from 72 to 120 characters for more flexibility. These configuration-only changes integrate with the existing pre-commit hook workflow defined in .pre-commit-config.yaml for advisory commit message validation.

Changed Files
Filename Score Overview
.commitlintrc.json 5/5 Added custom headerPattern regex to capture breaking change ! flag, disabled scope-case enforcement, and increased line length limits to 120 characters

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it contains only configuration changes with no runtime impact on the codebase
  • The regex pattern correctly handles all standard Conventional Commits breaking change formats, and disabling scope-case aligns with the repository's use of JIRA keys and PascalCase naming in commit scopes
  • No files require special attention

Sequence Diagram

sequenceDiagram
    participant Developer
    participant Git
    participant PreCommit as Pre-commit Hook
    participant Commitlint
    participant Parser as Custom Parser Preset
    
    Developer->>Git: "git commit -m 'feat(FXC-3760)!: add feature'"
    Git->>PreCommit: Trigger pre-commit hooks
    PreCommit->>Commitlint: Validate commit message
    Commitlint->>Parser: Parse message with custom regex
    Note over Parser: Pattern: ^([^\\(\\s:!]+)(?:\\(([^)]+)\\))?(!)?: (.+)$
    Parser->>Parser: Extract fields:<br/>type="feat"<br/>scope="FXC-3760"<br/>breaking="!"<br/>subject="add feature"
    Parser-->>Commitlint: Return parsed components
    Commitlint->>Commitlint: Validate rules:<br/>- header length (12-120 chars)<br/>- type in enum<br/>- scope-case [0] (disabled)
    Commitlint-->>PreCommit: Validation passed
    PreCommit-->>Git: Hook successful
    Git-->>Developer: Commit accepted
Loading

@github-actions
Copy link
Contributor

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@yaugenst-flex yaugenst-flex force-pushed the FXC-3760-update-commitlint-config-to-accept-breaking-change-syntax-without-enforcing-lowercase-scopes branch from 43ff874 to f9e6155 Compare October 21, 2025 06:46
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

chore(commitlint): bump line length limit to 120
@yaugenst-flex yaugenst-flex force-pushed the FXC-3760-update-commitlint-config-to-accept-breaking-change-syntax-without-enforcing-lowercase-scopes branch from f9e6155 to 3b3edf7 Compare October 21, 2025 06:48
@mahlau-flex
Copy link
Contributor

Looks good to me!

@yaugenst-flex yaugenst-flex added this pull request to the merge queue Oct 21, 2025
Merged via the queue into develop with commit 142c385 Oct 21, 2025
35 checks passed
@yaugenst-flex yaugenst-flex deleted the FXC-3760-update-commitlint-config-to-accept-breaking-change-syntax-without-enforcing-lowercase-scopes branch October 21, 2025 08:06
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.

3 participants