made-in-common/forges
关于
One client, every forge.
开发工具实测星标增长
- 24小时
- +1
- 7天
- +3
- 15天
- +10
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文forges
One client, every forge.
forges is a TypeScript library for working with issues, pull requests, notifications, checks and webhooks on fourteen forges: GitHub, GitLab, Bitbucket, Forgejo, Gitea, Gitee, Azure DevOps, Cursor Origin, Tangled, Pushin.eu, Sourcehut, GitBucket, GitCafe and Upstream. A forge is a service that hosts Git repositories and the collaboration around them. It also reads repositories and their contents from Git hosts without the collaboration, such as Cloudflare Artifacts. Each provider normalises the forge's responses into one data model and declares which operations it supports.
Read the documentation at forges.link.
install
pnpm add forges
forges requires Node.js 22.18 or later.
usage
import { createForges, forgejo, github } from 'forges'
const forges = createForges([
github({
auth: { type: 'token', token: process.env.GITHUB_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)
}
The example above lists the notifications of two forges in a single loop. To go further, the quick start walks you through reading a thread, writing a comment and checking what a forge supports.
documentation
- Getting started covers installation, import paths and a first call.
- The guides explain authentication, working with several forges, environment variables, webhooks, capabilities, errors, pagination, browser bundles and testing.
- The concepts describe the data model, capabilities, providers and events.
- Each provider page explains how to authenticate and how that forge behaves.
- The reference lists the API, the capability matrix, errors and JSON schemas.
- The examples are small, tested projects that use
forges.
related projects
@agntn/forges: a TypeScript API for GitHub, GitLab, Gitea, Forgejo and GitBucket, with an MCP server and Pi and OMP extensions for agents.git-pkgs/forge: a Go library and CLI for GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud, Gerrit and Tangled.
contributing
Contributions are welcome. The contribution guide explains how to set up the repository and run the checks.
licence
Made with ❤️
Published under the MIT licence.
探索相关项目
加载中…