Commit Graph
7 Commits
Author SHA1 Message Date
sankalp 90ca0c0f59 refactor(devgen/modules): rename commit_message template from .j2 to .tpl
Bug Fixes:
- Updated template reference to use .tpl extension, resolving missing template error.
2026-06-06 16:56:14 +05:45
sankalp 96b2499ecf chore(devgen/templates/commit): streamline commit template to Conventional Commits format
Clarify output format and remove redundant guidance.

New Features:
- Added explicit format and type list

Enhancements:
- Simplified instructions, removed unnecessary guidance

Bug Fixes:
- None
2026-06-06 16:48:21 +05:45
sankalp 1219c1ad81 feat(devgen/templates/commit): add context to commit message template
- New Features:
  - Added `{{ context }}` variable to the commit message template to provide additional context.
- Enhancements:
  - Removed the emoji usage line from the template to simplify the output.
```
2025-12-25 00:04:50 +05:45
sankalp 40c9b3ca57 refactor(devgen/templates/commit): update commit message template guidelines
- Simplify and clarify the structure of commit message generation guidelines.
- Replace "Format" with "Guidelines" for better readability.
- Remove redundant section numbering.
- Streamline emoji usage instruction into a single line.
- Clarify that the output should exclude labels like "Title:" or "Format:".

**Enhancements:**
- Improved template structure for better maintainability.
- More concise and direct instructions for users.
2025-12-24 23:49:34 +05:45
sankalp d373f95388 refactor(devgen): enhance AI commit message sanitization
The `sanitize_ai_commit_message` function has been significantly improved to better handle AI-generated commit messages, including support for bolded headers, more robust header detection, and a fallback mechanism for non-conventional messages.

**Enhancements & Refinements:**
- Added comprehensive docstring explaining the function's purpose and behavior
- Improved regex pattern to match conventional commit headers with optional bolding (e.g., **feat: ...**)
- Added case-insensitive matching for commit types
- Implemented a state-based approach with `found_header` flag for clearer logic
- Added automatic removal of bold markers (**) from headers
- Introduced fallback behavior to return the first non-empty line if no conventional header is found
- Improved code structure with better variable naming and comments
- Added early return for empty input strings

**Bug Fixes:**
- Fixed potential issue where the function could return empty strings for non-conventional messages
- Resolved edge case handling for messages without proper headers
```
2025-12-24 23:29:45 +05:45
sankalp 8f0e09d1d5 updates 2025-12-12 11:11:34 +05:45
sankalp dec9c15b7a updates 2025-12-12 11:10:30 +05:45