Commit Graph
7 Commits
Author SHA1 Message Date
bircni 517d164d8a fix(git): prefer the upstream remote over a tracked origin when finding the repository (follow gh)
Signed-off-by: bircni <bircni@icloud.com>
2026-10-18 18:59:04 +02:00
bircni 6e523d969d fix: address verified review findings (repo-mutations-sync-1)
Signed-off-by: bircni <bircni@icloud.com>
2026-10-18 17:38:53 +02:00
bircni bae885a4d2 fix(context): find the Gitea remote among all remotes of a clone
Signed-off-by: bircni <bircni@icloud.com>
2026-10-18 17:16:57 +02:00
bircni fa9cb4f852 docs(help): trim examples and verbose doc comments in core commands
Signed-off-by: bircni <bircni@icloud.com>
2026-10-12 20:48:00 +02:00
bircni 2330d174ea fix(repo): reject --repo on commands that act on no repository
tea repo list -R acme/service listed the account's repositories and
tea repo create foo -R alice/project created alice/foo: the flag was
silently ignored. repo list, repo create, repo migrate and search repo
now fail with a usage error that suggests the intended command, such as
"--repo is not used by repo list; did you mean: tea repo list acme".

repo list takes the owner as an argument (--owner still works), and
repo create accepts OWNER/NAME, creating in the organization OWNER.

Signed-off-by: bircni <bircni@icloud.com>
2026-10-11 23:51:43 +02:00
bircni 60de407eca fix(api): filter raw responses with --jq and end output with a newline
tea api /version --jq .version failed with "--jq requires --json", and
--json is rejected for raw responses. api is annotated tea.rawjson now:
--jq filters each successful JSON response, page by page with
--paginate, and prints strings without quotes. A non-JSON response is
an error with --jq; an error response prints its body unfiltered.

JSON responses end with a newline, so an error no longer starts on the
line of the body; on a terminal JSON is indented and colored in the key
order of the response, and other text is sanitized as before. Piped
non-JSON bodies stay byte-exact.

api gains -i for --include and --silent, a Long help modeled on gh api
(placeholders, -f/-F typing, pagination, --jq) and examples, and its
help lists --jq.

Signed-off-by: bircni <bircni@icloud.com>
2026-10-11 23:49:54 +02:00
bircni 48c1e5b781 feat(help): group root help, show relevant flags and add help topics
The root help lists commands in gh-style groups (core, Actions,
additional and alias commands) followed by help topics, examples and
pointers. Every help page uses USAGE, ALIASES, FLAGS, INHERITED FLAGS,
ARGUMENTS, JSON FIELDS, EXAMPLES and LEARN MORE sections. Inherited
flags show --repo, --remote and --cwd only where a repository is
selected, --json and --jq where JSON is printed, --yes where the
command confirms, and one line for the remaining global flags.

tea help environment, exit-codes and formatting document global flags,
environment variables, exit codes and JSON output. tea help with an
unknown topic is a usage error with suggestions instead of printing the
root help. A test keeps Shorts, examples and Long texts complete, with
allowlists for the commands that still lack them.

Signed-off-by: bircni <bircni@icloud.com>
2026-10-11 22:55:27 +02:00