-
-
Notifications
You must be signed in to change notification settings - Fork 1
How it works
This AI reviewer is a GitHub app that listens for the needs review label on pull requests in CYF organisation repositories.
When the app is installed on an organisation, the admin can specify which repositories the app has access to.
This means the app can be allowed to review and write comments only on selected repositories, such as those where trainees create their PRs.
Once a PR in selected repo is labelled, the app fetches the PR diff and asks the AI via OpenRouter to review it.
After the review is completed, the GitHub app posts inline feedback on the lines where the comments apply.
If user put 'needs review' label again, ai will re-review the full pr.
Currently app is using gpt-4.1 as general-purpose option.
The LLM is prompted to highlight specific types of issues, which currently are:
- Badly named variables and functions
- Duplicated code that could be refactored or de-duplicated
- Common patterns that can be easily improved, for example: if (someExpression) { return true; } else { return false; }
- Poorly scoped variables
The model does not focus on issues that can be easily detected using non-AI tools. For example, problems such as poor indentation can be handled by formatters or linters.