Summary
Fixes four open UX/bug issues:
- #43 : Add
--version/-Vflag via#[command(version)]on the App struct.fj --versionnow prints the version from Cargo.toml. - #42 : Rename
repo labels viewtorepo labels list(withviewalias for backwards compat), convert the positional repo argument to a--repoflag matching other commands. - #41 : Add
--repo/-rflag toissue view,issue edit,issue close,issue reopen,issue comment,issue browse, and the corresponding PR commands (pr view,pr edit,pr close,pr reopen,pr comment,pr merge,pr status,pr browse). Explicit--repotakes precedence overowner/repo#idsyntax. - #37 : Add client-side title/body filtering for
issue searchandpr search. The Forgejo APIqparameter is unreliable on some instances (especially large repos), so results are now filtered locally to ensure only matching issues/PRs are shown.
Breaking changes
fj repo labels <owner/repo> <cmd>positional syntax is nowfj repo labels --repo <owner/repo> <cmd>. The oldviewsubcommand still works as an alias forlist.
Test plan
- All 238 tests pass (
cargo test --all-targets) - New wiremock tests for client-side filtering (issue and PR paths)
- Updated dry_run, api_crud, api_repo tests for labels
--repochange - Help snapshot updated for
--versionflag fj --versionprintsforgejo-cli-plus 1.0.0fj repo labels listandfj repo labels viewboth work
## Summary
Fixes four open UX/bug issues:
- **#43**: Add `--version` / `-V` flag via `#[command(version)]` on the App struct. `fj --version` now prints the version from Cargo.toml.
- **#42**: Rename `repo labels view` to `repo labels list` (with `view` alias for backwards compat), convert the positional repo argument to a `--repo` flag matching other commands.
- **#41**: Add `--repo` / `-r` flag to `issue view`, `issue edit`, `issue close`, `issue reopen`, `issue comment`, `issue browse`, and the corresponding PR commands (`pr view`, `pr edit`, `pr close`, `pr reopen`, `pr comment`, `pr merge`, `pr status`, `pr browse`). Explicit `--repo` takes precedence over `owner/repo#id` syntax.
- **#37**: Add client-side title/body filtering for `issue search` and `pr search`. The Forgejo API `q` parameter is unreliable on some instances (especially large repos), so results are now filtered locally to ensure only matching issues/PRs are shown.
## Breaking changes
- `fj repo labels <owner/repo> <cmd>` positional syntax is now `fj repo labels --repo <owner/repo> <cmd>`. The old `view` subcommand still works as an alias for `list`.
## Test plan
- [x] All 238 tests pass (`cargo test --all-targets`)
- [x] New wiremock tests for client-side filtering (issue and PR paths)
- [x] Updated dry_run, api_crud, api_repo tests for labels `--repo` change
- [x] Help snapshot updated for `--version` flag
- [x] `fj --version` prints `forgejo-cli-plus 1.0.0`
- [x] `fj repo labels list` and `fj repo labels view` both work
Closes #37
Closes #41
Closes #42
Closes #43