AI code review on your self-hosted Gitea

Review pull requests on your own Gitea with an AI agent, triage issues and set commit statuses. Connects by OAuth app on your instance or a pasted token.

Category
Developer tools
Connect
Connect with one click (OAuth) · managing connections
Operations
15
Triggers
3

Gitea is the self-hosted choice, and MadMax treats it that way: every request goes to your own instance's host, and no platform app ever touches it. The same workflows people build for GitHub port over: an AI reviewer that reads the diff and leaves inline comments anchored to diff lines, an issue triager, a commit status that tells the PR whether the review passed. Runs go both ways. A push, pull request or comment event on your Gitea starts a workflow through a webhook you add in the repository's settings (MadMax verifies the X-Gitea-Signature HMAC on every delivery), and the workflow writes reviews, comments and statuses back, or pauses for a person before it does. Describe it in plain English and MadMax builds the workflow, runs it against a real pull request, and shows you the review it would post before anything reaches your repo.

What teams build

  • The pull request event fires on open and synchronize, the run reads get_pr_diff and list_pr_files, an AI agent with the repository in a knowledge base reviews with the surrounding code in context, and create_pr_review posts the inline comments while create_commit_status marks success or failure with a link.
  • A watch trigger polls list_issues and fires once per new issue, an AI classify step labels it bug, feature or question, and a switch posts an agent-drafted answer with comment_issue for questions or texts the on-call engineer for bugs.
  • On every push to the default branch, a loop reads each changed file with get_file and a save to knowledge step indexes it under its path, so a support agent in another workflow answers "how does our billing retry work?" from the actual code.

How it connects

In Settings → connectors → Gitea, enter your instance's host first (gitea.example.com; a pasted URL is trimmed to the host), then pick one of two routes. OAuth: register an OAuth2 application on your Gitea under Settings → Applications, paste its client id and secret, click Connect and approve on your Gitea; access tokens expire after an hour and MadMax refreshes them automatically. Access token: generate one on the same Gitea settings page (gta_ prefix or a 40-character token) with read:user, repository and issue scopes, write where you need it, and paste it directly. Both are stored encrypted and resolved only inside your workspace. See managing connections.

Related

Every Gitea operation MadMax can run

Straight from the integration's manifest, so this list is what the steps on the canvas can actually do today.

Operation What it does
comment issue Comment on an issue or pull request (PRs are issues in Gitea's comment API).
create commit status Set a commit status (Gitea's stand-in for check runs). It shows on the PR as pending / success / failure with a link.
create issue Open a new issue.
create pr review Post a review: a summary body plus inline comments. `comments` is a JSON array of {path, body, new_position} (new_position = the NEW-side line number; use old_position for a deleted line). `event` COMMENT leaves the PR state alone; APPROVED / REQUEST_CHANGES change it.
get branch head The commit sha at the tip of a branch.
get file Read a file. `text` is the DECODED file content, so use it directly, no base64 handling needed. `sha` is the blob sha.
get pr A pull request: title, body, author, head/base refs and shas, state, mergeable.
get pr diff The pull request as a unified diff (text).
get repo A repository's descriptor: default branch, visibility, clone URLs.
get tree Every path in the repository at a branch/tag/commit (recursive). `tree` is the list: filter `type == "blob"` for files, then read each with get_file. Gitea pages large trees: `truncated` is true when this page didn't cover it (`total_count` says how many).
list issue comments Comments on an issue or pull request, oldest first. `raw` holds the array.
list issues Issues in a repository (pull requests excluded). `raw` holds the array.
list pr files Files changed in a pull request, each with its status and counts. `raw` holds the array.
list pr reviews Reviews on a pull request. `raw` holds the array.
update pr Update a pull request's description (and/or title). Used to merge a review summary into the PR body.

Gitea events that can start a workflow

Issue / PR comment

A comment was created, edited or deleted on an issue or pull request.

Pull request

A pull request was opened, synchronized, closed, reopened or edited.

Push

Commits pushed to a branch or tag.

Works with

Describe the workflow. MadMax builds it and tests it on your data.

Free to start, no card. Connect your apps, say what should happen in plain English, and watch each step run against real data before anything goes live.