Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankitbko/chatgpt-commit-message-hook
Git hook that calls ChatGPT to generate commit message based on staged content
https://github.com/ankitbko/chatgpt-commit-message-hook
Last synced: about 2 months ago
JSON representation
Git hook that calls ChatGPT to generate commit message based on staged content
- Host: GitHub
- URL: https://github.com/ankitbko/chatgpt-commit-message-hook
- Owner: ankitbko
- License: mit
- Created: 2023-03-04T17:45:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-05T07:11:05.000Z (almost 2 years ago)
- Last Synced: 2023-08-12T14:45:59.685Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Use ChatGPT to write commit messages
Git hook that calls ChatGPT to generate commit message based on staged content.## Installation
1. Copy the `prepare-commit-msg` file into your repository's `.git/hooks` folder.
1. Make sure python3 and requests library is installed.
1. Set environment variable `CHATGPT_API_KEY` to your [OpenAI API Key](https://platform.openai.com/account/api-keys).# Usage
Run `git commit` and an editor will open with generated commit message.Run `git commit -m Your_Message` and ChatGPT will take Your_Message into consideration while generating the commit message.