Reputation: 1388
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
Upvotes: 1
Views: 2410
Reputation: 384344
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
here
commit 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).
Upvotes: 2