spp status
spp status <epic> [--json] prints every Sub-issue of an Epic with its state, grouped by Layer, from one GraphQL
query. Each line is the ticket's state, its number and title, and its pull request when it has one; a blocking
cycle gets a group of its own. The Epic's Fix pull requests (trusted pull requests into its integration branch that
close no Sub-issue, open or merged) follow under Fixes, one line each with its state, its number and the Sub-issue
its Refs line names or unattributed, and the header line ends with the open count, as in (3 fixes open);
with no fixes it prints neither. With --json it prints the whole EpicState instead, the fixes as fixes.
Functions¶
run()¶
Prints the Epic's state.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
args |
string[] |
The Epic (an issue number in the current repo or an issue URL), and --json for the EpicState shape. |
Returns¶
Promise\<number>
0 when it printed the state; 2 on a usage error, with the usage on stderr. A gh error exits 1 with
the reason on stderr.
Example¶
Variables¶
USAGE¶
The usage text spp status --help prints.
Type Aliases¶
TicketState¶
type TicketState =
| "blocked"
| "ready"
| "claimed"
| "pr-open"
| "gate-pass"
| "gate-fail"
| "merged"
| "handed-back"
| "not-agent";
Where a Sub-issue stands, the first that fits: merged (the issue is closed), handed-back (unheld, with a route
label; blocked beside ready-for-agent is not one, since that route waits on its blocked-by edge), pr-open,
gate-pass or gate-fail (an open pull request, by the slice gate's verdict on its current head), claimed (held
by the Claim mark or an assignee), blocked (an open blocker that has not landed), not-agent (no
ready-for-agent label), else ready.
Ticket¶
One Sub-issue of the Epic.
Properties¶
| Property | Type | Description |
|---|---|---|
number |
number |
The issue number. |
url |
string |
The issue URL, which names the ticket everywhere else in the state. |
repo |
string |
The issue's repository, owner/repo. |
title |
string |
The issue title. |
size |
"S" | "M" | "L" | null |
The size its size: label gives, or null without one. |
state |
TicketState |
Where the ticket stands. |
layer |
number | null |
The Layer: one above its highest blocker inside the Epic that has not landed, 0 with none; null when caught in a cycle. |
blockedBy |
string[] |
URLs of open blockers, leaving out one that landed while its issue stays open. |
landed |
boolean |
Whether its work has landed: the issue is closed, or a pull request of its merged into the integration branch. |
claimed |
boolean |
Whether it carries the Claim mark (the claimed label); an assignee also holds a ticket. |
assignees |
string[] |
Assignee logins. |
labels |
string[] |
Label names. |
pr |
Pr | null |
The pull request it shows (an open one first, then a merged one, newest first), or null. Only its own count: in one of the Epic's repositories, opened by a trusted author and, while open, into the integration branch. |
worker |
string | null |
The progress comment's Worker line, or null. |
note |
| { text: string; at: string; } | null |
The latest local note (spp note) with its ISO time, or null. |
Fix¶
A Fix pull request: a trusted author's pull request into the Epic's integration branch that closes no Sub-issue,
open or merged (ADR 0011). ticket is the URL of the Sub-issue its body's first Refs line names, or null when
it names none of them (unattributed).
Properties¶
| Property | Type | Description |
|---|---|---|
number |
number |
The pull request number. |
url |
string |
The pull request URL. |
repo |
string |
Its repository, owner/repo. |
state |
"OPEN" | "MERGED" |
Its state: a closed unmerged pull request is no fix. |
base |
string |
The integration branch it merges into. |
headSha |
string |
The head commit's full sha. |
ticket |
string | null |
The Sub-issue it belongs to, as an issue URL, or null. |
verdict? |
Verdict |
Its <!-- spp-verdict --> comment, present only when it decodes. |
gate |
"pr-open" | "gate-fail" | "gate-pass" |
Its gate on the current head: gate-pass or gate-fail only when a verdict names that head, else pr-open. |
EpicState¶
An Epic and its Sub-issues as one snapshot derives them: the --json shape of spp status.
Properties¶
| Property | Type | Description |
|---|---|---|
epic |
object |
The Epic; branch is the integration branch its plan comment records, or null. |
epic.number |
number |
- |
epic.url |
string |
- |
epic.repo |
string |
- |
epic.title |
string |
- |
epic.branch |
string | null |
- |
tickets |
Ticket[] |
Every Sub-issue. |
layers |
string[][] |
Issue URLs by Layer, Layer 0 first. |
cycle |
string[] |
Issue URLs caught in a blocking cycle. |
counts |
Record\<TicketState, number> |
How many tickets are in each state. |
fixes |
Fix[] |
The Fix pull requests, by number. |
PrState¶
A pull request's state on GitHub.
Pr¶
A pull request linked to a Sub-issue.
Properties¶
| Property | Type | Description |
|---|---|---|
number |
number |
The pull request number. |
url |
string |
The pull request URL. |
state |
PrState |
Its state on GitHub. |
repo |
string |
Its repository, owner/repo, which may lie outside the Epic: any repository can say it closes an issue. |
base |
string |
The branch it merges into. |
headSha |
string |
The head commit's full sha. |
trusted |
boolean |
Whether spp trusts its author: the gh user, or one GitHub marks OWNER, MEMBER or COLLABORATOR (ADR 0009), so a stranger's fork pull request into the Epic's repository is never the ticket's. |
verdict? |
Verdict |
The pull request's <!-- spp-verdict --> comment as spp verdict writes it, present only when it decodes. |
refs |
string | null |
The issue URL the body's first Refs #N, Refs owner/repo#N or Refs <issue URL> names, or null without one. A fix pull request names the Sub-issue it belongs to this way (ADR 0011). |
Verdict¶
The slice gate's verdict on one head of a pull request, as its <!-- spp-verdict --> comment's trailer holds it.