When I first started working with GitLab Merge Requests, I realized that reviewing code manually can take a lot of time. Sometimes even small changes need to be checked carefully to make sure they don't introduce problems.
That gave me the idea of building MR Guardian.
MR Guardian is an AI-powered tool that helps developers review GitLab Merge Requests. Instead of manually going through every change, a user can simply paste a Merge Request URL and get an AI-generated analysis.
The application fetches the Merge Request information from GitLab, reads the code changes, and sends them to an AI model for review. The AI then provides a risk score, category, summary, and suggestions that can help developers understand whether the changes might need additional attention.
I built the frontend using React and Vite, and the backend using FastAPI and Python. The project also integrates with the GitLab API to fetch Merge Request data and uses OpenRouter with GPT-4o Mini for analysis.
One of the biggest challenges was getting everything connected together. Initially, the project worked only with hardcoded Merge Requests, but I wanted users to be able to paste any GitLab Merge Request URL and have the analysis happen automatically. Getting the GitLab API integration, URL parsing, and AI response handling working correctly took a lot of testing and debugging.
While building this project, I learned a lot about GitLab APIs, FastAPI, React, API authentication, and integrating AI into real-world workflows.
In the future, I would like to add GitLab login support, support for analyzing multiple Merge Requests, and more advanced code review insights.
Overall, MR Guardian was a great opportunity for me to explore how AI can be used to make software development workflows faster and more efficient.
Built With
- fastapi
- gitlab-api
- gpt-4o-mini
- html
- javascript
- openrouter
- python
- react
- vite