Closed aozmekik closed 11 months ago
@aozmekik I have forked the repo, since this is no longer maintained.
If you make the issue here: https://github.com/negoziator/ai-commit/issues
Then i will look at it right away. I actually already do this in my zsh when commiting without ai-commit, so it get your point completly đŸ˜„
@negoziator I did it.
Feature Request: Extract Issue Name from Branch and Append to Commit Message
Overview
For developers who follow a naming convention for their branches that includes an issue name or identifier, it would be beneficial for the
aicommits
tool to automatically extract this issue name and append it to the generated commit message. This ensures that each commit is directly associated with the relevant issue, providing better traceability and context.Current Behavior
Currently, when using the
aicommits
tool, the generated commit message is in the format:Desired Behavior
Given a branch name that follows the convention
feature/abc-576
,bugfix/abc-577
, etc., the tool should extract the issue name (e.g.,abc-576
) and append it to the commit message. The resulting commit message should be:Use Case
Consider a developer working on a feature branch named
feature/abc-576
. They make some changes and stage them. When they use theaicommits
tool to generate a commit message, the tool should:For example, if the AI-generated commit message is "Added new login functionality", the final commit message should be:
Implementation Suggestions
Benefits
Traceability: By associating commits with specific issues, developers and teams can easily trace changes back to their originating requirements or bug reports.
Context: When reviewing commit histories, having the issue name directly in the commit message provides immediate context about the purpose of the change.
Integration with Other Tools: Many project management and CI/CD tools can utilize the issue name in the commit message for better automation and linking of code changes to tasks.
Alternatives
I am editing the commit message in this way right now,
And I am pushing it.