Open pulls red for over a day
A background duty looks hourly at every open pull of the forge's own repository. A pull is listed when the check on its current head has failed and the newest failed run finished more than 24 hours ago.
- One issue. The duty files a single issue titled "Open pulls whose check
has been red for over 24 hours", listing each pull with its age in whole days. It never files a second while that one is open.
- Edited in place, only on change. Each pass compares the new list with the
issue's body and writes only when they differ, so watchers are not notified hourly. Ages are whole days for that reason.
- The clock. The age counts from the newest failed run, not from when the
pull first went red: a rerun that fails again on the same head restarts it. A push (a new head) or a green run drops the pull off the list.
- A person closes it. The duty never closes the issue. When nothing is red
it edits the body to say so; if the issue stays open it is reused, and once a person closes it, the next red pull files a new one.