jonitbr 8 hours ago

Hey HN,

I’ve been working on a GitHub Action that brings AI into PR reviews, and I’d love to share it with you. It’s called the OpenRouter GitHub Action, and the main idea is to make reviewing PRs easier and more thorough without adding extra work for maintainers.

Here’s how it works:

When a PR is created or updated, the action analyzes the changes using your chosen OpenRouter model (you can use models like GPT-4, Claude, etc.).

It posts a detailed review as a comment, highlighting potential bugs, performance improvements, security issues, and best practices.

You can customize the instructions or even set it to trigger reviews based on labels, so you dont get bankrupt :D

The setup is straightforward:

- Add your OpenRouter API key to your GitHub Secrets. - Configure the action in your workflow file. - Choose a model and customize the prompt if needed.

What I love about it is the flexibility—you can use any model OpenRouter supports and tweak the prompts for specific review goals (e.g., security focus, performance, etc.).

I’m curious—would this be useful in your projects?

What features would make it even better?

GitHub repo: https://github.com/jonit-dev/diffguard

Looking forward to hearing your thoughts!