Skip to content

[Issue 63]: Conventional Commits #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Seif-Mamdouh
Copy link
Collaborator

@Seif-Mamdouh Seif-Mamdouh commented Mar 5, 2025

Description

This PR adds support for conventional commit formatting to the git-ai-commit tool.

The new conventional command allows users to:

  • Analyze code changes and automatically suggest the most appropriate commit type (feat, fix, docs, etc.)
  • Intelligently recommend a relevant scope based on the affected components
  • Format messages according to the conventional commit standard: type(scope): description
  • Commit and push changes with the same workflow as the regular command

Changes

  • Added a new conventional_commit_handler.py file with the implementation of the conventional commit command
  • Updated prompt.py to support a dedicated prompt for conventional commits
  • Modified gen_commit_msg.py to pass the conventional parameter to the prompt generator
  • Added the new command to main.py with appropriate arguments

Test Plan

run gac conventional or git-ai-commit conventional

W/O optional scope

Screenshot 2025-03-04 at 9 37 58 PM

with the optional scope

Screenshot 2025-03-04 at 9 35 23 PM

@Seif-Mamdouh Seif-Mamdouh marked this pull request as draft March 5, 2025 02:15
@Seif-Mamdouh Seif-Mamdouh changed the title Seif/main/conventional commits [Feat]: Conventional Commits Mar 5, 2025
@Seif-Mamdouh Seif-Mamdouh changed the title [Feat]: Conventional Commits [Issue 63]: Conventional Commits Mar 5, 2025
@Seif-Mamdouh Seif-Mamdouh marked this pull request as ready for review March 5, 2025 04:11
@Seif-Mamdouh Seif-Mamdouh requested a review from ming1in March 5, 2025 04:12
@Seif-Mamdouh Seif-Mamdouh requested review from ming1in and ochoav March 5, 2025 19:03
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