Show HN: GitGuard - Painless GitHub PR Automations

10 habosa 4 7/16/2025, 3:51:58 PM gitguard.dev ↗
Hey HN,

Every team I've been on has cobbled together some sort of combination of GitHub branch protections and custom scripts to make sure that PRs conform to organization policies and best practices.

Things like:

- When {X} file is changed, require review from team {Y}

- When a new db migration is added, ensure that a special set of tests pass

- Require multiple approvals when the PR is very large

- Add a special label to PRs that include breaking changes

- Allow emergencies / hotfixes to break glass and bypass all of the above

Most teams tend to start out with a little script running in GitHub actions to enforce all of these policies but it tends to get out of hand and become hard to maintain. PRs that should require scrutiny slip through the cracks, and others that should be allowed through are unnecessarily blocked.

That's why I made GitGuard (https://gitguard.dev/)

GitGuard lets you write and maintain these policies in a custom DSL so simple it looks like pseudocode. The policies are checked on every single PR nearly instantly (no need to wait for a GitHub actions runner) and the results are reported in plain english.

Right now policies can make simple assertions about PR metadata and take some stateful actions (adding labels, requesting review) but I'd love to hear more from HN about how GitGuard could be even more useful.

Comments (4)

adi_hn07 · 10h ago
Seems like a really cool project !! Do launch it on https://superlaun.ch , would love to have GitGuard there.
asddfgg55 · 13h ago
Agree with FerkiHN the project is really great.
FerkiHN · 13h ago
Bro, this is a really cool project, I often do large projects and I remember once accidentally filling in the API key, but I managed to delete it, I think I will use your service, it is really useful.Respect!
habosa · 12h ago
Thank you! Feel free to email me directly if you want any help getting set up. API key detection is something I had not considered but seems pretty feasible!