Back to Codeberg

'user repos' does not return all results #232

forgejo-contrib-forgejo-cli-issues-232.md

latest13.0 KB
Original Source

forgejo-contrib/forgejo-cli

Watch20

Star402

Fork

You've already forked forgejo-cli

51

CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity

'user repos' does not return all results #232

New issue

Closed

opened 2025-10-29 20:00:32 +01:00 by benmagill · 10 comments

benmagill commented 2025-10-29 20:00:32 +01:00

Contributor

Copy link

When using fj --host codeberg.org user repos, the command only returns the first 50 repositories of the user. From what I could see there is also no way to retrieve all pages, or a specific page.

When using fj --host codeberg.org user repos, the command only returns the first 50 repositories of the user. From what I could see there is also no way to retrieve all pages, or a specific page.

Cyborus added the Kind/Enhancement label 2025-10-29 23:47:44 +01:00

Cyborus commented 2025-10-29 23:48:46 +01:00

Member

Copy link

Yes, I was planning on adding this soon! I hadn't made an issue for it though, so thanks for that. :)

Yes, I was planning on adding this soon! I hadn't made an issue for it though, so thanks for that. :)

benmagill commented 2025-10-30 11:35:48 +01:00

Author

Contributor

Copy link

Awesome! I started working on a patch for it yesterday, if you would be willing to accept contributions?

Awesome! I started working on a patch for it yesterday, if you would be willing to accept contributions?

Cyborus commented 2025-10-30 14:35:12 +01:00

Member

Copy link

I would! Feel free to

I would! Feel free to

benmagill commented 2025-10-30 22:50:57 +01:00

Author

Contributor

Copy link

I've implemented it specifically for the 'user repos' query in this commit, but I just realised all the other api calls in list_repos support pagination as well so I'm going to attempt making it work across all of them without repeating the same logic over and over

I've implemented it specifically for the 'user repos' query in this commit, but I just realised all the other api calls in list_repos support pagination as well so I'm going to attempt making it work across all of them without repeating the same logic over and over

Cyborus commented 2025-10-30 23:07:23 +01:00

Member

Copy link

Oh, you're iterating every page! I should let you know that the upcoming version of the API bindings will have a built-in feature to do that, so you aren't duplicating efforts. Since you mentioned it not having any page args, I thought you meant you were adding that.

Oh, you're iterating every page! I should let you know that the upcoming version of the API bindings will have a built-in feature to do that, so you aren't duplicating efforts. Since you mentioned it not having any page args, I thought you meant you were adding that.

benmagill commented 2025-10-31 22:35:07 +01:00

Author

Contributor

Copy link

Ah nice! I guess I'll use my patched version for now, but not raise a PR since it will already be fixed in the future?

Do you think exposing --page and --limit would be useful alongside automatically retrieving all pages or not? If so I would be happy to raise a PR, up to you :)

Ah nice! I guess I'll use my patched version for now, but not raise a PR since it will already be fixed in the future? Do you think exposing --page and --limit would be useful alongside automatically retrieving all pages or not? If so I would be happy to raise a PR, up to you :)

Cyborus commented 2025-10-31 22:51:43 +01:00

Member

Copy link

I do think it would be useful! I think it should even be the default behavior (with an --all flag coming later). Other paginated commands don't take a limit argument, just page, and hardcode the limit value to 20 (like the web interface)

I do think it would be useful! I think it should even be the default behavior (with an --all flag coming later). Other paginated commands don't take a limit argument, just page, and hardcode the limit value to 20 (like the web interface)

benmagill commented 2025-11-02 15:07:23 +01:00

Author

Contributor

Copy link

are you saying to only add a page argument and not limit as well?

are you saying to only add a page argument and not limit as well?

Cyborus commented 2025-11-02 15:09:45 +01:00

Member

Copy link

yes

yes

Cyborus commented 2025-11-02 15:12:22 +01:00

Member

Copy link

I'm not necessarily against the idea of exposing limit to the CLI, I'd just prefer this to be consistent with existing commands right now, and consider the --limit flag in its own issue

I'm not necessarily against the idea of exposing limit to the CLI, I'd just prefer this to be consistent with existing commands right now, and consider the --limit flag in its own issue

benmagill referenced this issue from a pull request that will close it, 2025-11-04 10:28:38 +01:00 feat: add page arg #235

Cyborus closed this issue 2025-11-05 18:18:36 +01:00

Cyborus added this to the v0.4.0 milestone 2025-12-01 17:02:07 +01:00

Sign in to join this conversation.

No Branch/Tag specified

BranchesTags

main

renovate/lock-file-maintenance

renovate/serde-saphyr-0.x

docs/contributing

no-port-in-refspec

login/v16.next.forgejo.org

crates-io-publish

0.5.x

compile-time-fluent

0.4.x

localization-alias-demo

api_url_field

v0.5.0

v0.4.1

v0.4.0

v0.3.0

v0.2.0

v0.1.1

v0.1.0

v0.0.4

v0.0.3

v0.0.2

v0.0.1

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/issues?labels=173012) [ Priority

High ](/forgejo-contrib/forgejo-cli/issues?labels=173013) [ Priority

Low ](/forgejo-contrib/forgejo-cli/issues?labels=173015) [ Priority

Medium ](/forgejo-contrib/forgejo-cli/issues?labels=173014) [ Reviewed

Confirmed ](/forgejo-contrib/forgejo-cli/issues?labels=173007) [ Reviewed

Duplicate ](/forgejo-contrib/forgejo-cli/issues?labels=173005) [ Reviewed

Invalid ](/forgejo-contrib/forgejo-cli/issues?labels=173006) [ Reviewed

Won't Fix ](/forgejo-contrib/forgejo-cli/issues?labels=173008) [ Status

Abandoned ](/forgejo-contrib/forgejo-cli/issues?labels=173011) [ Status

Blocked ](/forgejo-contrib/forgejo-cli/issues?labels=173010) [ Status

Need More Info ](/forgejo-contrib/forgejo-cli/issues?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

2 participants

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#232

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 "%!s()"

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