Merge backstop sweep (GET) — cronmergebackstopget
const url = 'https://example.com/api/cron/merge-backstop?dry_run=1&catch_up=1&pages=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/cron/merge-backstop?dry_run=1&catch_up=1&pages=1'Restored by HO-8020. Runs the merged-role repair, sweepUnmergedTickets (open
un-merged tickets re-classified against recent push events, keyset-paged on
updated_at) and sweepRecentGithubPrs (recently merged PRs that reference an
HO ticket without a closing keyword). Query params: dry_run=1 classifies without
writing, catch_up=1 widens the pass for a backlog drain, before=<ISO> is the
paging cursor echoed back as nextCursor, pages=<1..2> follows that cursor
in-process for up to that many ticket-sweep pages under one sweep deadline
(HO-18165). Protected by CRON_SECRET via the
x-cron-secret header only (no token query parameter).
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Classify and report without writing any merge-close.
Widen the pass (200 tickets, 30 pushes per project, 7-day PR lookback) for a backlog drain.
Keyset cursor — only tickets with updated_at strictly before this timestamp; take it from a previous response’s nextCursor.
Ticket-sweep pages to run in this request (HO-18165). Each page after the first continues from the previous page’s nextCursor and runs only the ticket sweep; all pages share one sweep deadline. The response reports the pages run and the LAST page’s truncated/nextCursor.
Responses
Section titled “ Responses ”Backstop run result
object
Ticket-sweep pages this request ran (HO-18165); at most the pages asked for.
True when the LAST ticket-sweep page stopped before every candidate was seen (full page or deadline).
The last page’s cursor; pass back as before to continue paging; null when nothing remains.
The sweepUnmergedTickets counters of every page BEFORE the last, in order (the last page is sweep); empty for a one-page request; a null entry is a page that threw.
RepairMergedRolesWhereMergedAtSet counters.
object
The last page’s sweepUnmergedTickets counters; null when that page threw.
SweepRecentGithubPrs counters; null when that sweep threw.
Malformed before cursor (INVALID_CURSOR) or pages outside 1..2 (INVALID_PAGES)
Missing or invalid CRON_SECRET