plugin-gh
| Version | 2026.265.2200 |
| Repo | box/github.com/opencharly/plugin-gh:v0.2026267.2259 |
| Plugin | yes — see the plugin reference |
The canonical GitHub surface — one implementation of the gh read ops
(pr_meta, pr_files, pr_diff, pr_commits, pr_thread, head_sha) plus
document, which fetches a whole issue OR pull request (body, every
comment, every review and inline review comment, the commits, and
every changed file’s patch AND full content at head) and emits it as
a #GhDocument JSON or YAML artifact, plus issues, which lists a
repo’s OR an entire organization’s issues AND pull requests as a
compact #GhIssueIndex (scope, per-row repo/kind/labels/comment-count,
the PR’s cheap head signals, optional body) in ONE paginated call —
/orgs/{org}/issues for the whole org, /repos/{owner}/{repo}/issues
for one repo. Exposed as a typed, declarative verb
(gh: {op: ..., repo: ...|org: ..., number: ..., state: ..., kind: ...})
and the standalone charly gh CLI. Replaces every hand-rolled
exec.Command(“gh”) call: the client resolves the token explicitly
(GH_TOKEN/GITHUB_TOKEN → the gh hosts.yml auth; an unauthenticated
client omits the header so public reads work), targets api.github.com
directly (never an ambiguous default-host redirect), surfaces the
HTTP status + body on every non-2xx, paginates by the Link header’s
rel=“next” (the ONE mechanism — no page-count guesswork), and caches
every response on the shared charly cache ArtifactStore
(ETag-revalidated for mutable reads, content-addressed for immutable
blobs) so unchanged data is never re-fetched.
Acceptance plan
Section titled “Acceptance plan”This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.
| Intent | Step |
|---|---|
check |
the candy ships its provider package, both cache/document modules, the schema, the generated params, and the out-of-process serve shim |
check |
the schema declares the verb input, the document shape, and the issue-index shape |
check |
the generated params carry the document + issue-index types (SDD regen is current) |
check |
the response cache is the shared spec/cache ArtifactStore (no hand-rolled cache) |
check |
the plugin self-tests green (unit + cache + document assembly) |
check |
the embedded #GhDocument schema compiles, validates a sample, and serializes |