🐙 GitHub Integration

Issues, PRs, Gists, and more

Gist Management Issues & PRs Tool Fetching
🐙

Full GitHub Access

Manage gists, issues, pull requests, and even fetch tools directly from GitHub repositories. Complete GitHub workflow integration.

🔧 Available Tools

📝

gist()

Full gist lifecycle: create, read, update, delete, fork, star, and comment management.

🐛

list_issues()

List issues from a repository with state filtering (open, closed, all).

🔀

list_pull_requests()

List pull requests with state filtering.

💬

add_comment()

Add comments to issues or pull requests.

📥

fetch_github_tool()

Download and load tools directly from GitHub URLs.

📝 Gist Management

Actions

ActionDescription
createCreate a new gist
listList gists (user, starred, public)
getGet gist details
updateUpdate existing gist
deleteDelete a gist
forkFork a gist
star / unstarStar/unstar a gist
commentsList gist comments
add_commentAdd comment to gist

Examples

# Create a gist
gist(
    action="create",
    description="My code snippet",
    files={"hello.py": "print('Hello!')"},
    public=False
)

# List my gists
gist(action="list", gist_type="user")

# Get gist with content
gist(action="get", gist_id="abc123", include_content=True)

# Update gist
gist(
    action="update",
    gist_id="abc123",
    files={"hello.py": "print('Updated!')"}
)

# Star a gist
gist(action="star", gist_id="abc123")

# Add comment
gist(action="add_comment", gist_id="abc123", comment_text="Great work!")

🐛 Issues & Pull Requests

# List open issues
list_issues(repo="owner/repo", state="open")

# List all PRs
list_pull_requests(repo="owner/repo", state="all")

# Add comment to issue #42
add_comment(
    repo="owner/repo",
    issue_number=42,
    comment_text="Thanks for reporting! Looking into this."
)

# Uses GITHUB_REPOSITORY env var if repo not specified
list_issues()  # Uses env var

📥 Fetch Tools from GitHub

Download Python tools directly from GitHub and load them into DevDuck.

# Fetch and load a tool
fetch_github_tool(
    github_url="https://github.com/owner/repo/blob/main/tools/my_tool.py",
    tool_name="my_tool"  # Optional, auto-detected from filename
)

# Tool is immediately available!
my_tool(param="value")

# Supported URL formats:
# - https://github.com/owner/repo/blob/main/file.py
# - https://github.com/owner/repo/tree/main/file.py
# - https://raw.githubusercontent.com/owner/repo/main/file.py

⚙️ Configuration

VariableDescription
GITHUB_TOKEN GitHub personal access token (required for most operations)
PAT_TOKEN Alternative token variable
GITHUB_REPOSITORY Default repository (owner/repo format)