Getting started
Introduction
What forges is, and what you can build with it.
forges is a TypeScript library for working with issues, pull requests, notifications, checks and webhooks on ten code forges. Each provider normalises the forge's responses into one data model and declares which operations it supports.
You write code against the model. The provider takes care of endpoints, pagination, authentication and rate limits.
Supported forges
forges supports GitHub, GitLab, Bitbucket Cloud, Forgejo, Gitea, Gitee, Azure DevOps, Cursor Origin, Tangled and pushin.eu. Each one has a provider page with its authentication options and the behaviour specific to that forge.
What you can build
- A notification inbox that merges notifications from GitHub, GitLab and Forgejo.
- A bot that labels new issues and closes threads from a comment command.
- A release digest across repositories on different forges.
- A webhook receiver that turns deliveries from any forge into one event type.
- Tests that run against an in-memory forge, with no network.
The examples are small, tested projects for the first three.
How it works
- A provider function such as
github()returns a factory. No request goes out yet. create()builds the provider.createForges()does this for a list of factories.- The provider exposes namespaces such as
threads,notifications,checksandwebhooks. - Each operation has a capability entry.
provider.can()reads it, so you can check support before you call an operation that a forge might lack.