Skip to content

Repository files navigation

pergent.sh

Run pergent code reviews on GitLab merge requests and GitHub pull requests, one Kubernetes Job per review.

License Go Image Helm chart

Install · GitHub setup · Dashboard · Skills · Commands · Config reference · All docs


pergent.sh runs pergent code reviews on GitLab merge requests and GitHub pull requests, inside your Kubernetes cluster, with one Job per review.

Features

Reviews

  • 🧩 Skills: markdown skills that tell the model what to look for, kept in a shared library.
  • 💬 Inline findings: one comment, updated on every push, plus each finding as a thread on its lines.
  • ✅ Approval: a clean review approves the change, and pergent.sh takes the approval back when that stops being true.
  • ⚡ Incremental reviews: a push re-reviews only what it changed.
  • 🗑️ Deleted and renamed files: reviews the lines a change deletes, and what still uses them.
  • 🧪 CI jobs: reviews read the results of chosen CI jobs, and a failed one can hold approval back.
  • 🕸️ Code graph (experimental): off by default; a repository can give its reviews the callers and callees of the changed code.
  • 🔗 Linked repositories: checks a change against the repositories that depend on it.
  • 🍴 Fork merge requests: changes from forks are reviewed too.

Tuning

  • 🙋 Commands: @<bot> review and dismiss in a comment, or as buttons on the dashboard.
  • 🧠 Learn from dismissals: reviews are told what people rejected before, and why.
  • 🤫 Quiet reviews: fewer nitpicks and shorter comments, the same blocking findings.
  • 🎛️ Comment layout: each repository chooses what its review comment shows.
  • 🔍 Security scan: a whole-repository security audit of the default branch, started by hand, with findings you can dismiss.
  • 🤖 Models: global and team models, a model chain per repository, team or install, and a backup model when a key is out of quota or credit.

Control and cost

  • 🛡️ Trusted authors: a change from an author without write access, and not on the allowlist, waits until someone starts its review.
  • 💰 Monthly token quota: a ceiling on the tokens an instance or a repository spends.
  • 🔒 Job isolation: a Job gets only a read-only clone token, and no service account token.

Insight and operations

  • 🖥️ Dashboard: sign-in, teams, repositories, readiness checks and an audit log.
  • 📊 Usage and metrics: where the tokens go, Prometheus metrics and a Grafana dashboard.
  • 📈 Skill results: which skills people act on, and which they set aside.
  • 🩺 Troubleshooting: find a failed review's Job and pod, and which step failed.
  • 🔌 Review API: other systems can send changes for review with an API key.

How it works

  1. A merge request or pull request webhook reaches pergent.sh.
  2. A Kubernetes Job checks out the change, runs the review and posts the result back.
  3. pergent.sh posts one comment, updated on every push, with findings as threads on the diff and a status named pergent.
  4. A clean review is approved. A person can re-run it or dismiss a finding from a comment or the dashboard.

The Job only holds a read-only clone token, the key of its model and a one-time result token. More on how it works.

Requirements

  • Kubernetes
  • PostgreSQL 13 or newer
  • A review bot on GitLab, or a GitHub App
  • An API key for an LLM provider
  • An HTTPS route so GitLab or GitHub can reach pergent.sh

Full requirements.

Install

helm repo add pergent-sh https://gopaytech.github.io/pergent.sh/charts/releases
helm install pergent-sh pergent-sh/pergent-sh -n pergent-sh -f values.yaml

You need a Secret and a values.yaml first: follow the install guide.

Docs

License

MIT. See LICENSE.

Releases

Packages

Contributors

Languages