By this API GET /projects/:id/repository/files/:file_path
( Repository files API | GitLab), we can get the last_commit_id
of a single file in the repository. In this way, we can know who is the last modifier.
However, there is no corresponding information of something like first_commit_id
which can be used to know who created a file.
In stead, we can list all commits of a file by GET /projects/:id/repository/commits?path={file_path}
( Commits API | GitLab) to find the first commit, however, this is quite inefficient, the API does not support sort by reverse date.
Wondering does any one know if there are any efficient way to know who creates a file?