Get gitlab stats
Project description
Get to the gitlab API and generates a report based on the pipeline builds. Creates a report for the pipelines of the last two weeks. (On the assumption that there are less than 100 push per 2 weeks)
Installation
Install via pip using:
pip install gitlab_stats
Local install with pip3:
pip3 install -e .
In order to make it work:
Create a GITLAB_TOKEN env variable with your access token.
Get the project ID
For the script to work, you will need to get the project ID of your gitlab project. It is a unique ID that is used by the gitlab REST API to store your project information.
Get it in [your project] > Settings > General > General project settings
How to use
When installed you should be able to run it like that:
gitlab_stats <id> -u <your gitlab url> -p <your proxy>
Here is the help when gitlab_stats -h:
usage: gitlab_stats [-h] [-r] [-u URL] [-p PROXY] id
gitlab_stats: Generate a report from gitlab's pipeline metrics
positional arguments:
id Put the id of the gitlab project
optional arguments:
-h, --help show this help message and exit
-r, --report Generate a csv report
-u URL, --url URL Put the url of your gitlab instance if different from
https://gitlab.com
-p PROXY, --proxy PROXY Add the url of your proxy like
'http://my.proxy.url:8083'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gitlab_stats-1.0.5.tar.gz
.
File metadata
- Download URL: gitlab_stats-1.0.5.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b5244d320401db2c92c3e2c16c4c28bde8d30938ddb448f027b5625230814bd |
|
MD5 | c3781e1f991fa261e097ac6dd50e9178 |
|
BLAKE2b-256 | f12ff892f55e870fe8e4c28f94cdaa89ef25538c457fe819d185c6838d9b0ce3 |