Documentation
¶
Overview ¶
Package rollout holds what the commands that land one change as a pull request per repository (`dashfix`, `orgedit`) share: the subprocess seam, the hourly ledger, the REST reserve check and the wait for a pushed head.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( HeadPollEvery = 5 * time.Second HeadPollTries = 24 )
Overridable by tests.
Functions ¶
func Budget ¶
Budget refuses to start another pull request when the REST reserve is spent or the hourly cap is reached; an unreadable answer is a refusal too. It returns 0 to go on and 2 to stop, after saying why on stderr as `name: ...`.
func Call ¶
Call runs a program with stdin closed. A non-zero exit is an error carrying the program's own words. Tests fake the programs by putting stand-ins first on PATH.
func HeadIs ¶
HeadIs waits until the pull request's head is the commit just pushed. ⛔ prwait judges the head it reads, and right after a push GitHub still answers the old one: measured on go-ndarray/.github#25, where prwait judged the previous, red head and the run stopped on a fix that was in fact green.
Types ¶
type Ledger ¶
Ledger records one merged pull request per line: unix seconds, a space, the target.
func (Ledger) InLastHour ¶
InLastHour counts lines newer than an hour. A missing ledger is zero; an unreadable line is an error.