Metadata-Version: 2.4
Name: mergemate-review
Version: 1.0.1
Summary: MergeMate — AI-powered pull request review and automation
Author-email: MergeMate <hello@mergemate.dev>
Maintainer-email: MergeMate <hello@mergemate.dev>
Project-URL: Homepage, https://github.com/imtiyaazsalie/mergemate
Project-URL: Documentation, https://imtiyaazsalie.github.io/mergemate/
Project-URL: Repository, https://github.com/imtiyaazsalie/mergemate
Project-URL: Issues, https://github.com/imtiyaazsalie/mergemate/issues
Keywords: AI,Agents,Pull Request,Automation,Code Review,MergeMate,PR Review
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: aiohttp==3.13.4
Requires-Dist: anthropic>=0.69.0
Requires-Dist: atlassian-python-api==3.41.4
Requires-Dist: azure-devops==7.1.0b4
Requires-Dist: azure-identity==1.25.0
Requires-Dist: boto3==1.40.45
Requires-Dist: certifi==2024.8.30
Requires-Dist: dynaconf==3.2.4
Requires-Dist: fastapi==0.118.0
Requires-Dist: GitPython==3.1.41
Requires-Dist: google-cloud-aiplatform==1.154.0
Requires-Dist: google-cloud-storage==2.10.0
Requires-Dist: protobuf==6.33.6
Requires-Dist: Jinja2==3.1.6
Requires-Dist: litellm==1.84.0
Requires-Dist: loguru==0.7.2
Requires-Dist: msrest==0.7.1
Requires-Dist: openai>=1.55.3
Requires-Dist: pytest==9.0.2
Requires-Dist: pytest-asyncio>=1.3.0
Requires-Dist: PyGithub==1.59.*
Requires-Dist: PyJWT==2.10.1
Requires-Dist: PyYAML==6.0.1
Requires-Dist: python-gitlab==8.3.0
Requires-Dist: retry==0.9.2
Requires-Dist: starlette-context==0.3.6
Requires-Dist: tiktoken==0.12.0
Requires-Dist: ujson==5.8.0
Requires-Dist: uvicorn==0.22.0
Requires-Dist: tenacity==8.2.3
Requires-Dist: a2a-sdk[http-server]==1.0.3
Requires-Dist: langfuse==3.14.5
Requires-Dist: gunicorn==23.0.0
Requires-Dist: pytest-cov==7.0.0
Requires-Dist: pydantic==2.13.3
Requires-Dist: html2text==2024.2.26
Requires-Dist: giteapy==1.0.8

# MergeMate

[![Tests](https://github.com/imtiyaazsalie/mergemate/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/imtiyaazsalie/mergemate/actions/workflows/build-and-test.yaml)
[![Docs](https://img.shields.io/badge/docs-mergemate-80ff40?style=flat&logo=github)](https://imtiyaazsalie.github.io/mergemate/)
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)

AI-powered pull request review and automation.

---

MergeMate automates code review workflows by providing AI-generated feedback, suggestions, and documentation for pull requests. It integrates with major git providers and supports multiple AI models.

## Why MergeMate?

- **Fast & Efficient**: Each tool (`/review`, `/improve`, `/ask`) uses a single LLM call
- **Handles Any PR Size**: Built-in compression strategy processes both small and large PRs
- **Highly Customizable**: Configuration-driven behavior via `.mergemate.toml`
- **Platform Agnostic**: GitHub, GitLab, Bitbucket, Azure DevOps, Gitea
- **Multi-Model Support**: OpenAI, Claude, Deepseek, and more
- **Self-Hosted**: Full control over your data and infrastructure

## Quick Start

```bash
# AI-powered setup — auto-detects your project
mergemate-review init

# Or specify details
mergemate-review init --model deepseek/deepseek-chat --language python --project-type web
```

This generates `.mergemate.toml` + GitHub Actions workflow. Add your API key as a repo secret, done.

### Manual

```yaml
# .github/workflows/mergemate.yml
name: MergeMate
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: mergemate/mergemate@main
        env:
          OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

### CLI

```bash
pip install mergemate-review
export OPENAI_KEY=your_key_here
mergemate-review --pr_url https://github.com/owner/repo/pull/123 review
```

### Docker

```bash
docker run -e OPENAI_KEY=$OPENAI_KEY \
  mergemate/mergemate review \
  --pr_url https://github.com/owner/repo/pull/123
```

## Features

| Tool | Description |
|---|---|
| `/review` | Comprehensive PR review with inline suggestions |
| `/describe` | Auto-generate PR title and description |
| `/improve` | Code suggestions as review comments |
| `/ask` | Ask questions about the PR in context |
| `/update_changelog` | Update CHANGELOG based on PR contents |
| `/add_docs` | Generate documentation for changed code |
| `/generate_labels` | Auto-label PRs based on content |
| `/similar_issue` | Find related issues |

### Platform Support

| | GitHub | GitLab | Bitbucket | Azure DevOps | Gitea |
|---|---|---|---|---|---|
| Review | ✅ | ✅ | ✅ | ✅ | ✅ |
| Describe | ✅ | ✅ | ✅ | ✅ | ✅ |
| Improve | ✅ | ✅ | ✅ | ✅ | ✅ |
| Ask | ✅ | ✅ | ✅ | ✅ | |
| CLI | ✅ | ✅ | ✅ | ✅ | ✅ |
| Webhook/App | ✅ | ✅ | ✅ | ✅ | ✅ |

## Core Capabilities

- **PR Compression**: Adaptive file patch fitting for any PR size
- **Dynamic Context**: Automatically gather relevant project context
- **Ticket Context**: Fetch linked issue/ticket information
- **Interactivity**: Respond to comments and follow-up questions
- **Self-Reflection**: Review and improve its own output
- **Multi-Model**: Switch between AI providers via configuration

## Configuration

MergeMate is configured via `.mergemate.toml` in your repository root. See `mergemate/settings/configuration.toml` for all available options.

```toml
[config]
model = "gpt-4"
git_provider = "github"

[pr_reviewer]
extra_instructions = "Focus on security and performance"
```

## Data Privacy

MergeMate is self-hosted — your code never leaves your infrastructure. API calls go directly from your deployment to your chosen AI provider (OpenAI, Anthropic, etc.).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.

## License

Proprietary. All rights reserved.
