Add a flag to give an exit code if there are still pages left for repos ls
? #498
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#498
Loading…
Reference in New Issue
Block a user
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?
I have a number of processes that pull in all the repositories of a given organization (website generation, ebook, some metadata processing). I'm using
tea
to download the repositories as part of a CI/CD pipeline without having to remember what is in the repository. In effect, using the organization's repository list as the source of truth.However, because
tea repos ls --limit 200
doesn't really return 200 entries, I would like some ability to determine if there is more data available. At the moment, I'm just fudging the page count with this:It would be nice if there was some way of knowing that there is more pages so I can change it from an arbitrary number of pages to always grabbing only the needed amount.
At the moment, exit codes seem to be a useful manner of doing that but today's code returns
0
for a page retrieval, so to use an exit code might include--more-pages-exit-code 2
or something like that? Or another mechanism that would let me know how many pages I need to retrieve.Thank you.
You don't get 200 results, because you can't query arbitrary page sizes. the maximum is configured server side and can be queried at
/api/v1/settings/api
. Maybe tea should provide a helper for that.I'm not a fan of the exit code as notification channel for this - people may run tea in scripts with
set -e
, halting the script in that case.Maybe something like
more results - listing 10-20 of 50
could be emitted on stderr? This solution would depend on #456