| Filename | Latest commit message | Latest commit date |
|---|---|---|
The forge always answers 201 Created for a successful dependency removal, but the generated forgejo-api client only treats 200 as success for that endpoint, so every successful removal surfaced as ForgejoError::UnexpectedStatusCode(201). apply_and_verify caught this, read the dependency list back, saw the edge was gone, and printed a "converged despite a reported error" warning — appropriate for a genuinely unpredictable anomaly, but this mismatch is deterministic and not a real problem. Treat that specific status as success outright on the remove path instead of routing it through the read-back/warning path. The add path's different, genuinely intermittent 500-despite-success quirk is untouched, and a real remove failure still goes through the read-back and still surfaces if it does not converge. Closes #4531 |
||
| .. | ||
| 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.