They Use Mergify : WorkLogger

They Use Mergify : WorkLogger

Hugo Escafit

Every day, many projects use Mergify to automate their GitHub workflow. Independently of their team size, the one thing they all have in common is that the project leads are willing to let their developers focus on what’s really important—code. So we decided to meet with some of them to learn more about the challenges they face and discover how Mergify helps them be more efficient when it comes to pull requests. This time, we talked to JD Raimondi, a solutions architect who created the WorkLogger project.

Hello JD 👋

Can you tell us more about you?

I am a solutions architect, so I work by designing solutions for customers and projects, projects that are starting, projects that have already been developed for some time and need some changes, projects that need maintenance, all kinds of projects in different industries.

I work both for startups and for Fortune 500 companies. So had a little bit of experience here and there.

I am technically a freelancer, but I work mostly with Making Sense, a company that I also grew up with. So it's very close to my heart, and we're working together on different projects and different customers.

Why WorkLogger? What is it?

This particular project is an open-source initiative of mine, which solves a problem that I used to have with our multiple clients, which is different clients have different needs about tracking time for their employees or contractors or whatever it is.

It can be :

  • to log into Harvest,
  • fill out a spreadsheet,
  • send an email with the total amount of hours,
  • write in Jira on each of the tickets
  • and many other ways.

Me handling different projects and different clients had the problem of having to remember to go to each different place and log my time. So I decided to do a project that takes care of it for me.

So basically, I track my time in Google Calendar, and if I spend half an hour on something, I just create a task in the calendar for that amount of time. By using tags or using different calendars or different configurations through Worklogger, I send it out to the different systems automatically.

In one sentence: centralized timesheet logging.

Are you alone on this project?

It is me for now. I did put it out there in the hopes that more people would use it and more people would contribute to it. I haven't had any contributions as of yet, but I did have a few people reach out to me and ask me to set it up for them so they could use it, too, even with some extra features that they needed. And we worked in those.

WorkLogger GitHub Webpage

Can you give us some context?

This is an open-source project that I do in my free time. That means I have limited time for it, which I mostly use to solve a problem, but also a little bit for fun. I haven't used a lot of NodeJS back then, so that was the technology I chose to start with. The project was also an excuse to try something new.

That meant that a lot of what I had to do had either been really productive or fun. Otherwise, it's just another chore to do on the weekend. But turns out that maintaining a project comes with a lot of chores.

What were your pain points?

There were three pain axes:

  • having a productive time when the time was limited,
  • keeping up to date with dependencies,
  • keeping costs low.

One of those is maintaining your dependencies because you use your project and you set up different libraries on which you depend, and those keep upgrading, and with the upgrades come fixes, which is what you'd expect. But sometimes you also bring in bugs, bring extra dependencies, and you need to keep up-to-date things that break, etc.

I would spend a lot of time doing that instead of working on features that I wanted to build. At some point, I came across dependabot, which solves most of that problem. It keeps track of the dependencies and says, "Hey, here's an update; you can use it." Yeah, cool. But I still need to test the changes, make sure they work, test them out, then merge them, and then call it done.

I'm sure you know this bot!

Denpadabot is doing the first 50%, and I needed to do the other 50%.

At some point, I even thought: "What if I ask someone, or even hire someone, to help with this?" I could get on Fiverr and ask someone to go through my PRs, test them and make sure they are right every once in a while. But aside from the coordination, it also meant pouring more time and effort (and money!) into this free-time project.

This is when Mergify came into place.

Can you tell us more about how you found Mergify?

I found Mergify through the GitHub marketplace, by looking for something else. It was there. It was easy to automate. I actually set it up in like ten minutes, and it was free. So what reason not to try it out?

What is easy to set it up?

I tried it out, and it was working right out of the gate, right away.

When you set it up, it automatically sets up an example for you, but to be honest, that wasn't quite enough for me. The website was really well documented. I did see all the rules that you can set and how Mergify works. I remember even reading a little bit about how it works under the hood.

The website had some explanations about what it does and why it has to be configured a certain way, and it helped me understand it makes a lot of sense.

I read through that, and it was clear as day; it was really easy to follow.

Mergify configuration

I set up the rules that I needed. I did have to struggle a little bit with some of matching certain other tests, like the interaction between Mergify and other actions that run. I did have to do a bit of extra work for that, but it was just matching some regular expressions, and that was it. I was set up.

Did Mergify help you with your pain points?

It did solve a big part of my problem. However, I still needed to do a bit more work because Mergify allowed me to automate the merging process of my dependency-updating PRs. I still had to manually work on the other steps of that process, like testing and making sure everything worked right.

But then I thought, well if this part is automated and this part is automated, can I do something that automates the middle?

And that's where my brain clicks and says, well, yes, if I write tests for the system and I verify that the system works, which I should do anyway. Then I automated this, I ran the tests automatically, and Mergify has rules that allow me to check that test passed and, at some point, just wait for Mergify to merge it. And I did, and it worked, and it has been doing that for the last five years!

Mergify in action (fully automated PR)

What does your workflow look like now?

Now my workflow is like this:

Mergify runs the tests on a PR; if the tests pass, everything works correctly, and the author is Dependabot, Mergify automatically merges the PR.

Mergify in action (GitHub Action details)

So, in a way, my workflow changed from having to stay up to date with dependencies, testing, and spending a couple of hours on a weekend doing that into just not doing it at all.

I think every Sunday morning, I just get a bunch of emails. I wait ten minutes, and I get a bunch of other emails saying: "merged, merged, merged, merged, merged", and that's it. When I don't receive the merge notification on one of them, I know there's something broken that I need to check out, which happened last week. That's it. It's amazing. It saves a lot of work.

And let me tell you something else. I will get this notification on Sunday morning. Sometimes I'm still even in bed and looking at my phone, and the thing gets updated for me.

That's how we see it. I just stay in bed, and it happens.

Do you have some metrics?

Keeping up to date with dependencies for changes that would happen, let's say, every two to three months, would take me somewhere between three to 10 hours.

And now it's somewhere between zero and 1 hour.

WorkLogger Mergify automation history 

If you ask someone how much time they had to dedicate to this, it's not a lot, but it's a little bit today, a little bit tomorrow, a little bit next week. Over five years, it adds up, and when you combine everything, it's like a big number.

Thank you JD.  ❤️