{"id":26454084,"url":"https://github.com/pritom007/ai-pr-review","last_synced_at":"2026-04-10T01:03:58.939Z","repository":{"id":282872493,"uuid":"946013137","full_name":"pritom007/ai-pr-review","owner":"pritom007","description":"🚀✨ AI-powered GitHub Action for instant, automated PR code reviews. Catch bugs, security issues \u0026 optimize your code effortlessly! 🤖🔥","archived":false,"fork":false,"pushed_at":"2025-03-17T11:10:10.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T12:26:43.336Z","etag":null,"topics":["actions","ai","ai-agents","automated","ci-cd-pipeline","github","github-actions","llm","pr-review","release","review"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pritom007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-10T13:29:36.000Z","updated_at":"2025-03-17T11:10:13.000Z","dependencies_parsed_at":"2025-03-17T12:36:53.883Z","dependency_job_id":null,"html_url":"https://github.com/pritom007/ai-pr-review","commit_stats":null,"previous_names":["pritom007/ai-pr-review"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pritom007%2Fai-pr-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pritom007%2Fai-pr-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pritom007%2Fai-pr-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pritom007%2Fai-pr-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pritom007","download_url":"https://codeload.github.com/pritom007/ai-pr-review/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244290603,"owners_count":20429392,"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":["actions","ai","ai-agents","automated","ci-cd-pipeline","github","github-actions","llm","pr-review","release","review"],"created_at":"2025-03-18T19:39:11.010Z","updated_at":"2025-12-30T22:50:01.191Z","avatar_url":"https://github.com/pritom007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Powered Pull Request Review Action 🔍🤖\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Actions Version](https://img.shields.io/github/v/release/pritom007/ai-pr-review)](https://github.com/pritom007/ai-pr-review/releases)\n[![Build Status](https://github.com/pritom007/ai-pr-review/actions/workflows/test.yml/badge.svg)](https://github.com/pritom007/ai-pr-review/actions)\n[![Issues](https://img.shields.io/github/issues/pritom007/ai-pr-review)](https://github.com/pritom007/ai-pr-review/issues)\n[![Pull Requests](https://img.shields.io/github/issues-pr/pritom007/ai-pr-review)](https://github.com/pritom007/ai-pr-review/pulls)\n[![Stars](https://img.shields.io/github/stars/pritom007/ai-pr-review)](https://github.com/pritom007/ai-pr-review/stargazers)\n\nAutomated code review for GitHub pull requests powered by large language models (LLMs). Supports OpenAI, Groq, Azure OpenAI, and any OpenAI-compatible API endpoint.\n\n![PR Review Example](https://via.placeholder.com/800x400.png?text=AI+PR+Review+Demo+Output)\n\n## Table of Contents\n\n- [Features] (#features)\n\n- [Supported Providers] (#supported-providers)\n\n- [Quick Start] (#quick-start)\n\n- [Configuration] (#configuration)\n\n- [Example Output] (#example-output)\n\n- [Roadmap] (#roadmap)\n\n- [Troubleshooting] (#troubleshooting)\n\n- [License] (#license)\n\n## Features ✨\n\n- **Smart Analysis:** Detect bugs, security issues, and optimization opportunities\n- **Multi-LLM Support:** Works seamlessly with leading AI providers\n- **Customizable Feedback:** Control review depth, creativity, and response length (To-Do)\n- **Rich Markdown Formatting:** Clear, structured, and detailed review outputs\n- **Enterprise Ready:** Dockerized with secure handling of secrets\n- **Multi-language Support:** Reviews are available in 100+ languages (Any language supported by the LLM provider)\n\n## Supported Providers 🤖\n\n| Provider     | Base URL                           | Models                                 |\n|--------------|------------------------------------|----------------------------------------|\n| OpenAI       | `https://api.openai.com/v1`        | `gpt-4`, `gpt-3.5-turbo`               |\n| Groq         | `https://api.groq.com/openai/v1`   | `llama3-70b-8192`, `mixtral-8x7b-32768`|\n| Azure OpenAI | Your Azure endpoint                | `gpt-4`, `gpt-35-turbo`                |\n| Local/Custom | `http://localhost:port/v1`         | OpenAI-compatible                      |\n\n## Quick Start 🚀\n\n### 1. Set API Key Secret\n\nIn your GitHub repository:\n\n```yaml\nSettings → Secrets and variables → Actions → New repository secret\nName: INPUT_API_KEY  # make sure this is the name of the secret\nValue: your-api-key-here\n```\n\n### 2. Add Workflow File\n\nCreate `.github/workflows/pr-review.yml`:\n\n```yaml\nname: AI Code Review\non: [pull_request]\n\njobs:\n  ai-review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n    steps:\n      - uses: pritom007/ai-pr-review@v1\n        with:\n          api-key: ${{ secrets.INPUT_API_KEY }}\n          model-name: \"llama3-70b-8192\"\n          base-url: \"https://api.groq.com/openai/v1\"\n          temperature: \"0.7\"\n          max-tokens: \"1000\"\n          language: \"English\"\n```\nSet the llm model api key in your github secrets as `INPUT_API_KEY`. Also make sure you gave `read` permission to the `contents` and `write` premission to the `pull-requests`.\n\n## Configuration ⚙️\n\n| Parameter    | Required | Default                | Description                   |\n|--------------|----------|------------------------|-------------------------------|\n| api-key      | ✅       | -                      | Your LLM provider's API key   |\n| model-name   | ✅       | -                      | Specific LLM model to use     |\n| base-url     | ❌       | OpenAI endpoint        | API URL of your LLM provider  |\n| temperature  | ❌       | 0.7                    | 0 (Precise) ↔ 2 (Creative)    |\n| max-tokens   | ❌       | 1000                   | Limit of response length      |\n| language     | ❌       | English                | Language for the review       |\n\n### Advanced Usage\n\n```yaml\nwith:\n  system-prompt: \"Act as a principal engineer at a leading tech company\"\n  review-focus: \"security,performance,readability\"\n```\n(To be done)\n## Example Output 📝\n\n## .github/workflows \n### test.yml\n- [LOW] [Code Quality] Line 1-31: The file name 'test.yml' might be misleading as it seems to be a workflow for AI PR review rather than a test. Consider renaming it to something more descriptive like 'ai-pr-review.yml'. \n```yml\nname: AI PR Review\n```\n- [MEDIUM] [Security] Line 22: The 'github-token' is passed as an input to the 'ai-pr-review' action. Although it's using the 'secrets.GITHUB_TOKEN', ensure that the 'pritom007/ai-pr-review' action handles the token securely.\n```yml\n      - name: AI PR Review\n        uses: pritom007/ai-pr-review@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n- [MEDIUM] [Service boundaries] Line 20-30: The workflow uses an external action 'pritom007/ai-pr-review' which interacts with an external API 'https://api.groq.com/openai/v1'. This might introduce service boundary issues, such as dependency on the external API or potential data leaks.\n```yml\n      - name: AI PR Review\n        uses: pritom007/ai-pr-review@v1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          repository: ${{ github.repository }}\n          ref: ${{ github.event.ref }}\n          api-key: ${{ secrets.API_KEY }}\n          api-url: https://api.groq.com/openai/v1\n```\n\n- [HIGH] [Error handling] Line 19-30: There is no error handling mechanism in place for the 'ai-pr-review' action. Consider adding try-except blocks or error handling mechanisms to handle potential errors or exceptions raised by the action.\n```yml\n      - name: AI PR Review\n        uses: pritom007/ai-pr-review@v1\n        with:\n          # ...\n\n```\n\n## Roadmap 🗺️\n\n- [ ] Support for customizable prompt templates\n- [ ] Enhanced security review capabilities\n- [ ] Integration with additional code hosting platforms\n\n## Troubleshooting 🛠️\n\n### Common Errors\n\n### 401 Unauthorized\n\n- Ensure your secret key matches the configured workflow input\n\nTest your API key:\n\n```bash\ncurl -H \"Authorization: Bearer $KEY\" $BASE_URL/models\n```\n\n### Model Not Found\n\n- Verify exact model ID and regional availability\n\n## Long Response Times\n\n- Lower `max-tokens` or switch to lighter models\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003e **Important:** AI reviews should complement human judgment, not replace it. Always manually verify critical changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpritom007%2Fai-pr-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpritom007%2Fai-pr-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpritom007%2Fai-pr-review/lists"}