| Filename | Latest commit message | Latest commit date |
|---|---|---|
A filter value the forge cannot resolve is DISCARDED, not rejected, so a typo does not narrow the result set -- it returns the unfiltered one. That does not waste a query, it inverts the answer: "is anything open in this milestone" comes back as every open issue and reads as yes, and a duplicate check gets a list that never narrowed. `list` now resolves both before querying. Labels reuse the write side's resolver; the ids are discarded because this endpoint filters by name, so resolution here is a spell-check rather than a lookup -- reusing it keeps the message identical to the one the write side has always produced. Milestones accept a title or an id and are checked against the ALL-state set: filtering on a closed milestone is a normal query, and validating against open-only would reject exactly the retrospective ones. Both fetchers paginate. `repo_labels` asked for one page of 100 and treated it as the population -- the inverse of the trailer bug, same root: a valid label past the cut fails to resolve, and the error then prints an "available labels" list that is itself truncated, so the message argues for the typo. `--assignee` / `--author` stay unvalidated on purpose: someone who has left still legitimately appears on old issues, so a login that is not a current member is not necessarily a typo. Also drops the docs paragraph claiming unknown labels are silently dropped on the write side; that has not been true since the resolver landed. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
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,
HYPERHIVE_STATE_DIR); -f/--forge <label> retargets a
dashboard-provisioned external forge account instead. The active repo
resolves -r/--repo > the origin remote of the cwd's git checkout >
HIVE_FORGE_REPO (last-resort override, unset by default) > a hard
error — see client::Client::from_env.
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 (clapArgs+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.