spp merge
spp merge <pr> [--json] merges a slice pull request, or a Fix pull request, into its Epic's integration branch, only when its gate passed
on the current head, its blockers' pull requests have merged, its base is the integration branch and its checks
pass. The gate's verdict counts only from a trusted author (the gh user, or an OWNER, MEMBER or COLLABORATOR), and
spp merge re-reads the verdict comment to check that before it merges (ADR 0009). It merges with the Routing
block's merge method (squash by default) pinned to the head the gate passed, then records the pull request on the wave comment. A Fix pull request (it closes no Sub-issue of its Epic; its body Refs a Sub-issue) merges the same way when a
trusted author's verdict passes on its head, its base is the Epic's integration branch and its checks pass, and
writes nothing to the wave comment. A closed issue that is missing, Epic-less, or not this pull request's own
Sub-issue sends the pull request down the fix path, which demands the same verdict, base and checks, so that
cannot merge more than the slice path does. A conflict is never resolved here: the worker rebases. It prints
merged <pr> into <branch> or not merged: <reason>; with --json it prints MergeResult.
Functions¶
run()¶
Merges one slice or Fix pull request when everything allows it.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
args |
string[] |
The pull request (a number or URL), and --json for the MergeResult shape. |
Returns¶
Promise\<number>
0 when it merged; 3 on a merge conflict (rebase needed), so the worker rebases; 1 for any other
refusal, for a merge whose wave comment could not be recorded, and on a gh error; 2 on a usage error, with the
usage on stderr.
Example¶
Variables¶
USAGE¶
The usage text spp merge --help prints.
Type Aliases¶
MergeResult¶
What spp merge did: its --json shape.