PR checks that caught 50 failing runs before merge
· 1 min read
When I joined we.R.play, our repo had no checks on pull requests. Lint errors got merged and broke the production build. I set up checks from scratch, and they have caught 50 failing runs before merge so far.
What kept going wrong
Code moves from dev to staging to production. A lint error merged into dev would travel through staging and only stop things at the production build.
Some errors only show up at build time, and nothing built the code on a PR. So nobody found out until the production build failed.
What I set up
I was asked for two workflows in GitHub Actions:
- a lint workflow that runs on every PR
- a build workflow that runs when a label is added to the PR
Two more were my own idea:
- branch rules, so a PR can only merge when the checks pass
- Prettier and ESLint with a Husky pre-commit hook, so formatting and lint run before each commit
I also added dependency caching to the workflows so they don't reinstall everything on every run.
The numbers
5 developers work under these checks. When I counted on Oct 4, 2026, there had been 468 runs and 50 of them failed:
- lint: 35 failed out of 349
- build: 15 failed out of 119
These are failed runs, not PRs. One PR can fail more than once before it's fixed.
Every one of those 50 failures happened on a PR, before the code reached dev.