gitea.cli.actions.run.list
list
List the Actions workflow runs of a repository, an organization, an account or the instance.
The same endpoint exists at four scopes, so which one is asked for follows the
usual convention - --owner with --repository for a repository, --owner alone
for an organization, neither for the authenticated account - and --admin asks
for the instance.
Two options belong to the repository form alone. --workflow-id narrows to one
workflow, which only a repository has, and --exclude-pull-requests is a
parameter only the repository listing takes. Passing either outside a repository
is reported rather than quietly ignored, since a filter that silently does nothing
answers with runs the caller did not ask for.
Functions:
gitea.cli.actions.run.list.list_runs_command
list_runs_command(
ctx: Context,
owner: Annotated[
str | None, Option("--owner", help=OWNER_SCOPE_HELP)
] = None,
repository: Annotated[
str | None,
Option("--repository", help=REPOSITORY_SCOPE_HELP),
] = None,
admin: Annotated[
bool, Option("--admin", help=ADMIN_HELP)
] = False,
workflow_id: Annotated[
str | None,
Option(
"--workflow-id",
help=f"List the runs of this workflow alone, which only a repository has. {WORKFLOW_ID_HELP}",
),
] = None,
event: Annotated[
str | None,
Option(
"--event",
help="Event that triggered the run, e.g. push or workflow_dispatch.",
),
] = None,
branch: Annotated[
str | None,
Option("--branch", help="Branch the run is on."),
] = None,
status: Annotated[
str | None, Option("--status", help=STATUS_HELP)
] = None,
actor: Annotated[
str | None,
Option(
"--actor", help="User who triggered the run."
),
] = None,
head_sha: Annotated[
str | None,
Option(
"--head-sha",
help="Commit the run was triggered for.",
),
] = None,
exclude_pull_requests: Annotated[
bool,
Option(
"--exclude-pull-requests",
help="Leave the pull_requests field of each run empty, which makes a long listing much smaller. Only the repository listing takes it.",
),
] = False,
page: Annotated[
int | None,
Option(
"--page", help="The page number for pagination."
),
] = None,
limit: Annotated[
int | None,
Option(
"--limit", help="The number of runs per page."
),
] = None,
account_name: Annotated[
str | None,
Option(
"--account-name",
help="Name of the account to use for authentication.",
),
] = None,
token: Annotated[
str | None,
Option(
"--token",
help="Token for authentication. If not provided, the token from the specified account will be used.",
),
] = None,
base_url: Annotated[
str | None,
Option(
"--base-url",
help="Base URL of the Gitea platform. If not provided, the base URL from the specified account will be used.",
),
] = None,
) -> None
List the Actions workflow runs of a repository, an organization, an account or the instance.
The listing is the object the endpoint answers with: total_count and
workflow_runs, rather than a bare array as the other listings in this CLI
return. One page is fetched per invocation, so --page and --limit are
how a caller walks a long history.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
Context
|
The Typer context. |
required |
owner
|
Annotated[str | None, Option('--owner', help=OWNER_SCOPE_HELP)]
|
The owner of the repository, or the organization itself. |
None
|
repository
|
Annotated[str | None, Option('--repository', help=REPOSITORY_SCOPE_HELP)]
|
The name of the repository, to narrow the owner to one of its repositories. |
None
|
admin
|
Annotated[bool, Option('--admin', help=ADMIN_HELP)]
|
Whether to list the runs of the whole instance. |
False
|
workflow_id
|
Annotated[str | None, Option('--workflow-id', help=f'List the runs of this workflow alone, which only a repository has. {WORKFLOW_ID_HELP}')]
|
The file name of the workflow to list the runs of. |
None
|
event
|
Annotated[str | None, Option('--event', help='Event that triggered the run, e.g. push or workflow_dispatch.')]
|
The event that triggered the run. |
None
|
branch
|
Annotated[str | None, Option('--branch', help='Branch the run is on.')]
|
The branch the run is on. |
None
|
status
|
Annotated[str | None, Option('--status', help=STATUS_HELP)]
|
The status of the runs to list. |
None
|
actor
|
Annotated[str | None, Option('--actor', help='User who triggered the run.')]
|
The user who triggered the run. |
None
|
head_sha
|
Annotated[str | None, Option('--head-sha', help='Commit the run was triggered for.')]
|
The commit the run was triggered for. |
None
|
exclude_pull_requests
|
Annotated[bool, Option('--exclude-pull-requests', help='Leave the pull_requests field of each run empty, which makes a long listing much smaller. Only the repository listing takes it.')]
|
Whether to empty each run's pull_requests field. |
False
|
page
|
Annotated[int | None, Option('--page', help='The page number for pagination.')]
|
The page number for pagination. |
None
|
limit
|
Annotated[int | None, Option('--limit', help='The number of runs per page.')]
|
The number of runs per page. |
None
|
account_name
|
Annotated[str | None, Option('--account-name', help='Name of the account to use for authentication.')]
|
Name of the account to use for authentication. |
None
|
token
|
Annotated[str | None, Option('--token', help='Token for authentication. If not provided, the token from the specified account will be used.')]
|
Token for authentication. |
None
|
base_url
|
Annotated[str | None, Option('--base-url', help='Base URL of the Gitea platform. If not provided, the base URL from the specified account will be used.')]
|
Base URL of the Gitea platform. |
None
|
Source code in src/gitea/cli/actions/run/list.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |