Metadata-Version: 2.4
Name: elizaos-plugin-github
Version: 2.0.0a5
Summary: GitHub plugin for elizaOS - Python implementation
Project-URL: Homepage, https://github.com/elizaos/eliza
Project-URL: Documentation, https://elizaos.ai/docs
Project-URL: Repository, https://github.com/elizaos/eliza
Project-URL: Issues, https://github.com/elizaos/eliza/issues
Author: elizaOS Contributors
License-Expression: MIT
Keywords: agent,ai,elizaos,git,github
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: gitpython>=3.1.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pygithub>=2.3.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-xprocess>=1.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# elizaos-plugin-github (Python)

Python implementation of the GitHub plugin for elizaOS.

## Installation

```bash
pip install elizaos-plugin-github
```

## Usage

```python
from elizaos_plugin_github import GitHubConfig, GitHubService

# Create configuration
config = GitHubConfig(
    api_token="ghp_your_token_here",
    owner="my-org",
    repo="my-repo",
)

# Create service
service = GitHubService(config)

# Start service
await service.start()

# Create an issue
from elizaos_plugin_github.types import CreateIssueParams

issue = await service.create_issue(
    CreateIssueParams(
        owner="my-org",
        repo="my-repo",
        title="Bug: Something is broken",
        body="Description of the bug...",
        labels=["bug"],
    )
)
print(f"Created issue #{issue.number}")

# Create a pull request
from elizaos_plugin_github.types import CreatePullRequestParams

pr = await service.create_pull_request(
    CreatePullRequestParams(
        owner="my-org",
        repo="my-repo",
        title="Fix the bug",
        head="fix/bug-123",
        base="main",
    )
)
print(f"Created PR #{pr.number}")

# Stop service
await service.stop()
```

## Configuration

The plugin can be configured via environment variables:

- `GITHUB_API_TOKEN` (required): GitHub personal access token
- `GITHUB_OWNER`: Default repository owner
- `GITHUB_REPO`: Default repository name
- `GITHUB_BRANCH`: Default branch (defaults to "main")
- `GITHUB_WEBHOOK_SECRET`: Secret for webhook verification
- `GITHUB_APP_ID`: GitHub App ID for app authentication
- `GITHUB_APP_PRIVATE_KEY`: GitHub App private key
- `GITHUB_INSTALLATION_ID`: GitHub App installation ID

## Features

### Repository Operations

- Get repository information
- List repositories

### Issue Operations

- Create issues
- Get issue details
- Update issues
- List issues
- Close/reopen issues

### Pull Request Operations

- Create pull requests
- Get PR details
- Update pull requests
- List pull requests
- Merge pull requests

### Review Operations

- Create reviews (approve, request changes, comment)
- List reviews

### Comment Operations

- Create comments on issues/PRs
- List comments

### Branch Operations

- Create branches
- Delete branches
- List branches

### File Operations

- Get file content
- List directory contents

### Commit Operations

- Create commits with file changes

## Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy elizaos_plugin_github

# Linting
ruff check .
ruff format .
```

## License

MIT



