fix: expose pagination flags for webhooks list command (#852)

The command uses flags.GetListOptions() internally but didn't expose --page and --limit flags to users, making pagination inaccessible.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/852
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Alain Thiffault <athiffau@effectivemomentum.com>
Co-committed-by: Alain Thiffault <athiffau@effectivemomentum.com>
This commit is contained in:
Alain Thiffault
2025-12-05 06:14:34 +00:00
committed by Lunny Xiao
parent f59430a42a
commit e961a8f01d
2 changed files with 12 additions and 1 deletions

View File

@@ -22,7 +22,10 @@ var CmdWebhooksList = cli.Command{
Usage: "List webhooks",
Description: "List webhooks in repository, organization, or globally",
Action: RunWebhooksList,
Flags: flags.AllDefaultFlags,
Flags: append([]cli.Flag{
&flags.PaginationPageFlag,
&flags.PaginationLimitFlag,
}, flags.AllDefaultFlags...),
}
// RunWebhooksList list webhooks

View File

@@ -1379,6 +1379,8 @@ Manage webhooks
**--global**: operate on global webhooks
**--limit, --lm**="": specify limit of items per page (default: 30)
**--login**="": gitea login instance to use
**--login, -l**="": Use a different Gitea Login. Optional
@@ -1389,6 +1391,8 @@ Manage webhooks
**--output, -o**="": output format [table, csv, simple, tsv, yaml, json]
**--page, -p**="": specify page (default: 1)
**--remote, -R**="": Discover Gitea login from remote. Optional
**--repo**="": repository to operate on
@@ -1399,10 +1403,14 @@ Manage webhooks
List webhooks
**--limit, --lm**="": specify limit of items per page (default: 30)
**--login, -l**="": Use a different Gitea Login. Optional
**--output, -o**="": Output format. (simple, table, csv, tsv, yaml, json)
**--page, -p**="": specify page (default: 1)
**--remote, -R**="": Discover Gitea login from remote. Optional
**--repo, -r**="": Override local repository path or gitea repository slug to interact with. Optional