{"id":28716246,"url":"https://github.com/modfin/pre","last_synced_at":"2025-06-15T02:39:43.378Z","repository":{"id":297410175,"uuid":"996641511","full_name":"modfin/pre","owner":"modfin","description":"A LLM PR Tool","archived":false,"fork":false,"pushed_at":"2025-06-13T11:51:09.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-13T12:47:14.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modfin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-05T08:42:25.000Z","updated_at":"2025-06-13T11:51:12.000Z","dependencies_parsed_at":"2025-06-05T10:43:03.438Z","dependency_job_id":"5db9721a-6173-495b-9afb-fe113cdf9465","html_url":"https://github.com/modfin/pre","commit_stats":null,"previous_names":["modfin/pre"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/modfin/pre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modfin","download_url":"https://codeload.github.com/modfin/pre/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpre/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259914055,"owners_count":22931297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T02:39:41.773Z","updated_at":"2025-06-15T02:39:43.358Z","avatar_url":"https://github.com/modfin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PRE - PR Engine\n\n[![PR Review with LLM](https://github.com/modfin/pre/actions/workflows/pr-review.yml/badge.svg)](https://github.com/modfin/pre/actions/workflows/pr-review.yml)\n[![PR Bot with LLM](https://github.com/modfin/pre/actions/workflows/pr-bot.yml/badge.svg)](https://github.com/modfin/pre/actions/workflows/pr-bot.yml)\n\nPRE (PR Engine) is a GitHub Action that automatically reviews pull requests using Large Language Models (LLMs) through the Bellman library.\n\n## Features\n\n- Automated code review for pull requests when they are opened\n- On-demand reviews triggered by commenting `/bellman` on a pull request\n- Detailed feedback on potential bugs, security issues, and code quality\n- Inline comments for specific issues\n- Summary and scoring of pull requests\n- Customizable system prompts\n\n## Usage\n\nSee examples in `.github/workflows` directory\n\n### Automatic PR Review\n\nAdd this to your GitHub workflow file to automatically review PRs when they are opened:\n\n```yaml\nname: Bellman PR Evaluator\n\non:\n  pull_request:\n    types: [opened]\n\njobs:\n  pre-llm-review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: Review PR with LLM\n        uses: modfin/pre@master\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          bellman-key: ${{ secrets.BELLMAN_KEY }}\n          bellman-url: ${{ secrets.BELLMAN_URL }}\n          bellman-model: 'VertexAI/gemini-2.0-flash'\n```\n\n### On-Demand PR Review\n\nAdd this to your GitHub workflow file to enable on-demand reviews triggered by commenting `/bellman` on a pull request:\n\n```yaml\nname: Bellman PR Bot\non:\n  issue_comment:\n    types:\n      - created\n\njobs:\n  pr-bot-on-demand:\n    # Only run on pull request comments that start with '/bellman'\n    if: github.event.issue.pull_request \u0026\u0026 startsWith(github.event.comment.body, '/bellman')\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n        with:\n          # Checkout the PR branch, not the base branch\n          ref: ${{ github.event.pull_request.head.sha }}\n          fetch-depth: 0\n\n      - name: Review PR with LLM\n        uses: modfin/pre@master\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          bellman-key: ${{ secrets.BELLMAN_KEY }}\n          bellman-url: ${{ secrets.BELLMAN_URL }}\n          bellman-model: 'VertexAI/gemini-2.0-flash'\n          system-prompt-addition: ${{ github.event.comment.body }}\n```\n\n## Configuration\n\n| Input | Description                         | Required | Default                     |\n|-------|-------------------------------------|----------|-----------------------------|\n| `github-token` | GitHub token for API access         | Yes | `${{ github.token }}`       |\n| `bellman-key` | API key for LLM service             | Yes | -                           |\n| `bellman-url` | URL to Bellman service              | Yes | -                           |\n| `bellman-model` | LLM model to use for review         | No | `VertexAI/gemini-2.0-flash` |\n| `system-prompt` | Sets a specific system prompt      | No | see `DefaultSystemPrompt`  |\n| `system-prompt-addition` | Additional instructions for the LLM | No | -                           |\n\n## Requirements\n\n- A Bellman API key and URL\n- GitHub token with permissions to read contents and write to pull requests\n\n## Further Development Suggestions\n\n- Add Agent mode allowing the LLM to eg read the entire files, and not just the diffs, if they want to.\n- Refactor, cleanup and make testable\n- Add built binaries instead of building from source each action\\\neg https://full-stack.blend.com/how-we-write-github-actions-in-go.html\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Developed by\n\n[Modular Finance](https://github.com/modfin)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodfin%2Fpre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodfin%2Fpre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodfin%2Fpre/lists"}