---
title: "GitBucket"
description: "The GitHub provider pointed at a GitBucket /api/v3. What GitBucket does not serve fails with a sentence, not a 404."
canonical_url: "https://forges.agntn.dev/platforms/gitbucket"
---
# GitBucket

> The GitHub provider pointed at a GitBucket /api/v3. What GitBucket does not serve fails with a sentence, not a 404.

<platform-facts platform="gitbucket">



</platform-facts>

## Address it

```ts
import { createProvider } from "@agntn/forges";

const gitbucket = await createProvider("github", {
  token: "…",
  baseURL: "https://gitbucket.example.com/api/v3",
});
```

GitBucket implements the GitHub REST v3 API, so there is no separate provider and I am not writing one. The platform string is `github`, the host is the `baseURL` with `/api/v3` spelled out. The token chain would ask `gh` for that host, which is almost never what you want, so pass the token.

## What works

Repositories, issues, pull requests, comments, commits and users through the same endpoints the [GitHub](https://forges.agntn.dev/platforms/github) page lists, as far as your GitBucket version serves them.

## What does not

- Review threads. GitBucket is REST v3 only, no GraphQL. `threads.*` fails with an explicit unsupported endpoint error rather than a bare 404.
- Code search. No `/search/code` endpoint, `code.search` fails explicitly.
- Releases. GitBucket has no `/releases` API, so `releases.*` is a 501 with a sentence.
- Reactions. No reactions routes either, so `listReactions` is a 501 too. Nobody there reacts, apparently.
- Timelines. GitBucket has no timeline route, so `listEvents` returns a `ForgesError` with status 501 and a sentence. A 404 would point at the wrong absence.
- Sub-issues. GitBucket 404s the whole route, so `listSubIssues`, `addSubIssue` and `removeSubIssue` are a 501. Every issue stands alone.
- Issue types and fields. Both routes 404. So `getFields` answers with two empty lists. A write naming one is a 422.
- Owner templates. A host without the GitHub Enterprise header is repository scope only. The owner's `.github` repository is not consulted.
- GitHub Actions. `ci.list` is a `NotFoundError` where `/actions/runs` is missing.

## Gotchas

- Pull request checks. `listChecks` still returns the commit statuses when `/commits/:sha/check-runs` answers 404. GitHub and Enterprise keep that 404 as not found.
- Pagination follows whatever `Link` header GitBucket emits. When there is none, a list is one page with no `nextCursor`.
- The rate limit headers GitHub sends are usually absent, so a 403 is a `PermissionError` unless the response carries `Retry-After` or says rate limit in the body.

## Where it lives

`src/providers/github.ts`, the same class. Anything GitBucket needs is a `baseURL` away.


## Sitemap

See the full [sitemap](https://forges.agntn.dev/sitemap.md) for all pages.
