-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestFor Hacktoberfest Participants!For Hacktoberfest Participants!help wantedExtra attention is neededExtra attention is needed
Description
Include/Exclude glob patterns for diff scanning
Summary
Add include / exclude glob arrays in .commitlm-config.json to filter which files influence commit message & doc generation.
Motivation
Ignoring docs/**, lockfiles, binaries, or vendor folders reduces token usage and noise.
Proposed config shape
{
"include": ["src/**", "app/**"],
"exclude": ["docs/**", "**/*.lock", "**/*.min.*", "node_modules/**", "*.png", "*.jpg"]
}Scope
- Apply patterns to both commit message and documentation generation paths.
- Precedence: evaluate
includefirst, then applyexclude. - Cross-platform support (Windows path separators).
Tasks
- Parse arrays from config; implement precedence.
- Use robust matching (e.g.,
pathspecor fnmatch) with repository root context. - Unit tests for common patterns and nested repos.
- README section with examples.
Acceptance criteria
- Files matching
excludenever influence prompts. - Patterns work on Linux/macOS/Windows.
- Tests cover at least 6 representative patterns.
Test plan
Create a temp repo with mixed files; assert only expected files feed the generator.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestFor Hacktoberfest Participants!For Hacktoberfest Participants!help wantedExtra attention is neededExtra attention is needed