Lingtai
Docs
GitHub

Documentation

close:

DoesCloses the GitHub issue the pass was about, so nobody runs gh issue close by hand.
Write it atend — the one step that carries out effects.
Needsclose: true. when defaults to landed.
Refusesclose: false, a when outside the five outcomes, any step but end.
Watch outend fires on every ending: with when: any a blocked or failed ticket is closed too.

Closes the issue when a ticket ends, so the board and GitHub agree about what is finished. It runs for effect — end is the point that cannot refuse.

What it does#

end-step.ts resolves the effects for an outcome (resolveEndActions) and tell.ts carries them out. when filters on the outcome: close it when it lands, label it when it is blocked is one configuration. closed is the fourth outcome and any includes it: a ticket a person ended is closed on GitHub too.

Where it may be declared#

closePlugin.at is { end }. It is an effect and not a verdict, and only end carries out effects; at any deciding step it would be a thing a pass waits on that produces no answer.

Parameters#

fieldtyperequiredwhat it means
namestringyesHow the effect is named on the log.
closetrueyesThe key. Only true; there is no close: false.
whenlanded | blocked | failed | closed | anyno, landedWhich endings it runs on.

Examples#

# packages/recipe/unit/plugin.test.ts — the default: close only what landed
end:
  - name: close it
    close: true
# a ticket that ended for any reason is finished with — including a person closing it
end:
  - name: close it
    close: true
    when: any
# close on landing, and label what did not (see labels.md)
end:
  - name: close it
    close: true
  - name: flag it
    labels: [needs-human]
    when: blocked

The first is the default spelled out; the second widens what ends an issue; the third pairs it with a different effect on a different outcome.

What it refuses#

end:
  - name: close it
    close: true
    when: sometimes

steps.end.0.when: … its "when" field is not what "close" accepts: Invalid option: expected one of "landed"|"blocked"|"failed"|"closed"|"any".

At proposed: close: does not implement proposed — it serves end: it is an effect rather than a verdict, and only the end step carries out effects. Both when the recipe resolves — before a worktree, before an agent, before any money.

Rendered from doc/plugins/close.md at build time. The file is the document; this page is a projection of it, and never a copy — which is why the fix for anything wrong on it is a pull request against that file.