feat(workflow): address workflows by name and check dispatch inputs

Workflows are found by file name, file name without extension, path or
name, case-insensitively, with the candidates listed when a name is
ambiguous. workflow list shows a NAME, FILE and STATE table, and workflow
view shows the workflow with its last runs, prints its file with --yaml
(at --ref) or opens it with --web.

workflow run reads the workflow_dispatch inputs of the workflow at the
ref and refuses unknown inputs, missing required inputs and values a
choice, boolean or number input does not accept, before dispatching. In
a terminal it asks for missing inputs, or all of them when none is given.
Without --ref it uses the checked-out branch, which must be on the
server, or the default branch when the repository does not come from the
working directory. It reports "Dispatched CI (ci.yml) on main → run 33"
with the command to watch it, prints the run's URL, and --follow follows
the logs of all jobs within --timeout.

workflow enable and disable no longer ask for confirmation, report the
change, warn when there is nothing to do, and return the workflow with
--json.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 23:46:26 +02:00
1 parent 9f69a89537
commit 4edb836416
4 files changed
+737 -143

No files matched your search

-6
View File
@@ -562,11 +562,6 @@ const (
wiki list
wiki revisions
wiki view
workflow disable
workflow enable
workflow list
workflow run
workflow view
`
longsToWrite = `
alias
@@ -590,6 +585,5 @@ const (
time
variable
wiki
workflow
`
)