Ten forges, one API
One API for every code forge
Work with issues, pull requests, notifications, checks and webhooks on GitHub, GitLab, Forgejo and seven more forges through one typed data model.
What you get
What the providers handle
You write code against the shared model. Each provider handles the endpoints, pagination, authentication and rate limits of its forge.
One data model
Issues, pull requests, comments, checks and events have the same shape on every forge. The original payload is in the raw field.
Declared capabilities
Each provider declares what it supports, and CI checks the claims against the tests. Call provider.can() to check support before you call an operation.
Verified webhooks
The provider verifies each delivery and turns it into typed events, with the same kinds and actions on every forge.
Write it once
The same code on every forge
Register as many providers as you need. Each call goes to the provider that matches its ref.
import { createForges, forgejo, github, gitlab } from 'forges'
const forges = createForges([
github({ auth: { type: 'token', token: process.env.GITHUB_TOKEN! } }),
gitlab({ auth: { type: 'token', token: process.env.GITLAB_TOKEN! } }),
forgejo({ baseUrl: 'https://codeberg.org', auth: { type: 'token', token: process.env.CODEBERG_TOKEN! } }),
])
for await (const notification of forges.notifications.list()) {
console.log(notification.ref.forge, notification.title)
}
import { github } from 'forges/github'
const forge = github({ webhookSecret: process.env.GITHUB_WEBHOOK_SECRET }).create()
export default async function handler(request: Request) {
const events = await forge.webhooks.ingest({ headers: request.headers, body: await request.text() })
for (const event of events) {
console.log(event.kind, event.action, event.summary)
}
return new Response(null, { status: 204 })
}
Know before you call
See what each forge can do
Bitbucket has no releases, and Tangled has no checks. Every provider declares what it supports, so your code can check before it calls.
GitHub
GitLab
Bitbucket
Forgejo
Gitea
Gitee
Azure DevOps
Cursor Origin
pushin.eu
Tangled
writes.merge
notifications.list
releases.list
checks.list
search.threads
webhooks.create
ci.runs
- Native and verified
- Experimental
- Not available
Use it for
What you can build
Each card links to a tested example project or a guide.
Make your first call
Install the package, read an issue and add a second forge.