docs: separate the API-only flags from the ones needing a checkout
Two flags in the reference said one thing and did another. `-o` was listed as a global output-format flag and the Tips section recommended `-o json` without qualification. On `tea api` it is a file name: `-o json` writes the body to a file called json and leaves stdout empty, so the next parse fails with a JSONDecodeError that looks like a server refusal. Scoped to entity commands, and api's meaning named in all three places that mention it. `--repo owner/repo` was documented as a general substitute for standing in a checkout. For `pulls create`, `pulls checkout` and `pulls clean` it is not: the slug is rejected with 'local repository required', advice that reads like the flag was missing. Verified from outside any repo — those three refuse a slug and accept a path, while pulls list, milestones, releases and times take the slug from anywhere. All three working forms are written down, including the git-worktree one (point --repo at the main checkout) and the api fallback. Closes #35 Closes #28 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,9 +19,16 @@ Without args lists PRs; with `<index>` shows PR detail. Fields: `index,state,aut
|
||||
|
||||
Subcommands:
|
||||
- `list, ls` (`--state`)
|
||||
- `checkout, co <idx>` — check out PR locally. `--branch/-b` creates a local branch if missing.
|
||||
- `clean <idx>` — delete local and remote feature branches for a closed PR. `--ignore-sha` matches branch by name instead of commit hash.
|
||||
- `checkout, co <idx>` — check out PR locally. `--branch/-b` creates a local branch if missing. Needs a checkout, same as `create`: `--repo` is a path here, not a slug.
|
||||
- `clean <idx>` — delete local and remote feature branches for a closed PR. `--ignore-sha` matches branch by name instead of commit hash. Needs a checkout, same as `create`.
|
||||
- `create, c` — create a PR. `--head <user:branch>`, `--base/-b`, `--allow-maintainer-edits/--edits`, `--agit`, `--topic`, plus all issue-style fields (`--title`, `--description`, `--assignees`, `--labels`, `--milestone`, `--deadline`, `--referenced-version`).
|
||||
**Needs a local checkout.** `--repo owner/repo` is *not* accepted here — the
|
||||
slug fails with `local repository required: execute from a repo dir, or
|
||||
specify a path with --repo`, whose advice reads like the flag was missing.
|
||||
Run it with cwd inside the checkout and no `--repo`, or pass `--repo
|
||||
/path/to/checkout`. From a git worktree, point `--repo` at the main
|
||||
checkout. With no checkout in reach, `POST repos/{owner}/{repo}/pulls`
|
||||
through `tea api`, which takes the slug.
|
||||
- `close <idx>...`, `reopen, open <idx>...`
|
||||
- `edit, e <idx>...` — like `issues edit` plus `--add-reviewers/-r`, `--remove-reviewers`.
|
||||
- `review <idx>` — interactive review.
|
||||
|
||||
Reference in New Issue
Block a user