Skip to content

Murthy10/pygltr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pygltr

Python script to get GitLab Time Reports, it uses the GitLab API

Usage

If you use pygltr from the command line it will get you a CSV file with a list of all issues and some basic information or an overview of the time spent per milestone. Beside of the usage as a script pygltr provides the class PyGltr which is ready to use from your own code.

Script example

python pygltr.py -t TOKEN -p PROJECT

Output file (default) issues.csv:

id issue milestone estimate spent
5 Setup a latex template Project setup 7200 3600
4 Define milestones Project setup 7200 5400
3 Create a physical model 0 0
2 Setup CI Project setup 7200 3600
1 Functional tests support 0 0

or

python pygltr.py -t TOKEN -p PROJECT -s
    
Milestone                               Estimate            Spent               
--------------------------------------------------------------------------------
-                                       0h 0min             0h 0min             
Physical_model                          16h 0min            0h 0min             
Project_setup                           27h 30min           20h 0min   

Code example

For an easy usage there is a package available on PyPi.
To install pygltr, simply:

pip install pygltr

Now it's ready to use.

from pygltr.pygltr import PyGltr

pygltr = PyGltr(url='https://gitlab.com/api/v4/', token='PRIVATE_TOKEN', project_name='PROJECT_NAME')
user, project, issues = pygltr()

About

Python script to get GitLab Time Reports

Resources

License

Stars

6 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages