The main objective of this bot is to streamline the review process. It offers a preliminary review to assist you in rectifying minor issues or oversights before your Merge Request (MR) is subjected to a final review by your colleague.
- Setup ollama
- Setup NGINX
- Setup Webhook on Gitlab
- A VM/Server (preferrably running linux)
- On a provisioned VM, create a python environment with python3.8+ and install this package.
- Create a config file
config.yml
using the format inconfig-example.yml
with actual values and on linux set the environment variableCONFIG_FILE_PATH
value to the path to the config file you created - Setup NGINX to route all incoming requests to the bot that we will be running at port 7777
- Download your preferred model using
ollama pull <model name>
Available models here - Run the bot using
gunicorn -w 2 iamksm_bot.app.webhook:AIR -b 0.0.0.0:7777 -k gevent --threads 4
Alternatively, you can build the image and run it locally with most of the above already setup.
- from the project dir, run
docker build -t iamksm-bot:0.0.1 .
- Run docker compose up -d
-
π§° MR Type
- Identifies the category of this MR. It could be one of the following:
- π‘ Feature: Adds a new feature to the application.
- π© Bugfix: Fixes a known bug or issue in the application.
- π¦Ί Chore: Involves project-related tasks that aren't directly associated with the application code.
- π§Ή Housekeeping: Includes general maintenance tasks to keep the codebase clean and well-organized.
- π‘ Enhancement: Enhances an existing feature or functionality.
- π Documentation: Involves changes solely to the project's documentation.
- π Refactoring: Involves modifying the code structure without changing its behavior.
- π§Ά Style: Involves changes that don't alter the meaning of the code (white-space, formatting, missing semi-colons, etc).
- π§ͺ Performance Improvement: Involves changes that enhance the application's performance.
- Identifies the category of this MR. It could be one of the following:
-
π Change Introduction
- Provides context using the MR title, description, and commit info.
- Emphasizes the main objectives of the MR and its impact on the overall project.
-
π§ Review
- Proposes improvements, updates, or revisions based on the changes.
- Determines whether the MR fulfills its purpose based on its commit message(s) and the provided description.
- Checks whether the code and tests handle edge cases.
- Provides examples of the desired change.
-
π Code Quality and Best Practices
- Ensures compliance with the Google Style Guides for the programming language used.
- Looks for code smells and anti-patterns.
- If applicable, proposes better design patterns or coding practices.
-
π¬ Comments and Suggestions
- Bases its feedback and suggestions on the changes made in the MR.
- States it's decision on the MR (approved, needs work, rejected) with clear reasoning.
-
π€ Decision
- The ultimate decision. Can be
- β Approved
- π§ Needs Work
- β Rejected as necessary.
- The ultimate decision. Can be
If the bot identifies any issues with your MR, it will initiate a thread. However, if your MR passes the botβs review, it will simply leave a comment and approve the MR.