Skip to content

Conversation

@ChrisPenner
Copy link
Member

@ChrisPenner ChrisPenner commented Dec 18, 2025

Overview

Resolves this ticket

Adds a list of history hashes for each branch at GET /users/<handle>/projects/<slug>/branches/<branch-name>/history?limit=<limit>&cursor=<cursor>

See transcripts for exact response format, it differs slightly from the provided ticket so I can use my existing paging primitives.

Interesting/controversial decisions

Note:

  • We need a total ordering of history hashes, which gets a little squirrelly when you consider merges and such.
    • Git just uses the commit timestamp, but we don't have that luxury. I resolve it by sorting on causal-depth, then commit hash; this means causals from either side of the merge point will be interleaved in kinda funky ways, but it's roughly as good as git can do it. We can choose to reflect the full tree structure of the merges at some point in the future if we desire.

@ChrisPenner ChrisPenner marked this pull request as ready for review December 18, 2025 00:03
@ChrisPenner ChrisPenner requested a review from hojberg December 18, 2025 00:04
@ChrisPenner
Copy link
Member Author

Simon is currently out on Holidays, and I'm about to be, I'll go ahead and merge this so it doesn't go stale, but happy to make fast-follow-ups and change the API structure if needed, nobody will be integrated against it in the meantime :)

@ChrisPenner ChrisPenner merged commit db383e7 into main Dec 18, 2025
5 checks passed
@ChrisPenner ChrisPenner deleted the cp/history-api branch December 18, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants