Jido Chat GitHub

Hex.pmHex DocsCILicenseWebsiteEcosystemDiscord

jido_chat_github adapts GitHub Issues and issue comments to the Jido.Chat.Adapter contract.

Installation

def deps do
  [
    {:jido_chat_github, "~> 0.1"}
  ]
end

Feature surface

GitHub does not accept arbitrary binary uploads through the Issues comments API. Media support is implemented with GitHub Markdown links: remote image URLs render as images, and remote file/audio/video URLs render as links. Local file paths and in-memory uploads should be uploaded elsewhere first, then sent as public or GitHub-accessible URLs.

Replies are represented as quoted Markdown context because GitHub issue comments do not have native nested replies. Pass reply_to_id, reply_to_text, and optionally reply_author when sending a comment.

Live testing

Create or choose a disposable issue, then set:

RUN_LIVE_GITHUB_TESTS=true
GITHUB_TOKEN=github_pat_or_app_installation_token
GITHUB_TEST_ISSUE=owner/repo#123
GITHUB_WEBHOOK_SECRET=shared-webhook-secret

The token needs Issues: write on the target repository. If testing against pull request comments through the shared Issues comments API, also grant Pull requests: write.

Run:

mix test --include live

Webhook setup

Configure a GitHub App webhook, organization webhook, or repository webhook:

The adapter treats owner/repo#issue_number as the external room id for issue-thread events.