DEV Community

Cover image for The PR That Touched 99% of Our Codebase Got Merged in 45 Minutes
Phaneendra Kanduri
Phaneendra Kanduri

Posted on

The PR That Touched 99% of Our Codebase Got Merged in 45 Minutes

We had ~400 utility functions scattered across dozens of files in our Angular codebase. No naming convention. No predictable location. Just chaos that accumulated over years.

Then three PRs landed in the same review cycle.

First one: a developer created a function that already existed somewhere else. Team flagged it. PR held.

Second one: same thing, different developer. Team flagged it again.

Third one was mine. I was hunting for a utility I needed, couldn't find it, wrote it myself. Got flagged for the same reason.

At that point I stopped treating it as a code review problem and started treating it as an architecture problem.

I audited every utility across the codebase, consolidated them into a single shared service class, and updated every reference -- every component, every service, every file that touched the old scattered utilities. The PR covered 99% of the codebase.

PRs that size usually sit for 8 hours minimum. This one was reviewed and merged in under an hour.

That told me everything. The team didn't need convincing. They'd all been silently fighting the same problem. They were waiting for someone to solve it, not debate it.

Sometimes the fastest review is the one that fixes something everyone stopped mentioning because they assumed it was permanent.

Top comments (0)