fj/src/api
Stephen Way faaf522b05
Some checks are pending
ci / check (push) Waiting to run
bugs + agent-focused Forgejo gaps + CI + docs
Bugs:
* Shell injection in `fj auth setup-git`: the hostname is now validated
  against a strict DNS pattern and `git config` is invoked directly
  (no `sh -c`). Added 4 unit tests covering shell metacharacters.
* Pager won't compile on Windows: the libc-based dup2 redirect lives
  behind `#[cfg(unix)]`. Non-Unix gets a no-op stub.

Agent-focused Forgejo API gaps:
* `fj issue edit-comment ID` / `delete-comment ID`. Fix a wrong comment
  after the fact (an agent's bread-and-butter).
* `fj search code "..." [-R owner/name]`. The most-requested missing
  search dimension for codebase exploration.
* `fj pr request-review N user1 user2`, `unrequest-review N user`.
  Distinct from `pr review` (your own approval/changes/comment).
* `fj repo watch / unwatch / star / unstar / starred`. Mark repos for
  monitoring.
* `fj milestone {list,view,create,edit,close,reopen,delete,assign}`
  with `assign N --milestone ID|none` to attach an issue/PR.

UX + stability:
* Global `--json-fields foo,bar` projection on top of any `--json`
  output, gh-style. Dotted-path support (`--json-fields owner.login`).
* 429 / Retry-After honored in the retry loop with a 30 s cap.
* Clap `suggestions` feature for typo'd subcommands.
* `fj auth token` and `auth status --show-token` refuse to write to a
  TTY by default (`--force` to override).

CI:
* `.forgejo/workflows/ci.yml` runs fmt/clippy/test/release-build on
  every push and PR, mirroring the local pre-push hook.

Docs:
* `SECURITY.md` with threat model and known sharp edges.
* `docs/gh-to-fj.md` full command-by-command mapping.
* `docs/faq.md` covering tokens, hosts, debug, scripting, plugins.

Tests: 60 → 75 passing (2 ignored: editor and env-mutating tests that
fight the cargo test harness on macOS).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:52:28 -07:00
..
hook.rs expand: auth token/refresh/setup-git, protect, hook, --debug, man pages 2026-05-13 08:34:01 -07:00
issue.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
label.rs batch: release, label, workflow, search, browse, status, org, keys, alias, config, extension, gist 2026-05-13 08:29:31 -07:00
milestone.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
mod.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
notification.rs batch: release, label, workflow, search, browse, status, org, keys, alias, config, extension, gist 2026-05-13 08:29:31 -07:00
org.rs batch: release, label, workflow, search, browse, status, org, keys, alias, config, extension, gist 2026-05-13 08:29:31 -07:00
protect.rs expand: auth token/refresh/setup-git, protect, hook, --debug, man pages 2026-05-13 08:34:01 -07:00
pull.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
release.rs batch: release, label, workflow, search, browse, status, org, keys, alias, config, extension, gist 2026-05-13 08:29:31 -07:00
repo.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
search.rs bugs + agent-focused Forgejo gaps + CI + docs 2026-05-13 14:52:28 -07:00
serde_util.rs fix: -R works on repo positional commands, null-array deserialization, list endpoint normalization 2026-05-13 08:41:57 -07:00
user.rs expand: repo auto-detect, --web, editor, PR diff/checks/ready/review/status, repo lifecycle, api headers/paginate 2026-05-13 08:22:40 -07:00
workflow.rs batch: release, label, workflow, search, browse, status, org, keys, alias, config, extension, gist 2026-05-13 08:29:31 -07:00