Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

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

# Run tests
pytest

# Type checking
mypy elizaos_plugin_github

# Linting
ruff check .
ruff format .

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_github-2.0.0a5.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_github-2.0.0a5-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

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

Hashes for elizaos_plugin_github-2.0.0a5.tar.gz
Algorithm Hash digest
SHA256 0af942016ffd9b56bbc60cdad78a29d5427f88c095faba2177710557e90e8440
MD5 c15205230883f648f770932e85d4515a
BLAKE2b-256 be286dcff313ff14de65291a6f5b5433ac43af5c51b69debae166f0fe802a6b9

See more details on using hashes here.

File details

Details for the file elizaos_plugin_github-2.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_github-2.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 64cd394cbee42ac47bb5218b2018f980378862420ae77e5872d2ab7678478c5c
MD5 8310c7ace35a16022ebae41d569f3ccd
BLAKE2b-256 89f75e441d7c87a12e6f2c16de951470607d980078c7b2c09d5136d06a07b1eb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page