bin/gstack-greptile-early backs /ship's early Greptile PR:
- detect: a root .greptile/ folder (which takes precedence), greptile.json,
or a Greptile comment on the repo in the last 90 days; triggerOnDrafts from
the effective root config; repo visibility; public-repo consent. It prints
the signal, that /ship will push and open a draft now, the 10-minute wait
cap and the absolute gstack-config command that turns it off.
- consent yes|no: the public-repo answer, remembered per repo in the
project's state.
- open: opens the draft through gstack-post with a body saying /ship opened
it early, and posts one @greptileai comment through gstack-post when the
config does not set triggerOnDrafts: true. An open PR is left alone.
- wait: polls every 30 s for a completed Greptile check run, a Greptile
review of the head commit or a summary naming it; each call returns within
about 90 s and reports timeout 10 minutes after the PR opened.
gstack-config gains ship_greptile_early (default true, invalid values
rejected): on automatically whenever the repo uses Greptile, off per user.
The logic is in lib/greptile-early.ts behind an injectable runner, so its
fixture-repo tests run in the Windows lane; an end-to-end test drives the
real helper and gstack-post against a stub gh.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>