Dec 1, 20266 min readDevops
474 pull requests a week, and the 6 that matter

One square per pull request merged in one week. Code dropped the grey ones, 77 reached the model, and the 6 green ones stand for the changelog rows it wrote.
TL;DR
In one week we merged 474 pull requests across a couple of hundred repos, and they added up to just 6 changes other engineers needed to know about. Writing those changes down by hand never stuck, so a weekly GitHub Action now does it: plain code filters out most PRs, one model call picks the ones that matter and drafts a changelog row for each, and code checks the result before it lands in Notion.
Why we built it#
Our infrastructure changes every week, and the engineers it affects mostly don't see it happen. The frontend repos move from npm to pnpm, a shared workflow starts pulling a newer Node patch, a production setting changes. If nobody tells you, you find out when your build breaks, or months later when you're debugging production and asking what changed.
So we keep a DevOps changelog in Notion, with one row for each change that touched production or changes what developers do. Writing those rows by hand didn't stick. We wrote five or six in the first two weeks, then stopped. A changelog label on the PR has the same flaw, because someone still has to remember.
We wanted the changelog to draft itself from the pull requests we merge, with a person still deciding what stays.
What the workflow does#
It's one Node script that GitHub Actions runs every Thursday, in five steps:
- Collect. It pulls the week's merged PRs from every repo through GitHub's GraphQL API. One week, that was 474.
- Filter with code. Six plain rules drop the PRs that can't matter to anyone else: bots, docs, tiny changes, repos we ignore. 77 were left.
- Ask the model once. One call sends those 77, as titles, descriptions and file paths without diffs, and asks which ones add up to a change worth logging, with a draft row for each. It came back with 6.
- Check the answer with code. Every link, owner and date in the reply is checked against what we sent, and no PR can quietly go missing.
- Write the rows. They land in Notion marked Proposed, and a digest goes to Slack. The row's owner, whoever wrote most of its PRs, keeps it by unticking Proposed or deletes it.
Code keeps the facts, the model gets the judgment calls.
Each row gets a severity: Act when developers must do something, Heads-up when production behaves differently, or Record when it's saved for later and left out of Slack. Dry mode is the default. It prints the digest and writes nothing, so every rule change gets tried on a real week first.
Code picks what the model sees#
A dry run on the week of 17 to 24 November. Bars to scale.
Six rules run in order, and the first match drops the PR:
- Ignored repo: templates, MVPs and test repos.
- Bot: Dependabot, Renovate and other app accounts.
- Noise title: chore(deps), docs:, test: and the like.
- Tiny: under 20 lines, unless it touches IAM, Terraform or Kubernetes manifests. That exception is the most important line in the config, because a one-line IAM policy can matter more than a 2,000-line refactor.
- Docs only: only documentation files changed.
- Out of scope: a product repo PR that touches no infra files and that no DevOps engineer wrote or approved.
Every rule is a regex or a list in a JSON file, so a noisy week gets fixed with a one-line PR, not by rewording a prompt. Another dry run, on a different week: 418 merged, 54 sent to the model, 8 rows.
What we ask the model#
For each PR the model gets the link, repo, the repo's tier, author, title, description, labels, size, the infra file paths, and whether DevOps was involved. It never sees the diff, and it never sees the PRs the filters dropped.
The request goes to Claude on Amazon Bedrock in our own AWS account, through an OIDC role, so there's no API key to store. Bedrock doesn't store prompts, share them with the model provider, or train on them.
The instructions are short:
- Group by goal, not by PR. A migration that took nine PRs across nine repos is one row.
- Keep a row only if it matters later. It touched production or every environment, changes what developers do, or is something you'd need while debugging production months from now.
- Never state a count you didn't count. Say "the client repos", not "14 client repos".
- Account for every PR. Each one goes in a row or in a skipped list with a reason. A model that quietly drops a PR looks exactly like one that judged it unimportant, and this rule tells them apart.
PR titles and bodies arrive wrapped in tags, and the prompt says to treat them as data. Anyone in the org can write a PR description, so it's untrusted input. Telling the model that doesn't stop an injection on its own. What limits the damage is that code checks every link and owner, and every row lands as Proposed until an owner keeps it.
Code checks the answer#
The reply comes back as JSON, and the script trusts very little of it. This is most of the check, trimmed:
// Keep only PR links we sent. The model can't cite one it never saw.
const prs = [...new Set(row.prs || [])].filter(url => authors.has(url));
// The owner is whoever wrote most of the row's PRs, never the model's pick.
const counts = Map.groupBy(prs, url => authors.get(url));
const owner = [...counts].sort((a, b) => b[1].length - a[1].length)[0]?.[0];
// The model flags devs_affected, and code turns that into Act.
// An unknown severity becomes Heads-up, so it shows instead of hiding.
const severity = row.devs_affected === true ? 'Act'
: ['Heads-up', 'Record'].includes(row.severity) ? row.severity : 'Heads-up';A few more checks sit around it. If a PR from the input is missing from both the rows and the skipped list, the digest names it. A row made only of one product repo's PRs is that team's own news, so it's saved as Record. And each row is dated by its last PR's merge date, and any PR already linked from an older row is skipped, so a rerun never writes the same change twice.
A small job for the best model#
It's tempting to give an LLM the biggest job in a pipeline: here's everything, figure it out. We gave ours the smallest job we could, 77 PRs without diffs once a week, and at that size even the biggest model costs cents a run.
We tested Haiku, Sonnet and Opus, each at low and medium effort, on two real weeks: 36 dry runs, each scored against 14 rows we'd agreed by hand should be there. It's a small test, so read it as a direction, not a benchmark:
We weighted Act rows highest, since those are the ones developers have to do something about. Medium costs about 8 cents a run more than low, and the job runs four times a month, so that's around 30 cents a month for the row low effort kept missing. Easy call.
What it writes#
Two rows it wrote, trimmed:
Moved the frontend repos from npm to pnpm (Act, nine PRs in one row)
- What and why: the repos now build with pnpm 10, pinned in packageManager.
- What bit us: packages npm used to hoist had to be declared, and pnpm 10 blocks install scripts by default.
- Watch out: use pnpm, not npm, and allow new install scripts in onlyBuiltDependencies.
Made setup-node pick up Node patch releases (Record, one PR)
- What and why: the shared workflows now set check-latest, so builds get the newest Node patch.
- What bit us: runners kept using Node 24.22.2 from the tool cache after the 24.22.3 security release.
- Watch out: builds can move to a new Node patch without a change in the repo.
The model is the smallest part#
One step in this job needs a model: reading a PR description and deciding whether another engineer would care. Everything around it (what the model sees, who owns a row, whether a link is real) is plain code we can read, test and fix in a one-line PR.
That's the part worth copying. Before you put a model in a pipeline, write down every decision it would make, and take back each one code can make. Whatever's left is the model's job. In ours, that came to one call a week.


