Forgejo
@shrug/forgejov2026.07.17.1
01README
Query Forgejo and Gitea instances
from swamp over their shared /api/v1 REST surface, authenticated with a
personal access token — a read-only swamp node for a self-hosted git forge.
Every method persists a typed, CEL-referenceable snapshot. Per-repo snapshots
are keyed owner__repo (single issues/PRs add __<index>):
data.latest("forgejo", "shrug__infra").attributes.issues
data.latest("forgejo", "neil__aoc2024__12").attributesMethods
- list_repos — repositories accessible to the authenticated user.
- get_repo — details for one repository.
- list_issues — issues for a repo (pins
type=issues, so pull requests are excluded), filterable byopen/closed/all. - get_issue — a single issue by number.
- list_pulls — pull requests for a repo, filterable by state.
- get_pull — a single PR by number (populates
additions/deletions/changed_files, which the list endpoint omits). - list_releases — releases for a repo.
Security
tokenis a sensitive global argument — wire it from a vault at model-create time, never inline it.- The token is sent as an
Authorization: token …header and is never logged.
Quickstart
swamp vault put forgejo token # hidden prompt
swamp model create @shrug/forgejo forgejo \
--global-arg host=https://git.shrug.pw \
--global-arg token='${{ vault.get(forgejo, token) }}'
swamp model method run forgejo list_repos
swamp model method run forgejo list_issues --arg owner=shrug --arg repo=infraKnown limitations
- List methods expose
page/limitbut do not auto-paginate. - No rate-limit backoff: a
429throws immediately. - Read-only: no create/edit/merge/delete paths yet.
02Models
@shrug/forgejov2026.07.17.1forgejo.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| host | string | Forgejo or Gitea instance URL (e.g. https://codeberg.org). No trailing slash. |
| token | string | Personal access token for the Forgejo/Gitea instance. |
| metadata | record |
fn list_repos()
List repositories owned by or accessible to the authenticated user.
fn get_repo(owner: string, repo: string)
Get details for a specific repository.
| Argument | Type | Description |
|---|---|---|
| owner | string | Repository owner (user or org login). |
| repo | string | Repository name. |
fn list_issues(state: enum)
List issues for a repository.
| Argument | Type | Description |
|---|---|---|
| state | enum | Filter by issue state. |
fn get_issue(index: number)
Get a specific issue by number.
| Argument | Type | Description |
|---|---|---|
| index | number | Issue number. |
fn list_pulls(state: enum)
List pull requests for a repository.
| Argument | Type | Description |
|---|---|---|
| state | enum | Filter by pull request state. |
fn get_pull(index: number)
Get a specific pull request by number.
| Argument | Type | Description |
|---|---|---|
| index | number | Pull request number. |
fn list_releases()
List releases for a repository.
Resources
repos(1h)— Repositories accessible to the authenticated user
repo(1h)— Details for a single repository
issues(30m)— Issues for a repository
issue(30m)— A single issue
pulls(30m)— Pull requests for a repository
pull(30m)— A single pull request
releases(1h)— Releases for a repository
03Previous Versions
2026.04.13.1
04Stats
A
100 / 100
Downloads
8
Archive size
8.8 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/shrugpw/swamp-forgejo05Platforms
06Labels