A swamp model extension for querying GitHub repository data using the gh CLI.
This extension provides methods to list repositories, inspect repository
details, enumerate pull requests, issues, releases, and recent workflow runs --
all without leaving the swamp workflow.
- gh CLI installed and available on your
PATH - Authenticated via
gh auth login(token or browser-based flow)
swamp extension pull @webframp/githubCreate a GitHub model instance to start querying data:
swamp model create @webframp/github githubList your repositories (up to 30):
swamp model method run github list_reposGet detailed information about a specific repository:
swamp model method run github get_repo_info --input repo=octocat/Hello-WorldList open pull requests for a repository:
swamp model method run github list_prs --input repo=octocat/Hello-WorldList closed issues:
swamp model method run github list_issues --input repo=octocat/Hello-World --input state=closedList releases:
swamp model method run github list_releases --input repo=octocat/Hello-WorldList recent workflow runs:
swamp model method run github list_workflows --input repo=octocat/Hello-World| Method | Description |
|---|---|
list_repos |
List repositories for the authenticated user with basic metadata |
get_repo_info |
Get detailed information about a specific repository |
list_prs |
List pull requests for a repository with optional state filter |
list_issues |
List issues for a repository with optional state filter |
list_releases |
List releases for a repository |
list_workflows |
List recent workflow runs for a repository |
All list methods have hardcoded limits: repos (30), PRs (20), issues (20),
releases (10), workflows (10). There is no truncated indicator and no
user-configurable limit parameter. If you have more items than the cap, the
output silently omits them.
The extension delegates entirely to the gh CLI. If gh is not in PATH or not
authenticated (gh auth login), every method throws with the gh stderr
output. No in-extension token configuration exists.
If GitHub returns a rate-limit response, gh exits non-zero and the method
fails immediately. There is no backoff or retry. For bulk operations, add delays
between invocations.
The extension casts gh output directly to the expected schema type without Zod
parsing. If a future gh version changes its JSON output shape, the error
surfaces at resource-write time (schema validation) rather than at parse time.
The extension uses whatever host gh is configured for. To target GitHub
Enterprise, configure gh externally
(gh auth login --hostname ghe.example.com).
Apache-2.0 -- see LICENSE.md for details.