Skip to content

How it works

Andrei Filippov edited this page Mar 10, 2026 · 3 revisions

What is it

This AI reviewer is a GitHub app that listens for the needs review label on pull requests in CYF organisation repositories.

What triggers review

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.

What model it's using

Currently app is using gpt-4.1 as general-purpose option.

What issue are pointed out

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.

Clone this wiki locally