Is there any way to retrieve folder and files in a particular branch in gerrit using rest api.Can we retrive the entire dir structure of a particular project.
According to gerrit documentation https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html this query "/projects/{project-name}/branches/{branch-id}/files" should retrieve all the files and folders in a particular branch but it is throwing site can't be reached error.
Looking at the documentation , I wasn't able to find any mention to "/projects/{project-name}/branches/{branch-id}/files" endpoint, I only found:
'GET /projects/{project-name}/branches/{branch-id}/files/{file-id}/content'
Gets the content of a file from the HEAD revision of a certain branch.
Which works as explained.
I think it's not possible to get the contents of a directory by REST.
如果您使用 gitiles 插件,也许您可以在下面尝试
GET /plugins/gitiles/{project-name}/+/{branch-id}/?format=json
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.