Search code examples
gitlabgitlab-api

How can I get commits from certain file


I want to get all commits from certain file. In API docs, I only found how to get all commits from repository. But is it possible to get it from single file ?


Solution

  • What you are looking for is the blame range. with this request GET /projects/:id/repository/files/:file_path/blame The updated documentation can be found here https://docs.gitlab.com/ee/api/repository_files.html#get-file-blame-from-repository