2026-05-31 19:25:22 -05:00
2026-01-16 08:00:16 +00:00
2026-03-12 05:22:51 +00:00
2026-05-31 13:16:21 -05:00
2025-08-27 16:53:48 -07:00
2026-01-19 08:41:56 +00:00
2026-05-31 19:25:22 -05:00

shockbot

Self-hosted AI code review for Gitea, powered by Ollama. Tag @shockbot in a PR comment to trigger a review, or configure it to auto-review on every PR.

Based on pullfrog — simplified for self-hosted Gitea + Ollama setups.

Requirements

  • Gitea instance
  • Ollama instance reachable from your Gitea Actions runner
  • A Gitea bot account with repo read/write access

Setup

1. Create a bot account

Create a Gitea account for the bot (e.g. shockbot) and generate an access token with read:issue, write:issue, read:pull_request, write:pull_request scopes.

2. Add secrets to your repo

Secret Description
BOT_TOKEN Gitea access token for the bot account
OLLAMA_HOST URL of your Ollama instance (e.g. http://192.168.1.10:11434)

3. Add the workflow

Create .gitea/workflows/shockbot.yml in the repo you want reviewed:

name: Shockbot Review
on:
  pull_request:
    types: [opened, ready_for_review]
  issue_comment:
    types: [created]

permissions:
  contents: write
  pull-requests: write
  issues: write

jobs:
  review:
    if: |
      (github.event_name == 'pull_request' && !github.event.pull_request.draft) ||
      (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@shockbot'))
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 1

      - name: Run shockbot (PR trigger)
        if: github.event_name == 'pull_request'
        uses: https://git.shockvpn.com/ShockVPN/shockbot@main
        with:
          prompt: "Review this pull request"
        env:
          BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
          OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }}
          GITEA_URL: https://git.shockvpn.com
          GITEA_PR_NUMBER: ${{ github.event.pull_request.number }}
          GITEA_PR_TITLE: ${{ github.event.pull_request.title }}

      - name: Run shockbot (mention trigger)
        if: github.event_name == 'issue_comment'
        uses: https://git.shockvpn.com/ShockVPN/shockbot@main
        with:
          prompt: ${{ github.event.comment.body }}
        env:
          BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
          OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }}
          GITEA_URL: https://git.shockvpn.com
          GITEA_PR_NUMBER: ${{ github.event.issue.number }}

Configuration

Three values need to be configured — the rest come from the event context (as shown in the workflow example above) or are set automatically by Gitea Actions.

Secret / env var Description
BOT_TOKEN Gitea access token for the bot account
OLLAMA_HOST URL of your Ollama instance
GITEA_URL URL of your Gitea instance

Model

Defaults to qwen3.6:35b. Override with the model input:

with:
  prompt: "Review this pull request"
  model: "llama3.1:70b"

Usage

  • Auto-review on PR open — the PR trigger fires automatically on new PRs
  • Manual trigger — comment @shockbot review on any PR to trigger a review on demand
  • Custom prompt — any comment mentioning @shockbot is passed as the prompt, so @shockbot review focusing on security works

License

MIT. Based on pullfrog/pullfrog, used under the MIT license.

S
Description
Self-hosted Ollama-powered code review bot for Gitea Actions based on pullfrog
Readme MIT 27 MiB
Languages
TypeScript 97.9%
Shell 0.7%
Dockerfile 0.7%
JavaScript 0.7%