Reference

Reference

The exports of forges, with their signatures, types and descriptions.

forges is one client for every forge. You create a provider for each forge that you use, call the same operations on all of them, such as provider.threads.merge(), and get the same objects back.

Providers

Create a provider with the factory of your forge, such as github(). Combine providers with createForges(), or create them from environment variables with forgesFromEnv(). See Providers.

Provider and capabilities

Every provider has the same properties and namespaces. Use can() and support() to check what a forge supports before you call an operation. See Provider and capabilities.

Issues and pull requests

The methods of provider.threads: read, create and update issues and pull requests, then comment, label, review and merge them. See Issues and pull requests.

Repositories

The repos, contents, commits, releases, users, installations, orgs and search namespaces: repositories, their files, commits and releases, accounts, app installations, organisation teams and search. See Repositories.

Notifications, webhooks and CI

The notifications, sources, webhooks, checks, ci and securityAlerts namespaces. See Notifications, webhooks and CI.

Data model

The objects that methods take and return, grouped by topic. Look here when a signature names a type. See Data model.

Requests and pagination

Pages and cursors for lists, request() for endpoints that the model does not cover, and the helpers that turn web URLs into refs. See Requests and pagination.

Errors

The error classes that forges throws, with their properties. All of them extend ForgeError. See Errors.

Testing

fake() creates an in-memory provider, and fixtureFetch() replays recorded requests. See Testing.

Capability matrix

Which operations each forge supports. See Capability matrix.

Events reference

Which event kinds and actions each forge delivers through webhooks. See Events reference.

Environment variables

The variables that providersFromEnv() and forgesFromEnv() read. See Environment variables.

JSON Schemas

A JSON Schema for each public type. See JSON Schemas.

To add a forge, see Write a provider and the provider kit.