Speedy Review
Speedy Review is a set of tools and practices designed to improve your git commit review workflow. So far we have:
- a git hook that automatically generates meaningful commit messages based on code changes. It works best in a team model. In tandem with the team server, it aims to save developers time and improve the quality of commit logs, making code reviews start faster and change logs more useful.
- a standalone script, Victor.py, that analyzes historical commits and enables you to easily amend them.
- Something to help what you're working on? Drop us a note
Why Use Speedy Review?
- Save Time: Automate commit message creation, allowing developers to focus on coding.
- Improve Code Review Efficiency: Clear, descriptive commit messages facilitate faster review processes.
- Enhance Change Logs: Generate more informative and useful project history tracking.
- Ensure Consistency: Maintain a consistent style and quality of commit messages across your team or project.
- Promote Best Practices: Learn to write more informative commits by analyzing suggested messages.
Features
- Git Hook Integration: Automatically suggest commit messages during the commit process.
- Standalone Script (victor.py): Analyze and update commit messages for historical commits. The victor writes history!
- Microservice Architecture: Utilize a microservice for diff analysis and message generation (optional).
- Customizable Message Templates: Define commit message templates to align with your team's conventions.
- Multi-language Support: Generate appropriate commit messages for various programming languages and file types.
- Historical Analysis: Analyze past commits to suggest improvements and maintain consistency with previous high-quality messages.
- Commit Categorization: Automatically categorize commits (e.g., feat, fix, docs, style) based on changes made.
- Interactive Mode: Refine suggested commit messages through a command-line interface.
Setup for Use
Setup takes place in a few different areas.
On a server
- Run the team server locally, host it permanently, or use a hosted option. For more details, refer to the Team Generative Service section. Contact us if you'd like a hosted option.
In your code repository
- Add the Git hook to your project. See the Git Hook Setup section for detailed instructions.
On your dev machines
- Install dependencies:
- Set environment variables:
SPEEDYREVIEW_API_KEY: API string for authentication from dev machine to team generative server.SPEEDYREVIEW_ENDPOINT_URL: URL of the Team Generative Service
- Commit as usual. The initial message will be generated by Speedy Review. You can accept it entirely, partially, or create your own.
Git Hook Setup
- Copy
prepare-commit-msg.py to your repository's .git/hooks/ directory, naming it prepare-commit-msg - Make it executable:
cp prepare-commit-msg.py .git/hooks/prepare-commit-msg
chmod +x .git/hooks/prepare-commit-msg
- If hosting your own team server, set up and use the microservice, using its URL for
SPEEDYREVIEW_ENDPOINT_URL and the SPEEDYREVIEW_API_KEY as specified in the microservice setup - For hosted options, contact us for setup assistance
Team Generative Service
The generative service complements the Git hook script by analyzing diffs and generating commit messages. It securely manages team API keys for the Anthropic GPT service.
Set the following environment variables:
SPEEDYREVIEW_API_KEY: Your API key for authenticationANTHROPIC_MODEL: claude-3-opus-20240229ANTHROPIC_MAX_TOKENS: 1000ANTHROPIC_TEMPERATURE: 0.7ANTHROPIC_API_KEY: The private Anthropic tokenAPI_PRIMARY_KEY: The key provided to your team members
Host the app on your preferred platform (Vercel recommended).
Victor.py Script
Use victor.py to analyze and update historical commit messages:
python victor.py <commit_hash>
This script will:
- Checkout the specified commit
- Analyze changes and existing commit message
- Suggest a new commit message and initiate a
git commit --amend - Update the commit message if approved, creating a new branch
Contributing
We welcome contributions! Please fork the repository and submit a pull request.
License
This project is licensed under the Apache 2.0 License.
About
We're also a consultancy that can help you improve your feature release rate. We have decades of experience in the field, and we're here to help you. Getting through the complete review process can get hung up and slowed down in a thousand ways. When you're consistently seeing slow issue closing rates, it's time to get a fresh perspective.