I want to display some basic stats about gitlab in my php script, but can't seem to find a way to get project/commit/file count from command line. Is it possible to get this information from command line? Thanks
Asked
Active
Viewed 2,087 times
1 Answers
2
You'd have to use the API, possibly through clients like https://github.com/m4tthumphrey/php-gitlab-api or https://github.com/NARKOZ/gitlab
As for the precise data you want to get:
project count: use the project API + pagination headers - view detail how to get total page from response header key
x-total-pages
herecommit and commit count: currently not possible through the API. Requests that might make it possible: http://feedback.gitlab.com/forums/176466-general/suggestions/3788030-the-api-should-support-showing-commit-details , http://feedback.gitlab.com/forums/176466-general/suggestions/6661459-api-allow-recursive-repository-tree. So you have to use
git
methods directly (not sure if possible without cloning).

Nam G VU
- 33,193
- 69
- 233
- 372

Ciro Santilli OurBigBook.com
- 347,512
- 102
- 1,199
- 985