Aristo : A Pull Request Story

Gurkeerat Singh
6 min readOct 22, 2023

--

Clarifying this right off the bat that this article is not written by an AI and is a completely original piece of art made by a human.

Coding itself is an art and there is no place in the software development lifecycle that is more funny and amusing than a Pull Request chain filled with comments.

Let me start with a meme to set the tone :

Nothing better than a reference to The Office!

I am a developer having around 4.5 years of experience and I, in my limited time as a developer can confirm that raising a PR and trying to get an approval from the senior devs is a cycle that has taught me the most and made me a better developer one PR after another.

I remember raising my first PR and getting lots of comments on it regarding things which I previously dismissed as trivial.

Nevertheless it took me some time to do a refactor and get all my comments resolved.

I sent my senior this meme and prayed for a go ahead to get my code merged :)

As the days passed by, I started getting better at my craft and understood the pysche behind how my senior reviews my code. He deserves a significant portion of the credit for my improvement as a engineer.

I still remember I used to code with a mindset that why touch it if it ain’t broke?

If it works, why touch it?

But as my career progressed I came to know about scalability and maintainability. The 2 things that distinguishes a normal developer from a rockstar developer.

Techlead’s Youtube Channel is witty and fun!

I recently became a mid level engineer and started getting the privilege to approve PR’s.

The other side of the story makes me realise that reviewing a PR with honesty is actually one of the hardest tasks, apart from solving dynamic programming problems (A tech blog isn’t complete without mentioning DSA?)

For my recent addiction of participating in hackathon’s, I got a chance to participate recently in a hackathon called : Codegeist Unleashed which was about building AI apps for improving developer experience using Atlassian’s Forge platform.

https://codegeistunleashed.devpost.com/

I got introduced to the world of Atlassian even before joining my first job as an engineer because of some contract work that I was doing at a start up called Rivi during my final year of college.

Big shoutout to https://rivi.co/ for being so awesome by embracing Bitbucket right from the very beginning!

I love the simple and sleek UI of Bitbucket and when I decided to take part in this hackathon, I got a crazy but fun idea.

I embarked on the thrilling journey of developing an AI bot powered by Large Language Models (LLMs) that could analyze code in any programming language and promptly share its insights by leaving comments directly on open pull requests.

I initially named my bot Aristotle but then thought it would not connect with GenZ and thus named it Aristo!

Aristotle’s debugging method? Just pondering the meaning of life until the bugs fixed themselves.

So Aristo is a bot which acts as a senior developer whose purpose all together is just to review code and give feedback to an engineer on their Pull Request in a matter of minutes.

I hope people who use Aristo will have an edge!

Aristo for Bitbucket is made using Forge.

Forge makes it possible to build a fully-functional app in just a few hours, with hosting, multiple development environments, and API authentication built-in. Forge can be used to build custom apps and integrations or apps distributed through the Atlassian Marketplace.

Source : https://developer.atlassian.com/platform/forge/

Using Aristo is fairly simple. Once installed in a workplace, Aristo first detects the PRs that are in an open state :

Aristo!

The open PR’s are shown as a dropdown :

Open PR’s

It then detects the files that have been added or changed in the repo

Summary of the PR

After clicking on Review, Aristo goes through the content of the changed files, evaluating code quality and checking for bugs.

DivideByZeroException caught by Aristo!

Not only this, you can also go ahead and click on Add Comments to PR and it would add this comment on the exact file at the exact line on the PR chain in Bitbucket!

Magical stuff by Aristo!

So, before actually getting the code reviewed by a fellow developer, some basic level checks can be automated by using an AI and thus save the time of both the developers.

Also, if you ever need to review the comments Aristo has provided on your files and want to revisit the feedback it has given, you can utilize the below given web application to access and review the previous comments made by Aristo on your code.

https://aristo-fzl2.onrender.com/

The webapp can be accessed at : https://aristo-fzl2.onrender.com/

There is a Youtube video as well for the demo which is available at : https://www.youtube.com/watch?v=whfNkBzk9vM

During the development of Aristo, I faced some initial challenges to get started. However, once I delved into the Forge documentation, the development process became much smoother and more straightforward.

For the backend, I have developed a node service which actually serves as the brain of Aristo. It is a work in progress and with time I aim to make it even more intelligent.

There are some cons in Aristo as well that I would like to talk about. Being a large language model even though Aristo can review code for most programming languages, but sometimes it does hallucinate and gives some absurd review comments. I am working on coming up with a plan to minimise such scenarios.

After all, the best code is the one that not only works but also adapts, scales, and evolves.

I believe if I can provide Aristo with more context and give it a set of exhaustive check lists for different languages, then I am sure it would make it smarter.

I had a lot of fun while building Aristo, and it remains one of my personal projects, which would be very close to my heart.

Feel free to connect with me at gurkeeratsondhi@gmail.com to share your thoughts about Aristo or to get access for it!

Please don’t hesitate to leave your thoughts in the comments.

While Aristo is undeniably intelligent, it can never replace the invaluable touch of a human code reviewer. So, let’s not follow the ‘Obama from the meme’ path and always strive to have our pull requests reviewed!

As you might be expecting, ending this article with a meme :)

Thanks for reading!

--

--

No responses yet