* New `output::pager` module spawns `$FJ_PAGER` / `$PAGER` / `less -FRX`
when stdout is a TTY and dup2's our stdout onto its stdin. The
`PagerGuard` restores the original stdout and waits on the child on
drop so all output flushes before exit.
* Wired into the top-level dispatch: list/view/diff/api/search/status
output is now paged automatically. Short output passes through via
`less -F`. Global `--no-pager` flag and `FJ_NO_PAGER` env opt out.
* libc 0.2 added as a small dep (needed for dup/dup2/close).
* Pre-push hook now drains and closes stdin at the top, then runs every
step with `</dev/null`. Previously a test or build could in principle
inherit git push's stdin (the list of refs being pushed) and block
if it ever tried to read it. Adds CARGO_TERM_PROGRESS_WHEN=never so
the progress bar doesn't muddle non-TTY runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* `fj repo branches`, `repo topics`, `repo edit`, `repo fork`, `repo sync`,
`repo archive`, `repo unarchive`, `repo mirror-sync` previously took only
a positional `repo` argument and rejected `-R/--repo`. Now they accept
both, with `-R` winning when both are given.
* Forgejo returns `null` for `labels`/`assignees` on issues and PRs when
empty. The Issue/Pull structs hit `expected a sequence` on every issue
create. Added a `deserialize_null_to_default` helper on the affected
fields so null is now coerced to an empty Vec.
* `get_page` similarly bailed when a list endpoint returned a bare `null`
body. Now treats null and empty body as `[]`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* `fj repo mirror <url>` does a full migrate (pull-mirror with `--mirror`,
one-shot import otherwise). `fj repo mirror-sync` triggers a refresh on
an existing pull-mirror.
* List endpoints transparently follow `Link: rel=next` when the caller
asks for more than the 50-per-page API cap. So `fj pr list -L 200`
or `fj issue list -L 100` now Just Works without manual paging.
* HTTP client retries idempotent requests (GET/HEAD/OPTIONS/PUT/DELETE)
up to 3 times with exponential backoff (200/400/800 ms) on transport
errors and 5xx responses. POST and PATCH are never retried.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* `fj auth token` prints the stored token for scripting.
* `fj auth refresh` re-verifies (or replaces) the stored token.
* `fj auth setup-git` installs a git credential helper that delegates
password lookup to `fj auth token`.
* New top-level `fj protect` group: list / view / set / delete branch
protection rules.
* New top-level `fj hook` group: webhook CRUD + test delivery.
* Global `--debug` (`FJ_DEBUG`) flag dumps every HTTP request fj makes
to stderr (method, URL, query, body preview, status).
* `fj man -o ./man` generates `clap_mangen` pages for fj and every
subcommand. Useful for downstream packaging.
* Fixed: several subcommand groups (hook, label, search, key, workflow
secrets/variables) were showing the flattened RepoFlag's doc string
in their --help summary line. Added explicit doc comments per variant.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* New top-level groups, each with full CRUD where the API supports it:
- release: list/view/create/edit/delete/upload/download
- label: list/create/edit/delete
- run: workflow runs (list/view/rerun/cancel)
- secret + variable: Actions secrets/vars (list/set/delete)
- search: cross-cutting (repos/issues/prs/users)
- browse: open repo/path on the web
- status: notifications inbox + mark-all-read
- org: list/view/teams
- ssh-key, gpg-key: list/add/delete on your account
- alias: user-defined shortcuts (e.g. `fj alias set co "pr checkout"`)
- config: local prefs (editor, pager, browser, etc.)
- extension: discover and run `fj-<name>` plugin binaries on PATH
- gist: thin wrapper over `gist-*` repos
* main.rs now expands aliases before clap and dispatches to plugins for
unknown subcommands (matching gh).
* New API modules: release, label, notification, search, org, workflow,
with the corresponding strongly-typed wrappers.
* Release asset upload uses reqwest multipart (feature flag added).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Multi-host auth (tokens in OS keychain), repo/issue/pr CRUD, and a
gh-style `api` escape hatch with -f/-F/-X/-q. Targets Forgejo 7.x via
the Gitea-compatible /api/v1 surface.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>