forgejo-contrib-forgejo-cli-pulls-235.md
Watch20
Star402
Fork
You've already forked forgejo-cli
CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity
Merged
Cyborusmerged 2 commits from benmagill/forgejo-cli:page_arg into main 2025-11-05 18:18:34 +01:00
Conversation 4Commits 2Files changed 1 +33 -7
benmagill commented 2025-11-04 10:28:38 +01:00
Contributor
Copy link
Resolves #232 by adding a page argument for all repo listing commands, to enable retrieving pages other than the first
Resolves #232 by adding a page argument for all repo listing commands, to enable retrieving pages other than the first
benmagill force-pushed page_arg from 15f4549d9b
All checks were successful
ci/woodpecker/pr/check Pipeline was successful
to ea74fc8aed
All checks were successful
ci/woodpecker/pr/check Pipeline was successful
2025-11-04 10:30:48 +01:00 Compare
benmagill commented 2025-11-04 10:34:28 +01:00
Author
Contributor
Copy link
Would it be worth updating the message printed after the list of repos?
It currently lists how many repos were returned for the page, but it could be worth mentioning how many total repos there are from the x_total_count header as it may be helpful for users
Would it be worth updating the message printed after the list of repos? It currently lists how many repos were returned for the page, but it could be worth mentioning how many total repos there are from the x_total_count header as it may be helpful for users
Cyborus commented 2025-11-04 15:10:40 +01:00
Member
Copy link
I think that would be worth, yes
src/user.rs Lines 261 to 266 in 274b70d
| | println!( |
| | "Showing {bold}{}{dash}{}{reset} of {bold}{}{reset} results ({page}/{pages_total})", |
| | page_start + 1, |
| | (page_start + 20).min(users.len()), |
| | users.len() |
| | ); |
Here's how that's done elsewhere, as a reference point. The limit parameter is being maxed out at 50, so use that for the addition instead of 20
On the terminal it looks like:
Showing 21-40 of 76 total (2/4)
I think that would be worth, yes https://codeberg.org/forgejo-contrib/forgejo-cli/src/commit/274b70da0b668484c26004eebcfffd86e780c659/src/user.rs#L261-L266 Here's how that's done elsewhere, as a reference point. The limit parameter is being maxed out at 50, so use that for the addition instead of 20 On the terminal it looks like: > Showing **21-40** of **76** total (2/4)
benmagill added 1 commit 2025-11-05 10:24:00 +01:00
All checks were successful
ci/woodpecker/pr/check Pipeline was successful
benmagill commented 2025-11-05 10:26:49 +01:00
Author
Contributor
Copy link
That's done now! I followed what you suggested, and testing locally it outputs the following:
Showing 1—50 of 99 results (1/2)
Showing 51—99 of 99 results (2/2)
If there is only 1 repo it will still output the old 1 repo message. Should it output the above irrespective of if there is 1 or many repos?
That's done now! I followed what you suggested, and testing locally it outputs the following: > Showing **1—50** of **99** results (1/2) > Showing **51—99** of **99** results (2/2) If there is only 1 repo it will still output the old 1 repo message. Should it output the above irrespective of if there is 1 or many repos?
Cyborus commented 2025-11-05 18:18:27 +01:00
Member
Copy link
I think it looks good as it is. Thanks! :)
I think it looks good as it is. Thanks! :)
Cyborus merged commit c66a0a8ad7 into main 2025-11-05 18:18:34 +01:00
Cyborus referenced this pull request from a commit 2025-11-05 18:18:35 +01:00 Merge pull request 'feat: add page arg' (#235) from benmagill/forgejo-cli:page_arg into main
Cyborus added this to the v0.4.0 milestone 2025-12-01 17:02:43 +01:00
Sign in to join this conversation.
Reviewers
No reviewers
Labels
Clear labels[ Kind/Breaking Breaking change that won't be backward compatible
](#)[ Kind/Bug Something is not working
](#)[ Kind/Design Discussion about UI/UX design
](#)[ Kind/Documentation Documentation changes
](#)[ Kind/Enhancement Improve existing functionality
](#)[ Kind/Feature New functionality
](#)[ Kind/Security This is security issue
](#)[ Kind/Testing Issue or pull request related to testing
](#)[ Kind/Upstream This is an issue with upstream software (Forgejo) that is probably not our fault
](#)
[ Priority
Critical The priority is critical
](#)[ Priority
High The priority is high
](#)[ Priority
Low The priority is low
](#)[ Priority
Medium The priority is medium
](#)
[ Reviewed
Confirmed Issue has been confirmed
](#)[ Reviewed
Duplicate This issue or pull request already exists
](#)[ Reviewed
Invalid Invalid issue
](#)[ Reviewed
Won't Fix This issue won't be fixed
](#)
[ Status
Abandoned Somebody has started to work on this but abandoned work
](#)[ Status
Blocked Something is blocking this issue or pull request
](#)[ Status
Need More Info Feedback is required to reproduce issue or to continue work
](#)
[ Suspicious
](#)
No labels Kind/Breaking Kind/Bug Kind/Design Kind/Documentation Kind/Enhancement Kind/Feature Kind/Security Kind/Testing Kind/Upstream [ Priority
Critical ](/forgejo-contrib/forgejo-cli/pulls?labels=173012) [ Priority
High ](/forgejo-contrib/forgejo-cli/pulls?labels=173013) [ Priority
Low ](/forgejo-contrib/forgejo-cli/pulls?labels=173015) [ Priority
Medium ](/forgejo-contrib/forgejo-cli/pulls?labels=173014) [ Reviewed
Confirmed ](/forgejo-contrib/forgejo-cli/pulls?labels=173007) [ Reviewed
Duplicate ](/forgejo-contrib/forgejo-cli/pulls?labels=173005) [ Reviewed
Invalid ](/forgejo-contrib/forgejo-cli/pulls?labels=173006) [ Reviewed
Won't Fix ](/forgejo-contrib/forgejo-cli/pulls?labels=173008) [ Status
Abandoned ](/forgejo-contrib/forgejo-cli/pulls?labels=173011) [ Status
Blocked ](/forgejo-contrib/forgejo-cli/pulls?labels=173010) [ Status
Need More Info ](/forgejo-contrib/forgejo-cli/pulls?labels=173009) Suspicious
Milestone
Clear milestone
No items
No milestone v0.4.0
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
Notifications Subscribe
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
forgejo-contrib/forgejo-cli!235
WritePreview
Loading…
Add table
| Rows | | | Columns | |
CancelOK
Add a link
Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.
CancelOK
CancelSave
Reference in a new issue
Repository
forgejo-contrib/forgejo-cli
Title
Body
Create issue
No description provided.
Delete branch "benmagill/forgejo-cli:page_arg"
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?
No Yes