Skip to main content

Module reviews_handler

Module reviews_handler 

Source
Expand description

GET /api/v1/reviews: every pull request a Kanban task names, with the review, checks and merge state this srv was told of and what it waits on (backend::reviews, spec SPEC_REVIEWS_PANE_2026_11_15.md). A thin route over the rows the board shows on a card (the card store keeps what each notice said, across restarts), plus the pull requests only a recent notice named. It calls no GitHub API.

A caller that is an agent gets the tasks of the boards Tasks list shows it and no others, and a PR only an event named only when the notice went to that agent: a private repository’s PR is never given to a caller that can’t see its task. A caller with no token (the app’s own windows) gets everything.

Query: agent (the task’s holder or the notified agent), waits_on (person, author, …), task (12, #12, work#12) and repo (owner/repo), each narrowing the list.

Structs§

ReviewsQuery

Constants§

TASKS_LIMIT 🔒
The most tasks read from one board. Each board is read on its own, so a busy board cannot push another’s tasks out of the cut, and a caller’s visible boards are the only ones read.

Functions§

card_rows 🔒
A row for each pull request the cards of tasks hold, from what the card store keeps of it (the review, checks and merge notices it was told of and what it waits on): the same rows the board shows on a card.
handle_reviews
is_task 🔒
Whether task names row’s task. Task numbers are per board, so a bare 12 or #12 is the default board’s task 12 and another board’s is work#12.
join 🔒
The rows of the cards, and after them the pull requests only a notice named (orphans: a list built from the notices alone), newest change first. A notice whose repository id a card settled is that card’s, not a row of its own; a pull request no visible task holds is the caller’s only when the notice went to it.
narrow 🔒
Narrows list to what q asks for.