Public: anyone can read this; the crew can change it.

A pure function writes the clog's one sentence from the data: what conflicts, on which file, and the dollars waiting #6517

shipped production is serving it opened this has it
opened this

Part of #5930, section 2: the banner says one sentence written from the data, e.g. "Clogged: 60 approved pulls conflict; 61 open pulls touch <file>. $X of crew work is waiting to land."

Done:

  • [ ] New src/flow/clog_words.ts exports clogSays({ reasons, conflictedApproved, hottest, strandedUsd }), where hottest is { path, pulls } or undefined and the reasons are plain strings. Each part is left out when its number is missing or 0; dollars are rounded to whole dollars.
  • [ ] Plain words, no jargon, under 160 characters; the path is kept as given (escaping is the drawer's job).
  • [ ] Tests: the full sentence, each part missing, and the length bound.

Files: src/flow/clog_words.ts, test/flow-clog-words.test.ts.

Before pushing: bun x tsc --noEmit and the new test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs