mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
docs: describe the gh-style output, aliases and flags in the 1.0 guide
Update the migration guide for the output on terminals and in pipes, markdown and hyperlink preferences, verb aliases and gh short flags, -q and -y, exit codes, the inbox default of notifications, config get, auth status and token, pr checkout branch names, pr review types, comment commands, name addressing, and setup-git replacing old helpers. Fix the merge example, which now needs --yes, and the contributor guide's output and layering notes. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
3 files changed
+135
-78
No files matched your search
+8
-4
@@ -105,13 +105,17 @@ Use explicit singular noun/verb commands, such as `tea issue list` and
|
||||
missing fields when the shared prompting policy permits it, invoke services, and
|
||||
render results through injected streams. Destructive commands require confirmation
|
||||
or `--yes`; `--no-input` disables implicit interaction. JSON results go to stdout;
|
||||
diagnostics and prompts go to stderr. Lists register `--limit`/`--page` with
|
||||
`pageFlags` and print through `writeList`, which renders one `terminal.Table`
|
||||
(ID or number first, then title or name, then state) through the pager.
|
||||
diagnostics, prompts and the `✓`/`!` mutation messages (`done`/`warn`) go to stderr.
|
||||
Lists register `-L/--limit` and `--page` with `pageFlags` and print through
|
||||
`writeTable` with a `listSpec`: on a terminal an uppercase header row, a "Showing N of
|
||||
M …" line, relative times and links in the first column; piped, tab-separated values
|
||||
without header. Single items print through `writeView`. Every command has an
|
||||
`Example`, and every command group a `Long` text.
|
||||
|
||||
### Internal Package Structure
|
||||
|
||||
- `internal/app`: Cobra commands and application dependency construction.
|
||||
- `internal/app`: Cobra commands and application dependency construction. It never
|
||||
calls the API directly: every request goes through `internal/services`.
|
||||
- `internal/services`: typed workflows over `gitea.dev/sdk`, independent of CLI flags
|
||||
and terminal I/O, including pagination policy. Services map SDK types to tea's
|
||||
output types; requests the SDK cannot make yet go through the raw helpers in
|
||||
|
||||
Reference in new issue
Block a user