Categories
Development Thoughts

Gitlab MR Bot

I’ve recently write a simple merge request “bot” for my team. To be honest it’s more of a glorified reminder but hey, it works! I’ve done a slightly more technical write up at dev.to.

Summary: It’s a bot that will collate all the open Merge Requests we have on our private and public Gitlab repositories, that have the Review Me label, but don’t have at least 2 reviewer labels yet, and send it to our Slack channel.

It’s been running since 3rd August, and in this post, I just want to note down my observations for the past 20 days.

The Positives

More people are actively taking on the role of reviewing the MRs. Before the bot our scrum master has to manually collect them and bring awareness to the team that there are MRs that needs people to take ownership of. But for the past 3 weeks, it seemed to have improved. Most of the times when someone ask for reviews on their MR, we usually have 2 people who take them up before the next reminder*.

*the reminders are set to run at 11am and 3pm (4 hours apart)

The team seemed to be quite receptive of the bot reminding them about the open MRs, the little easter eggs of encouragement seems to help with the team morale from time to time as well.

The Negatives

Hard to quantify, but the time taken for an MR to get approved seems to have shortened, which may indicate that people are more eager to approve and may not review as thoroughly. Case in point, I approved one MR that contains relatively inefficient code, that was pointed out my my colleague when she was working on that section.

People are taking on the role of reviewing but sometimes it slips under their radar and forget to approve even when all the issues have been resolved. I guess this is something that the bot can improve on but don’t really have a clear idea of what can be done about it yet.

Overall

I’m glad that I wrote it. It didn’t really take a long time, just some inspiration and inconvenience that prompted it. I am carefully considering adding metrics for how long an MR stays open for and all that. But I feel like this might create unwanted attention into our work so it’s something that I haven’t explore deeply into yet. But I think it would be pretty interesting!

Leave a Reply