Skip to content

Feature Request: Custom Commit Message Generation Instructions #26

@hwhsu1231

Description

@hwhsu1231

Feature Request

I hope that ai-commit can allow users to define custom instructions for generating commit messages.

This would function similarly to GitHub Copilot Chat's github.copilot.chat.commitMessageGeneration.instructions in settings.json.

Image

Motivation

This feature would enable users to enforce specific commit conventions (e.g., Gitmoji, Conventional Commits) by providing rules for language, header format, and supported types, and available scopes. This will significantly improve accuracy and reduce manual edits.

Proposed Implementation

Add a new option to ai-commit's configuration, like so:

{
  "ai-commit.INSTRUCTIONS": [
    { "text": "Write Commit Messages in English." },
    { "text": "Commit Message Header Format: `<gitmoji> <type>(<scope>): <subject>`." },
    { "text": "Supported Types: ✨ feat, 🐛 fix, ♻️ refact, 📝 docs, 🎨 style, 📦️ build, 🧪 test, 🔧 chore, ⏪️ revert." }
  ]
}

Ai-commit should then use these instructions when generating suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions