Is it possible to get commits history for one file in gitlab api?

10,029

Solution 1

There is a patch that implements this feature:

https://gitlab.com/gitlab-org/gitlab-ce/issues/18898

Unfortunately, it has not been merged yet:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4814

Edit: now merged, expected to land in 8.14.0 (2016-11-22): https://gitlab.com/gitlab-org/gitlab-ce/commit/146d4348ca6812e26729de40a831f4ae8c27fde6

Solution 2

Now you can do:

/projects/:id/repository/commits?path=:file_path

and receive array of commits about specific file.

Link to documentation

Share:
10,029
Admin
Author by

Admin

Updated on July 17, 2022

Comments

  • Admin
    Admin almost 2 years

    I want to get the commits or the last commit for one file in gitlab api like this:

    GET /projects/:id/repository/commits?path=fileName

    Gitlab support or not?