stalecontext/forgejo-cli-plus
2
4
Fork
You've already forked forgejo-cli-plus
1

Fix --version flag, --repo on view/edit commands, labels UX, search filtering #47

Merged
stalecontext merged 3 commits from fix/issues-37-41-42-43 into main 2026年03月31日 13:43:34 +02:00

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

  • 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 --repo change
  • Help snapshot updated for --version flag
  • fj --version prints forgejo-cli-plus 1.0.0
  • fj repo labels list and fj repo labels view both work

Closes #37
Closes #41
Closes #42
Closes #43

## 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
- Add #[command(version)] to App struct for --version/-V flag (#43)
- Rename LabelsSubcommand::View to List (alias "view"), convert labels
 repo arg to --repo flag for consistency (#42)
- Add --repo flag to issue/pr view, edit, close, reopen, comment,
 browse, merge, and status commands. Explicit --repo takes precedence
 over owner/repo#id syntax (#41)
- Add client-side title/body filtering for issue/pr search to work
 around unreliable server-side q parameter on large repos (#37)
Closes #37, closes #41, closes #42, closes #43 
style: standardize --repo flag annotations and add missing doc comment
Some checks failed
Test / test (pull_request) Failing after 3m24s
92cb8128b1
- Use explicit short = 'r' on all new --repo flags for clarity
- Add doc comment to repo labels --repo field
style: apply cargo fmt formatting
All checks were successful
Test / test (pull_request) Successful in 4m19s
69d00a7ca1
stalecontext deleted branch fix/issues-37-41-42-43 2026年03月31日 13:43:36 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
stalecontext/forgejo-cli-plus!47
Reference in a new issue
stalecontext/forgejo-cli-plus
No description provided.
Delete branch "fix/issues-37-41-42-43"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?