ci: Publish a nightly code-ownership map - #1114
Open
ellemouton wants to merge 1 commit into
Open
Conversation
Measures who has been working on each package and file in this repo -- commits per author over a twelve-month window -- and commits the result to .github/code-owners.json. It feeds issue triage. lumos runs an assignment workflow that routes a new issue to whoever owns the code it touches, and issues are filed there that track work here, so it needs ownership data for this repo. It fetches this published file rather than cloning and recomputing: a repo is the only place that can authoritatively answer who works on its code, and computing it elsewhere would need a cross-repo token to do something this repo can do for itself. The map is also worth having on its own. Its diff shows ownership moving between people over time, and a wrong answer can be argued with in a PR rather than rediscovered by hand. Two measurement choices worth knowing. Packages are credited once per commit, not once per file touched, so one sweeping rename does not outweigh months of focused work. And both per-package and per-file counts are kept, because they disagree often -- measured on the sibling repo, 28% of tracked files have a different top author than the package containing them, and the margin differs even where the winner does not. Authors are resolved through an explicit email-to-handle table rather than by matching names, which does not work on this history: one contributor's display name resembles their handle not at all, and two others each commit under more than one name. Runs at 03:42 UTC, an hour ahead of the consumer's run so the map it fetches is same-day. Opens a PR; it never pushes to a protected branch, and refuses at runtime if its branch is configured as one.
ellemouton
force-pushed
the
agent/code-owners-map
branch
from
August 11, 2026 22:24
e5863c0 to
2a6f10e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a nightly workflow that measures who has been working on each package and
file in this repo — commits per author over a 12-month window — and commits the
result to
.github/code-owners.json.Why
It feeds issue triage. lumos has an assignment workflow (lightninglabs/lumos#766)
that routes a new issue to whoever owns the code it touches, and issues get filed
there that track work here — so it needs ownership data for this repo.
It fetches this published file rather than cloning and recomputing. A repo is
the only place that can authoritatively answer who works on its code, and doing
it elsewhere needed a cross-repo token to do something this repo can do for
itself. Hence: each repo publishes its own, nobody computes anyone else's.
The map is worth having independently too — its diff shows ownership moving
between people over time, and a wrong answer can be argued with in a PR rather
than rediscovered by hand.
Measurement choices worth reviewing
sweeping rename doesn't outweigh months of focused work.
Measured on the sibling repo, 28% of tracked files have a different top author
than the package containing them — and the margin differs even where the winner
doesn't.
which doesn't work on this history: one contributor's display name resembles
their handle not at all, and two others each commit under more than one name.
This table needs updating when someone joins or changes address.
generated code and vendored trees.
Operational notes
fetches is same-day rather than a day stale.
if its branch is ever configured as one.
BOT_GITHUB_TOKENto exist in this repo, same as the other botworkflows. If it isn't set, the job fails at checkout.
🤖 Generated with Claude Code