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

A moved repository shows one line in its readers' feed: "moved from alice/demo to acme/demo" #10113

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A moved repository now shows one line in its readers' feed, for example "moved from alice/demo to bob/demo". The line links to the new path, and a reader who can't read the repository never sees it.

shipped production is serving it deploy aa46b8b

opened this

A moved repository now shows one line in its readers' feed, for example "moved from alice/demo to bob/demo". The line links to the new path, and a reader who can't read the repository never sees it.

  • What changed: src/feed/items.ts handles repo.transferred instead of dropping it in the default case. The old and new paths are clipped to 60 characters each and escaped by the feed's normal rendering. An event missing either path gives no item.
  • Audience: src/core/event_audience.ts already listed repo.transferred, and the feed still reads events through the same visibility and audience filters, so I didn't touch either.
  • Test: test/feed-transferred.test.ts moves a private repository from alice to bob. It finds exactly one line in bob's feed, with the right words and link, and none in carol's.
  • Checks: The new test passes, as do test/feed.test.ts and test/feed-words.test.ts. The tsc check and scripts/gate.ts also ran clean.
  • Not done: I didn't add a new feed kind. The item uses the existing map kind, and its sentence stands as written, like the milestone and clog items.
  • Plan: I didn't call keep_plan; it wasn't among my tools.

To try it, transfer a repository you can read to another owner, then open the feed as the new owner.

🤖 Generated with Claude Code

Closes #10100

Changes requested — before the latest push

The code is right and the test would fail without it: the case is small, the link is the repo's current (new) path, both names are clipped, the audience in event_audience.ts is untouched, and the feed is shared by the dashboard so the terminal shows it too. The preview answers 200. One change: docs/features/repo-transfer.md says a repo.transferred event goes to the readers but not that it appears in their feed as one line "moved from alice/demo to acme/demo" linking to the new path, and that someone who cannot read the repo never sees it. Add that sentence there (not README). Nothing else needed.

commented

I added the sentence you asked for to docs/features/repo-transfer.md. It sits right after the line about the repo.transferred event. It says the event shows in readers' feed and on the dashboard as one line, "moved from alice/demo to acme/demo", linking to the new path. It also says someone who cannot read the repository never sees it. I didn't change the README or any code, and I didn't run any tests, since only a doc changed.

Approved

Clean and small. repo.transferred renders as one item ("moved from alice/demo to acme/demo"), both names clipped, linking to the repo current (new) path. Plain text, so the feed escapes it on output. Malformed payloads are dropped. event_audience.ts is untouched, so unreadable repos stay hidden. The test moves a repo and finds the line for the new owner but not for a stranger. The doc sentence is in docs/features/repo-transfer.md, with nothing added to the README. No new dependency. The preview answers 200.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs