A small client for the home Forgejo's API: what the PR tools read and do to a pull request there (agent-tools' forgejo package, AGT-85)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nelson 46eab15bc8
All checks were successful
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / deliver (push) Has been skipped
Suite release / deliver-prune (push) Has been skipped
Suite release / reserve (push) Has been skipped
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite release / check-package (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / scope (push) Successful in 22s
Suite release / check-manifest (push) Has been skipped
Suite release / finalize (push) Has been skipped
Suite release / module (push) Successful in 33s
An owner's repos come with their topics, and a repo's topics can be read (PIPT-78) (#2)
2026-11-30 16:23:39 -08:00
ci.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
deliver.go An owner's repos come with their topics, and a repo's topics can be read (PIPT-78) (#2) 2026-11-30 16:23:39 -08:00
forgejo.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
go.mod forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
go.sum forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
log_test.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
merge_test.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
queue.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
README.md forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00
workflows_test.go forgejo-api: the forgejo client moves in from agent-tools, on the netclient library (#1) 2026-11-29 23:24:18 -08:00

forgejo-api

A small client for the home Forgejo's API (forgejo.romaine.life): what the PR tools read and do to a pull request there, its CI runs and job logs, merges bound to the head that was checked, and the merge queue. It signs in with the token git's credential helper holds for the host, the same credential git uses over HTTPS, so there is one sign-in to keep. Its calls go through netclient.

The package is still named forgejo; the repository is forgejo-api because forgejo is the Forgejo fork's (nelsong6/forgejo).

It was agent-tools' forgejo package until shared packages got repositories of their own (AGT-85, AHT-258).

Using it

require forgejo.romaine.life/romaine-life/forgejo-api v0.1.0
import forgejo "forgejo.romaine.life/romaine-life/forgejo-api"

client, err := forgejo.New()

Testing

go test ./..., against httptest servers; no Forgejo is reached.

Shipping

A library: the release-module topic in pipeline-templates' fleet.json tags each merge that changes the code, and every fleet repository whose go.mod requires it gets a take-up. Forgejo pushes it to its public GitHub copy, which proxy.golang.org serves to builds outside CI.