Skip to content

Support blaming a subset of a file in the REST API

Nick Thomas requested to merge 225174-git-blame-paginated-rest-api into master

Allow a range to be taken for the blame endpoint of the REST API. Returned results will be restricted to that range.

This MR depends on changes in !84388 (merged), and currently has its target branch set to that MR's branch. It can only be merged after that one, at which point the target branch should be changed to master.

In time, we may want to limit the maximum range size, and perhaps even apply a default range size when one is not specified, but that is not in scope for this MR.

Related to #225174 (closed)

How to test locally

  1. Open http://127.0.0.1:3000/api/v4/projects/2/repository/files/README.md/blame?ref=main&range[start]=1&range[end]=3
  2. Change range start and end numbers to see the difference
Edited by Vasilii Iakliushin

Merge request reports