Show HN: Send your diff to ChatGPT and prepare a commit message
gist.github.com
gist.github.com
export OPENAI_API_KEY=<redact>
chmod +x prepare-commit-msg
mv prepare-commit-msg .git/hooks/
https://gist.github.com/johnwheeler/ba661c122543d06a5ca6326f...
pip install tiktoken requests
Here's what the commits look like
commit 1f02b023739c4951bfb9e8d1266c6f601b82ef85
Update git commit message to include a summary of changes followed by bullet points.
commit ef62f1f23569a9cfa217ddc561710f2862e23022 - Fixed a syntax error in prepare-commit-msg script.
- Updated the background.js file to include a console.log statement when the Chrome action button is clicked.
commit 08bb0781f5a3e638c0a1bb1bf5012ee2855d82d0 Added pip install command for tiktoken and requests
- Added export command for OPENAI_API_KEY
- Added instructions for setting chmod and moving the prepare-commit-msg file to .git/hooks/ directory.
commit f39e920edde9599b2146e0c3723eeba85ca05688 Support interaction tests in API:
- Add endpoints for getting interaction tests by ID and UUID
- Add InteractionTest model and schema
- Update models.py to include InteractionTest and its relationships
- Update schemas.py to include InteractionTestSchema
commit 20943e823ddecd1b911025090df5138e1a132220 Add interaction tests to the system.
- Creates migration file to add interaction_tests table.
- Defines InteractionTest model with its attributes.
- Defines relation between User and InteractionTest models.
- Defines InteractionTestSchema based on BaseSchema.
- Does some refactoring to model and schema classes.https://github.com/zurawiki/gptcommit
For those interested in a more complete solution