GregorBiswanger / GitCommitWhisperer

Git Commit Whisperer generate Git commit messages in Visual Studio Code using OpenAI technology.
MIT License
2 stars 1 forks source link
chatgpt extension generator git gitmessage openai visual-studio-code vscode vscode-extension

Git Commit Whisperer

Git Commit Whisperer is a Visual Studio Code extension that helps you generate git commit messages using OpenAI's GPT-3 (ChatGPT).

WARNING This extension transmits your git diff to OpenAI-API. Using this extension on confidential repositories is not advised, as it could potentially breach your NDA.

Features

Requirements

Installation

Install the extension from the Visual Studio Code Marketplace.

Usage

  1. Make sure you have a valid OpenAI API key, which can be obtained here.
  2. Configure the extension with your OpenAI API key:
    • Either enter it directly in the settings (generateCommitMessage.openaiApiKey)
    • Or, the extension will prompt you to enter your API key the first time you run the command
  3. Execute the Generate Commit Message command from the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  4. If there are staged changes, select a commit type (or choose "Auto Detection") and let the extension generate a commit message for you.
  5. The generated commit message will be placed in the Source Control input box.

Configuration

You can customize the behavior of the Git Commit Whisperer by modifying the following settings:

{
  "generateCommitMessage.openaiApiKey": "your-openai-api-key",
  "generateCommitMessage.commitTypes": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"],
  "generateCommitMessage.useEmojiForCommitType": false,
  "generateCommitMessage.commitMessagePrompt": "your custom prompt"
}

Known Issues

Contributing

If you have any suggestions or find any bugs, please open an issue on the GitHub repository.

License

This extension is licensed under the MIT License.