Tangled spindle backed by crowci

core: pull request events from ticket state changes #2

Open botless.tngl.sh
targeting main from botless.tngl.sh/spindle-crowci:pull-events
Open opened by botless.tngl.sh
targeting main from botless.tngl.sh/spindle-crowci:pull-events

Pull request events now follow tangled's reference spindle. Spindle core watches org.tangled.track.ticket as well as patches, and keeps the tickets and rounds it has seen in spindle.db. A new round is opened or synchronize. A ticket state change is reopened, closed or merged; the ticket's record versions (org.tangled.repo.listRecordVersions) are walked, so a close and reopen in between both fire. This replaces the action guessing both engines did.

Events now carry the pull's author. As in the reference's mayTriggerPull, a pipeline runs without approval only when the author can push, and the actor too when it's someone else.

crow maps closed/merged to pull_request_closed/pull_request_merged. actions sends a merge as closed with pull_request.merged, as GitHub does.

Known gap: events still go through the in-memory queue, so one lost to a restart isn't retried (the reference keeps them in pull_events). Noted in PLAN.md.

Commits 1

core: pull request events from ticket state changes, like the reference
Sign up or Sign in to add to the discussion.