最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

optimization - Get repositorytree files names with latest update time efficiently - Stack Overflow

programmeradmin0浏览0评论

I have been trying to get repository tree file records and their latest update time using such a API requests

Firstly get all files for the tree

;page=1&per_page=100

API CALL RESPONSE IMAGE

Afterward get latest update time for each file

=.gitignore&per_page=1

API CALL RESPONSE IMAGE

Is it possible somehow to call just one api request to get the data to keep it more efficient?
I supposed that it is possible using graphql but not find the way for now? Thanks in advance

I have been trying to get repository tree file records and their latest update time using such a API requests

Firstly get all files for the tree

https://gitlab/api/v4/projects/66677391/repository/tree?ref=8af436d5abd261d32919d6525dbad617f7207bcc&page=1&per_page=100

API CALL RESPONSE IMAGE

Afterward get latest update time for each file

https://gitlab/api/v4/projects/66677391/repository/commits?path=.gitignore&per_page=1

API CALL RESPONSE IMAGE

Is it possible somehow to call just one api request to get the data to keep it more efficient?
I supposed that it is possible using graphql but not find the way for now? Thanks in advance

Share Improve this question edited Feb 3 at 16:11 Marko Koval asked Feb 3 at 16:07 Marko KovalMarko Koval 11 bronze badge 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Bot Commented Feb 4 at 2:19
Add a comment  | 

1 Answer 1

Reset to default 0

No. The Gitlab GraphQL API does not include commits on Blobs (the files of a Tree), so you cannot do this in one call.

Also, please don't post images of data. Why should I not upload images of code/data/errors?

发布评论

评论列表(0)

  1. 暂无评论