Skip to content

theseus wait

Wait until a changeset's newest run ends and its guide is ready.

Usage: theseus wait <changeset> --for ready [--timeout <seconds>] [--json]
OptionValueWhen omitted
--forreadyRequired
--timeoutsecondsNo deadline
--jsonSwitchfalse

JSON output: JSON line: outcome (ready, failed or pending), changeset (API Changeset). Errors: event="error", code, error; last known state precedes an error after waiting starts.

Exit codes: 0 Success; 1 Failure; 2 Invalid arguments; 8 Wait deadline reached; server run continues; 130 Interrupted by Ctrl-C; 143 Terminated by SIGTERM.

Full command help and examples
Usage: theseus wait <changeset> --for ready [--timeout <seconds>] [--json]

Waits until the changeset's newest run to generate a guide ends. --for ready is the only
condition so far; waiting for reviews arrives with reviews. Without --timeout it waits as long
as the run.

Exits 0 when the run succeeded (the guide is ready; prints the changeset's URL), 1 when it
failed, or 8 when --timeout seconds pass first (the run goes on on the server). Ctrl-C stops
waiting with exit 130 (143 for SIGTERM). --json prints one JSON line,
{"outcome":"ready"|"failed"|"pending","changeset":{...}}, with the API's Changeset object;
an error after the wait starts prints that line, with the last known state, before its own.

Changesets:
  set_...                its ID
  https://...            its Theseus URL, or a GitHub pull request or branch URL
  owner/repo#42          a pull request
  owner/repo@feature     a branch; when you also have a local branch of that name, the
                         command lists both and you name one by its ID

Errors exit 1 (2 for usage) and, with --json, print {"event":"error","code":...,"error":...}.
Codes include not-found when no changeset you can read matches, ambiguous (with candidates
[{id,path,kind,title,url}]) when several do, usage, login-required and unavailable.