Metadata-Version: 2.4
Name: mergemate-review
Version: 1.0.7
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
Requires-Dist: anthropic>=0.69.0
Requires-Dist: dynaconf>=3.2
Requires-Dist: GitPython>=3.1
Requires-Dist: Jinja2>=3.1
Requires-Dist: litellm>=1.84
Requires-Dist: loguru>=0.7
Requires-Dist: openai>=1.55
Requires-Dist: PyGithub>=1.59
Requires-Dist: PyJWT>=2.10
Requires-Dist: PyYAML>=6.0
Requires-Dist: python-gitlab>=8.3
Requires-Dist: atlassian-python-api>=3.41
Requires-Dist: azure-devops>=7.1b4
Requires-Dist: boto3>=1.40
Requires-Dist: giteapy>=1.0
Requires-Dist: retry>=0.9
Requires-Dist: fastapi>=0.118
Requires-Dist: starlette-context>=0.3
Requires-Dist: tiktoken>=0.12
Requires-Dist: tenacity>=8.2
Requires-Dist: pydantic>=2.13
Requires-Dist: html2text>=2024.2

# 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.
