{"id":25890747,"url":"https://github.com/drew2a/ai-review","last_synced_at":"2026-03-09T14:34:46.175Z","repository":{"id":279062768,"uuid":"937615351","full_name":"drew2a/ai-review","owner":"drew2a","description":"A GitHub Action that provides automated code review using AI to analyze pull request changes.","archived":false,"fork":false,"pushed_at":"2025-12-27T15:48:43.000Z","size":103,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T07:46:17.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/drew2a.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-23T13:58:04.000Z","updated_at":"2025-12-27T15:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"26105523-5821-45b3-9d81-dce6916a3e87","html_url":"https://github.com/drew2a/ai-review","commit_stats":null,"previous_names":["drew2a/ai-review"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/drew2a/ai-review","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew2a%2Fai-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew2a%2Fai-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew2a%2Fai-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew2a%2Fai-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drew2a","download_url":"https://codeload.github.com/drew2a/ai-review/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drew2a%2Fai-review/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30299110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T14:33:48.460Z","status":"ssl_error","status_checked_at":"2026-03-09T14:33:48.027Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-03-02T19:29:00.985Z","updated_at":"2026-03-09T14:34:46.166Z","avatar_url":"https://github.com/drew2a.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build and Test](https://github.com/drew2a/ai-review/actions/workflows/ci.yml/badge.svg)](https://github.com/drew2a/ai-review/actions/workflows/ci.yml) [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n\n# AI Code Review Action\n\nA GitHub Action that provides automated code review using AI to analyze pull request changes.\n\n## Features\n\n- Automatically reviews pull request changes using AI\n- Provides detailed code suggestions and improvements\n- Adds review comments directly to the PR\n- Works with any programming language\n- Supports different AI models and API endpoints\n- Optional review resolution statuses (e.g., \"APPROVE\", \"REQUEST_CHANGES\", \"COMMENT\")\n- Debug mode for enhanced logging\n\n## Supported models\n\nThis action uses [LiteLLM](https://docs.litellm.ai/docs/providers), so it supports **100+ LLMs** including:\n\n- **OpenAI** (GPT-4o, o1, etc.)\n- **Anthropic** (Claude 3.5 Sonnet, Claude 3.7 Sonnet, etc.)\n- **Google VertexAI / Gemini** (Gemini 1.5 Pro, Gemini 2.0 Flash, etc.)\n- **Azure OpenAI**\n- **HuggingFace**\n- **Ollama**\n- ... and many more.\n\nSee the [LiteLLM Providers documentation](https://docs.litellm.ai/docs/providers) for the full list of supported models and the required environment variables for each provider.\n\n### My (Subjective) Review of the Particular Models\n\nI’ll grade them on a scale from **0 to 10**, where:\n\n- **0** → Completely irrelevant comments\n- **3** → My fresh junior/mid-level colleague\n- **5** → My mid-level colleague who reads Stack Overflow\n- **8** → Me\n- **10** → My very smart colleague\n\nSo, based on this **(highly unscientific) scale**:\n\n- **gpt-4o** → **2**\n- **o1** → **3**\n- **claude-3-5-sonnet** → **5**\n- **claude-3-7-sonnet** → **6**\n- **gemini-2.0-flash** → **2**\n- **gemini-2.5-pro** → **3**\n\n## Inputs\n\n| Name                    | Description                                               | Required | Default              |\n|-------------------------|-----------------------------------------------------------|----------|----------------------|\n| `github_token`          | GitHub token for authentication                           | true     | -                    |\n| `debug`                 | Enable debug mode (true/false)                            | false    | `false`              |\n| `add_review_resolution` | Add review resolution (APPROVE, REQUEST_CHANGES, COMMENT) | false    | `false`              |\n| `add_joke`              | Add a joke to the review comment                          | false    | `false`              |\n| `author_customization`  | YAML configuration for customizing reviews based on PR author | false | -                    |\n\n## Environment Variables\n\nThe action relies on environment variables for LLM configuration, handled by [litellm](https://docs.litellm.ai/docs/).\n\n| Name | Description | Required |\n|------|-------------|----------|\n| `LLM_MODEL` | The model name to use (e.g. `gpt-4o`, `claude-3-5-sonnet`, `gemini/gemini-1.5-pro`) | Yes |\n| `OPENAI_API_KEY` | API Key for OpenAI (if using OpenAI models) | Conditional |\n| `ANTHROPIC_API_KEY` | API Key for Anthropic (if using Claude models) | Conditional |\n| `GEMINI_API_KEY` | API Key for Google Gemini (if using Gemini models) | Conditional |\n| `OPENAI_API_BASE` | Custom API endpoint (if needed) | Optional |\n\n*Note: Check the [LiteLLM documentation](https://docs.litellm.ai/docs/providers) for the specific environment variables required for your chosen provider.*\n\n## Usage\n\nTo use this action in your GitHub workflow, add the following step:\n\n```yaml\n- uses: drew2a/ai-review@v1\n  env:\n    LLM_MODEL: gpt-4o\n    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n  with:\n    github_token: ${{ secrets.GITHUB_TOKEN }}\n    debug: false\n    add_review_resolution: false\n    add_joke: false\n    author_customization: |\n      torvalds: \"This is an experienced developer. Focus on architecture and design patterns.\"\n      defunkt: \"This is a junior developer. Provide educational feedback and explanations.\"\n```\n\n### Example Workflow\n\n```yaml\nname: AI Code Review\n\non: [ pull_request ]\n\npermissions:\n  pull-requests: write\n\njobs:\n  review:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - uses: drew2a/ai-review@v1\n        env:\n          LLM_MODEL: ${{ secrets.LLM_MODEL }}\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n          # Add other env vars required by litellm for your specific provider\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          debug: true\n          add_review_resolution: false\n          add_joke: false\n```\n\n## Author Customization\n\nThe `author_customization` parameter allows you to customize the review behavior based on the PR author's GitHub username. This is useful for providing different types of feedback for team members with different experience levels or roles.\n\n### Configuration Format\n\nThe customization is provided as YAML using actual GitHub usernames:\n\n```yaml\ntorvalds: \"Custom review guidance for this user\"\ndefunkt: \"Different guidance for another user\"\n```\n\n### Example Configuration\n\nHere's an example for a team with users who get customized behavior:\n\n```yaml\nauthor_customization: |\n  torvalds: \"Use a more friendly manner since they're beginners. Give more examples and explanations to help them learn.\"\n  defunkt: \"Use a super formal tone and provide low-level grounding. Focus on technical precision and detailed analysis.\"\n```\n\n### Role-Based Example\n\nYou can also organize by roles using GitHub usernames:\n\n```yaml\nauthor_customization: |\n  torvalds: \"Focus on architectural decisions and design patterns. This developer prefers concise, high-level feedback.\"\n  defunkt: \"Provide educational explanations and learning opportunities. Focus on best practices and code quality fundamentals.\"\n  octocat: \"Be welcoming and provide clear explanations. Focus on project conventions and coding standards.\"\n```\n\n### Usage in Workflow\n\n```yaml\n- uses: drew2a/ai-review@v1\n  with:\n    # ... other parameters ...\n    author_customization: |\n      torvalds: \"Focus on performance and security concerns\"\n      defunkt: \"Educational feedback welcomed\"\n```\n\n## License\n\nReleased under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrew2a%2Fai-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrew2a%2Fai-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrew2a%2Fai-review/lists"}