Omniscio

PR Janitor (nightly cleanup of already-landed pull requests)

The PR Janitor is a nightly housekeeping pass over your open GitHub pull requests: it closes the ones whose work is already on your main branch, comments on every pull request it judged, and starts a landing session for anything still holding unlanded work. It is an operator tool — Omniscio ships the engine, the ledger and the panel, but it does not create the nightly job for you. The PR Janitor section at the top of the PR Merge Queue view reads back what the job you set up did.

On this page

What it is

A housekeeping pass over your open GitHub pull requests, run by a nightly job you set up yourself. Each run:

  • Closes the pull requests whose changes have already fully reached your main branch, leaving a short comment explaining why.
  • Comments on every pull request it judged — the ones it closed and the ones it left open. A comment is outbound: it appears on the pull request for its author to read.
  • Starts a landing session for a pull request still holding unlanded work that nothing else is moving. Those sessions cost money, so the job budgets how many it may start from how loaded the machine is.
  • Leaves open anything it is not sure about, rather than guessing.

The nightly job is yours to create. Omniscio ships the engine, the run ledger and the panel that reads it; it never installs or schedules the job. Until a Session cron job named for the Janitor exists and fires, the panel has nothing to report, the six counts stay empty, and Dry run has no engine to run.

Where to find it

  1. Turn the panel on: install PR Merge Queue from Marketplace → Inbuilt.
  2. Configure at least one repository: Settings → Access & Sharing → PR Merge Queue. The PR Janitor section is not rendered until a repo is configured — on a fresh install the view shows only the "No repositories configured" empty state, with no Janitor section, counts, Pause or Dry run.
  3. Open the PR Merge Queue view — the PR Janitor section sits at the top of the pull-request list.
  4. Set up the nightly job itself: a Session cron job whose name contains "PR Janitor" (the job editor is on the Cron Jobs page). The panel finds the job by that name and nothing else, so name it accordingly.

How it behaves

  • The six counts. The latest settled run's own tally, one number per verdict it recorded. They are that run's numbers, not a live count of your open pull requests.
  • Last run / Next run. Next run reads Not scheduled whenever no matching cron job exists, the job is switched off, or the Janitor is paused — never a guessed time. A read that FAILED, or that has not answered yet, shows neither a time nor that sentence (2026-10-15): nextRunAt is null both for "the schedule has nothing pending" and for "nobody could read it", and the header used to render the second as the first — a definite claim that the nightly sweep is off, invented from a failed read, printed directly under the error alert. It now shows a dash until a read actually comes back.
  • Run history. Each run is recorded, so you can see what the Janitor did on the recent nights it ran: the list shows the newest 20 runs, and runs are kept for 30 days before they are purged.
  • Pause / Resume. Pausing records the setting and switches the nightly cron job off, so nothing fires while it is paused. Resuming records the setting and switches the job back on only when that job is approved (or needs no approval) — a job still awaiting approval is deliberately left off. When no matching job exists, neither button changes any schedule.
  • Dry run. Asks the engine what it would close, closing nothing. It runs the copy of the engine the nightly job leaves on the machine, so before the job has ever run it answers that the Janitor has not run on this machine yet.
  • It is the panel that reads; the nightly job that acts. The panel only reads the ledger and can ask for a dry run. The closes, the comments and any landing sessions all come from the nightly job, on its own schedule.

Last verified 2026-10-12