← Back to news

LEGO Merge Train Hackathon

Colourful LEGO bricks

At our annual Christmas event, we hosted a hackathon that combined two of our favorite things: programming and LEGO! The challenge? To build a LEGO train that springs to life whenever a merge train is initiated in our GitLab system. As a bonus, the system would also announce what’s being merged and celebrate the contributors behind it.

To bring our vision to life, we used a 9v LEGO train system and paired it with a smart socket (Shelly). We then wrote a Python script that pulls information about the latest merge trains from GitLab using the GraphQL API. Whenever a new merge train is detected, the script triggers the smart socket, activating the LEGO train and setting it into motion.

The hackathon was a resounding success, and the end result has become a beloved feature in our office. Each time a merge train is triggered — marking the completion of a new piece of functionality — the LEGO train whirs into motion, completing a few joyous laps through the office.

Adding to the experience, the office speakers broadcast details of the merge request, highlighting the changes made and the team members who contributed.