jennifer registry

@deckyard/codehost

One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses

githubgitlabforgejogiteagit

Depend on it

[decks]
"@deckyard/codehost" = "^0.4.0"

Versions

VersionStatusKindPinRequiresEnginesCapabilities
0.4.0livegit1ef1b3164bbd@deckyard/github >=0.3.0 @deckyard/gitlab >=0.4.0 @deckyard/forgejo >=0.4.0jennifer >=0.27.0net
0.3.0livegitc9461f108bc6@deckyard/github >=0.3.0 @deckyard/gitlab >=0.4.0 @deckyard/forgejo >=0.4.0jennifer >=0.26.0net
0.2.0livegitf3cf1066d544@deckyard/github >=0.2.0 @deckyard/gitlab >=0.3.0 @deckyard/forgejo >=0.2.1jennifer >=0.26.0net
0.1.0livegit58f29de60f87@deckyard/github >=0.1.0 @deckyard/gitlab >=0.1.0 @deckyard/forgejo >=0.2.1jennifer >=0.26.0net

License

LGPL-3.0-only

Source

Released from
0.4.0
Published under
@deckyard mplx
Repository owner
deckyard

Resolutions

Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.

Readme

@deckyard/codehost

test Documentation release

One API over GitHub™, GitLab™ and Forgejo™ (and Gitea™) for Jennifer programs, so a release script or a triage bot runs against any of them: repositories, issues, labels and comments, change requests (pull and merge requests), releases and their assets, branches, tags, files and commit statuses. It is a facade over @deckyard/github, @deckyard/gitlab and @deckyard/forgejo: states, drafts, commit-status states, release assets and labels are normalised, and the backend client stays at hand for whatever only one forge has.

Documentation

Install

jvc add @deckyard/codehost

This vendors the deck to vendor/deckyard/codehost/, and its three backend decks beside it. Without jvc, unpack the src/ subtree of each release archive (deckyard-<deck>-<version>.tar.gz) to vendor/deckyard/<deck>/.

Usage

import "@deckyard/codehost/" as codehost;

def forges as list of codehost.Forge init [
    codehost.connect("github", "github.com", ""),
    codehost.connect("gitlab", "gitlab.com", ""),
    codehost.connect("forgejo", "codeberg.org", "")
];
def repos as list of string init ["BurntSushi/ripgrep", "gitlab-org/cli", "forgejo/forgejo"];
for (def i in 0..3) {
    def r as codehost.Release init codehost.latestRelease($forges[$i], $repos[$i]);
    io.printf("%s %s: %s\n", $forges[$i].backend, $repos[$i], $r.tag);
}

connect(backend, host, token) takes the backend by name, so it can come from a configuration file, and a token ("" for anonymous access). For a CA certificate, timeouts, retries or plain http, build the client with the backend deck (github.client(...) and its with* options) and wrap it with fromGithub, fromGitlab or fromForgejo.

Errors are one CodehostError (kind "codehost", with the HTTP status and the backend); "limit", "timeout", "closed", "cancelled" and "net" (a network failure, net.NetError) pass through.

Requirements

Jennifer 0.27.0 or newer, with the net capability (it talks HTTPS to the forges); not usable on jennifer-tiny. Depends on @deckyard/github (>=0.3.0), @deckyard/gitlab (>=0.4.0) and @deckyard/forgejo (>=0.4.0); run tools/vendor-deps.sh once before the gate.

Development

tools/check-all.sh                   # the full gate, as CI runs it
jennifer test src/codehost_test.j      # the test overlay
tools/check-docs.sh                  # docs against the code
tools/pack.sh dist                   # build the release archive

Trademarks

GitHub™ is a trademark of GitHub, Inc. GitLab™ is a trademark of GitLab Inc. Codeberg™ is a trademark of Codeberg e.V. Other product and company names, such as Forgejo™ and Gitea™, may be trademarks of their respective owners. They are used only to identify the products this deck works with. This deck is an independent project, not affiliated with, sponsored or endorsed by GitHub, Inc., GitLab Inc., Codeberg e.V., the Forgejo project or CommitGo, Inc.

Licence

LGPL-3.0-only, see LICENSE. Copyright (C) 2026 mplx <[email protected]>.

tools/check-headers.sh checks every source file's SPDX header against deck.toml.

This deck as JSON