GitHub Apps and installation clients
Adapter design. This page specifies the unpublished adapter. Run a request with Octokit and Effect.
Bind App, App.defaults, App.VERSION, app.octokit, app.log, conditional app.oauth and app.webhooks. Accessing an unconfigured OAuth or webhooks getter can throw. Avoid enumerating it while wrapping the parent. Keep the exact configured Octokit constructor for every child client, including instances supplied by webhook transforms.
| Method | Caller-facing contract |
|---|---|
getInstallationOctokit(id) |
An Effect yielding a client bound to that installation, with the original plugins and auth state. |
getInstallationUrl({ state, target_id }?) |
Effect returning the URL. The first call can fetch app metadata and the SDK caches the base-URL promise. Preserve its failure behavior. |
eachInstallation(callback), .iterator() |
Effect traversal or pull-based Stream yielding installation and authenticated client together. Respect callback completion. |
eachRepository([query], callback), .iterator(query?) |
Both all-installation and single-installation forms. Each record keeps its installation-scoped client. |
Delegate enumeration and auth to App. Missing installation information in an upstream webhook transform can produce an explicitly unauthenticated client. Never substitute app-wide credentials. The App iterators hide internal fetches and expose no per-pull signal. Interrupting the adapter stream stops its wait and its subsequent pulls. An in-flight SDK operation can continue. Test those two outcomes separately.
Check. Two installations share a repository name, one has no repositories, one loses authorization mid-traversal. Verify the client on every row, early stop, callback failure, optional getters and a custom Octokit subclass. Published App · Installation URL