GitHub plugin for elizaOS - Python implementation
Project description
elizaos-plugin-github (Python)
Python implementation of the GitHub plugin for elizaOS.
Installation
pip install elizaos-plugin-github
Usage
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 tokenGITHUB_OWNER: Default repository ownerGITHUB_REPO: Default repository nameGITHUB_BRANCH: Default branch (defaults to "main")GITHUB_WEBHOOK_SECRET: Secret for webhook verificationGITHUB_APP_ID: GitHub App ID for app authenticationGITHUB_APP_PRIVATE_KEY: GitHub App private keyGITHUB_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
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Type checking
mypy elizaos_plugin_github
# Linting
ruff check .
ruff format .
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elizaos_plugin_github-2.0.0a5.tar.gz.
File metadata
- Download URL: elizaos_plugin_github-2.0.0a5.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0af942016ffd9b56bbc60cdad78a29d5427f88c095faba2177710557e90e8440
|
|
| MD5 |
c15205230883f648f770932e85d4515a
|
|
| BLAKE2b-256 |
be286dcff313ff14de65291a6f5b5433ac43af5c51b69debae166f0fe802a6b9
|
File details
Details for the file elizaos_plugin_github-2.0.0a5-py3-none-any.whl.
File metadata
- Download URL: elizaos_plugin_github-2.0.0a5-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64cd394cbee42ac47bb5218b2018f980378862420ae77e5872d2ab7678478c5c
|
|
| MD5 |
8310c7ace35a16022ebae41d569f3ccd
|
|
| BLAKE2b-256 |
89f75e441d7c87a12e6f2c16de951470607d980078c7b2c09d5136d06a07b1eb
|