{"id":27966567,"url":"https://github.com/tobysolutions/github-pr-review-agent","last_synced_at":"2025-10-19T22:24:50.458Z","repository":{"id":291793694,"uuid":"978784419","full_name":"tobySolutions/github-pr-review-agent","owner":"tobySolutions","description":"A PR review AI agent built with Gaia and with a Github integration to review any pull requests","archived":false,"fork":false,"pushed_at":"2025-05-06T14:39:17.000Z","size":111,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T15:52:22.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tobySolutions.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,"zenodo":null}},"created_at":"2025-05-06T14:00:09.000Z","updated_at":"2025-05-06T14:39:21.000Z","dependencies_parsed_at":"2025-05-07T07:00:17.787Z","dependency_job_id":null,"html_url":"https://github.com/tobySolutions/github-pr-review-agent","commit_stats":null,"previous_names":["tobysolutions/github-pr-review-agent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobySolutions%2Fgithub-pr-review-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobySolutions%2Fgithub-pr-review-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobySolutions%2Fgithub-pr-review-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobySolutions%2Fgithub-pr-review-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobySolutions","download_url":"https://codeload.github.com/tobySolutions/github-pr-review-agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949495,"owners_count":21830196,"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-05-07T20:19:35.272Z","updated_at":"2025-10-19T22:24:50.432Z","avatar_url":"https://github.com/tobySolutions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub PR Review AI\n\nA modern web application that provides AI-powered code reviews for GitHub pull requests. This tool helps developers get instant feedback on their code changes without waiting for human reviewers.\n\n\n## Features\n\n- **AI-Powered Code Reviews**: Get comprehensive feedback on code style, security, performance, and design\n- **GitHub Integration**: Seamlessly fetch pull request diffs from any public GitHub repository\n- **Post Comments**: Automatically post reviews as comments on GitHub pull requests\n- **Markdown Rendering**: Beautifully formatted review feedback with syntax highlighting\n- **Responsive Design**: Works on desktop and mobile devices\n- **Dark Mode Support**: Choose between light and dark themes\n\n## Installation\n\n### Prerequisites\n\n- Node.js 18.x or higher\n- npm or yarn\n- GitHub Personal Access Token\n- Gaia LLM API access (or another compatible LLM)\n\n### Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/yourusername/github-pr-review-ai.git\ncd github-pr-review-ai\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n# or\nyarn install\n```\n\n3. Set up environment variables:\n\nCreate a `.env.local` file in the root directory with the following variables:\n\n```bash\nGITHUB_TOKEN=your_github_personal_access_token\nGAIA_API_KEY=your_gaia_api_key\nGAIA_API_BASE_URL=your_gaia_api_base_url\nGAIA_MODEL=gpt-4o  # or your preferred model\n```\n\n4. Run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\n5. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.\n\n## Usage\n\n1. Enter the GitHub repository owner (username or organization)\n2. Enter the repository name\n3. Enter the pull request number\n4. Optionally check \"Post review as a GitHub comment\" to post the review directly to the PR\n5. Click \"Review Pull Request\"\n6. Wait for the AI to analyze the code changes\n7. Review the AI-generated feedback\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `GITHUB_TOKEN` | GitHub Personal Access Token with repo access | Yes |\n| `GAIA_API_KEY` | API key for Gaia LLM | Yes |\n| `GAIA_API_BASE_URL` | Base URL for Gaia API | Yes |\n| `GAIA_MODEL` | Model name to use (defaults to gpt-4o) | No |\n\n## Technologies Used\n\n- **Next.js**: Full-stack React framework\n- **TypeScript**: Type-safe JavaScript\n- **Tailwind CSS**: Utility-first CSS framework\n- **shadcn/ui**: High-quality UI components\n- **React Hook Form**: Form validation\n- **Zod**: Schema validation\n- **LangChain**: LLM integration\n- **React Markdown**: Markdown rendering\n- **React Syntax Highlighter**: Code syntax highlighting\n\n## Project Structure\n\n```bash\ngithub-pr-review-ai/\n├── app/\n│   ├── actions.ts        # Server actions for PR review\n│   ├── globals.css       # Global styles\n│   ├── layout.tsx        # Root layout\n│   └── page.tsx          # Home page\n├── components/\n│   ├── review-form.tsx   # Main form component\n│   ├── theme-provider.tsx # Dark/light mode provider\n│   └── ui/               # UI components\n├── lib/\n│   └── utils.ts          # Utility functions\n├── public/\n│   └── ...               # Static assets\n├── .env.local            # Environment variables (create this)\n├── next.config.js        # Next.js configuration\n├── package.json          # Dependencies\n├── README.md             # This file\n└── tsconfig.json         # TypeScript configuration\n```\n\n## How It Works\n\n1. **Input Collection**: The user provides GitHub repository details and PR number\n2. **GitHub API Integration**: The application fetches the PR diff using the GitHub API\n3. **AI Analysis**: The diff is sent to the Gaia LLM for analysis\n4. **Feedback Generation**: The AI generates structured feedback on the code changes\n5. **GitHub Comment** (Optional): The review can be posted as a comment on the PR\n6. **Rendering**: The feedback is rendered as formatted markdown with syntax highlighting\n\n## Future Enhancements\n\n- GitHub OAuth integration to avoid needing a personal token\n- Save review history\n- Visual diff viewer\n- Customizable review templates\n- Support for private repositories\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgements\n\n- [Next.js](https://nextjs.org/)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [shadcn/ui](https://ui.shadcn.com/)\n- [GitHub API](https://docs.github.com/en/rest)\n- [LangChain](https://js.langchain.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobysolutions%2Fgithub-pr-review-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobysolutions%2Fgithub-pr-review-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobysolutions%2Fgithub-pr-review-agent/lists"}