Skip to content

Include branch refs in revision history response #5

@JohnRDOrazio

Description

@JohnRDOrazio

Description

The revision history endpoint (/api/v1/projects/{id}/revisions) needs to return a refs map (commit hash → branch names) so the frontend can display branch labels on the git history graph and assign commits to separate visual lanes by branch.

Context

This is the backend counterpart to the frontend issue and PR:

The frontend consumes the refs field from the revision history response to visually separate branch commits onto different lanes and render branch name badges.

Solution

Add a refs field (Record<string, string[]>) to RevisionHistoryResponse that maps commit hashes to their associated branch names. Build the map by listing branches and matching their tip commits against the revision history.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions