Commit id's in API call for repository/tree

Description

Current, the Repository tree API call prints out a list of all files in a specified file location. For some metrics information for a few teams here, we're wondering if it's possible to get the commit id's just like in repository/files but for each thing returned in the tree API call. Or if this could be a parameter to pass in that says "show_commits=true"

(Include problem, use cases, benefits, and/or goals) Improves performance by avoiding a lot of unnecessary API calls to GitLab

Proposal

Add two extra items in the repository/tree objects that get returned. In other words, expose the first commit and the newest one to each of the items returned. This will allow the team from having to make 1 API call to get the tree, and then an additional API call for each individual file. The more files in a tree, the heavier this can get on our GitLab server.

Links / references

https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/api/entities.rb#L227 https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/api/repositories.rb#L22

Assignee Loading
Time tracking Loading