{"name":"@deckyard/codehost","description":"One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-codehost.git","ref":"0.1.0","commit":"58f29de60f87621813dc772edc40391d69a8390a","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/github":"\u003e=0.1.0","@deckyard/gitlab":"\u003e=0.1.0","@deckyard/forgejo":"\u003e=0.2.1"},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["github","gitlab","forgejo","gitea","git"],"description":"One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses","publishedAt":"1794679168","repoId":1457945434,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.2.0":{"version":"0.2.0","kind":"git","url":"https://github.com/deckyard/deck-codehost.git","ref":"0.2.0","commit":"f3cf1066d5440657df858998f19056d8c138288d","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/github":"\u003e=0.2.0","@deckyard/gitlab":"\u003e=0.3.0","@deckyard/forgejo":"\u003e=0.2.1"},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["github","gitlab","forgejo","gitea","git"],"description":"One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses","publishedAt":"1794690654","repoId":1457945434,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.3.0":{"version":"0.3.0","kind":"git","url":"https://github.com/deckyard/deck-codehost.git","ref":"0.3.0","commit":"c9461f108bc6ab4640b757b2870723c366c118cb","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/github":"\u003e=0.3.0","@deckyard/gitlab":"\u003e=0.4.0","@deckyard/forgejo":"\u003e=0.4.0"},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["github","gitlab","forgejo","gitea","git"],"description":"One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses","publishedAt":"1794767888","repoId":1457945434,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.4.0":{"version":"0.4.0","kind":"git","url":"https://github.com/deckyard/deck-codehost.git","ref":"0.4.0","commit":"1ef1b3164bbd2dda3e3c6ceddaa4ef40ad77fc81","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/github":"\u003e=0.3.0","@deckyard/gitlab":"\u003e=0.4.0","@deckyard/forgejo":"\u003e=0.4.0"},"engines":{"jennifer":"\u003e=0.27.0"},"capabilities":["net"],"keywords":["github","gitlab","forgejo","gitea","git"],"description":"One API over GitHub, GitLab and Forgejo: repositories, issues, pull and merge requests, releases, branches, tags, files and commit statuses","publishedAt":"1795557053","repoId":1457945434,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/codehost\n\n[![test](https://github.com/deckyard/deck-codehost/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-codehost/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-codehost/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-codehost)](https://github.com/deckyard/deck-codehost/releases/latest)\n\nOne API over GitHub™, GitLab™ and Forgejo™ (and Gitea™) for\n[Jennifer](https://jennifer-lang.dev/) programs, so a release script or a\ntriage bot runs against any of them: repositories, issues, labels and\ncomments, change requests (pull and merge requests), releases and their\nassets, branches, tags, files and commit statuses. It is a facade over\n[`@deckyard/github`](https://github.com/deckyard/deck-github),\n[`@deckyard/gitlab`](https://github.com/deckyard/deck-gitlab) and\n[`@deckyard/forgejo`](https://github.com/deckyard/deck-forgejo): states,\ndrafts, commit-status states, release assets and labels are normalised, and\nthe backend client stays at hand for whatever only one forge has.\n\n**[Documentation](https://deckyard.github.io/deck-codehost/)**\n\n## Install\n\n```sh\njvc add @deckyard/codehost\n```\n\nThis vendors the deck to `vendor/deckyard/codehost/`, and its three backend\ndecks beside it. Without `jvc`, unpack the `src/` subtree of each release\narchive (`deckyard-\u003cdeck\u003e-\u003cversion\u003e.tar.gz`) to `vendor/deckyard/\u003cdeck\u003e/`.\n\n## Usage\n\n```jennifer\nimport \"@deckyard/codehost/\" as codehost;\n\ndef forges as list of codehost.Forge init [\n    codehost.connect(\"github\", \"github.com\", \"\"),\n    codehost.connect(\"gitlab\", \"gitlab.com\", \"\"),\n    codehost.connect(\"forgejo\", \"codeberg.org\", \"\")\n];\ndef repos as list of string init [\"BurntSushi/ripgrep\", \"gitlab-org/cli\", \"forgejo/forgejo\"];\nfor (def i in 0..3) {\n    def r as codehost.Release init codehost.latestRelease($forges[$i], $repos[$i]);\n    io.printf(\"%s %s: %s\\n\", $forges[$i].backend, $repos[$i], $r.tag);\n}\n```\n\n`connect(backend, host, token)` takes the backend by name, so it can come\nfrom a configuration file, and a token (`\"\"` for anonymous access). For a\nCA certificate, timeouts, retries or plain http, build the client with the\nbackend deck (`github.client(...)` and its `with*` options) and wrap it\nwith `fromGithub`, `fromGitlab` or `fromForgejo`.\n\nErrors are one `CodehostError` (kind `\"codehost\"`, with the HTTP `status`\nand the `backend`); `\"limit\"`, `\"timeout\"`, `\"closed\"`, `\"cancelled\"` and\n`\"net\"` (a network failure, `net.NetError`) pass through.\n\n## Requirements\n\nJennifer 0.27.0 or newer, with the `net` capability (it talks HTTPS to the\nforges); not usable on `jennifer-tiny`. Depends on `@deckyard/github`\n(`\u003e=0.3.0`), `@deckyard/gitlab` (`\u003e=0.4.0`) and `@deckyard/forgejo`\n(`\u003e=0.4.0`); run\n`tools/vendor-deps.sh` once before the gate.\n\n## Development\n\n```sh\ntools/check-all.sh                   # the full gate, as CI runs it\njennifer test src/codehost_test.j      # the test overlay\ntools/check-docs.sh                  # docs against the code\ntools/pack.sh dist                   # build the release archive\n```\n\n## Trademarks\n\nGitHub™ is a trademark of GitHub, Inc. GitLab™ is a trademark of GitLab Inc.\nCodeberg™ is a trademark of Codeberg e.V. Other product and company names,\nsuch as Forgejo™ and Gitea™, may be trademarks of their respective owners.\nThey are used only to identify the products this deck works with. This deck\nis an independent project, not affiliated with, sponsored or endorsed by\nGitHub, Inc., GitLab Inc., Codeberg e.V., the Forgejo project or CommitGo,\nInc.\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\n`tools/check-headers.sh` checks every source file's SPDX header against\n`deck.toml`.\n"}