hyperhive/hive-forge
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 80650041d9 fix(#2752): pr-status must not abort on a repo with no CI
On a repo with no CI configured forgejo returns the combined-status
`statuses` field as an explicit `null` rather than `[]`.
`#[serde(default)]` only covers a *missing* key — a present null still
fails to deserialize, so `pr-status` died with
`invalid type: null, expected a sequence` instead of reporting the PR.

Deserialize the field through an `Option<Vec<_>>` so both null and
absent map to an empty vec.

Closes #2752.
2026-07-27 10:11:01 +02:00
..
src fix(#2752): pr-status must not abort on a repo with no CI 2026-07-27 10:11:01 +02:00
Cargo.toml docs: declare readme = "README.md" for the last four crates 2026-07-27 09:35:06 +02:00
README.md docs: trim readmes down, stop restating impl detail the module docs already own 2026-07-26 21:01:00 +02:00

hive-forge

Typed CLI wrapper around the in-cluster Forgejo's REST API — issues, PRs, comments, labels, reviews, CI status, attachments, triage. Replaces the old bash-script wrapper so agents and operators get consistent error handling, exit codes, and JSON shapes. This is the only supported path to the forge from inside an agent container; never curl it directly.

Reads credentials from the environment (HIVE_FORGE_URL, HIVE_FORGE_REPO, HYPERHIVE_STATE_DIR); -f/--forge <label> retargets a dashboard-provisioned external forge account instead.

When to use it

Reach for this crate when adding or changing a forge verb — it's the single place issue/PR/comment/CI logic lives for every agent and hivectl. Adding a tool an agent's claude session calls is hive-agent-mcp wrapping a shellout to this binary, not new logic here.

Shape

  • verbs/ — one module per subcommand (clap Args + run).
  • client.rs — the Forgejo client wrapper + token loading.
  • notify.rs — the read-before-comment guard, backed by forge's own notification read-state (no local mirror to drift).
  • body.rs — shared --body/--body-file/stdin resolution.

Full verb reference: docs/tools/forge.md.