Skip to main content

Export various data sets from GitLab issues, projects and groups

Project description

gitlab-exporter

Python tool for the command line to export various data sets from GitLab like project issues and group milestone dates. Scales nicely due to an API built on submodules.

gitlab-exporter is based on argparse and uses python-gitlab under the hood.

Motivation

At TUHH we use GitLab CE a lot for project management. The Community Edition (CE) is missing some features that premium versions of GitLab have. As we want to stay independent with MIT licensed distribution of GitLab we have to implement the missing features ourselves.

It takes some time and patience to get all colleagues into working with GitLab. For many of them GitLab is not the tool that they open up first when they start working. Thus, some workarounds and helper functions can make their work more convenient and fun, as not all of them are coders.

gitlab-exporter is such a helper tool. Its purpose is to get data out off GitLab and locate it in your colleagues' personal digital environments like calendars, office programs and the like.

Installation

Requirements

You need at least on your system

  • Python 3.6.x
  • pandoc 2.x

Installation from Source

Go to the repository and grab the source.

Installation using Pip

gitlab-exporter is a Python tool that can easily be installed with pip.

pip install gitlab-exporter

After installation with pip you should be able to use the command gitlab-exporter in your shell.

Getting to know the API

To learn about the API of gitlab-exporter type

gitlab-exporter -h

after installation. There are and will be several submodules for different purposes. Learn about the API of these submodules simply typing e.g.

gitlab-exporter gmd -h

to get help for the submodule that exports group milestone dates to an ICS file.

Submodules and Examples

gitlab-exporter provides several submodules for different purposes.

gmd - group milestone dates

Exports dates and descriptions of milestones on the group level to an ICS file. You then can import this file into your calendar of choice.

Example:

gitlab-exporter https://my-gitlab.com A2DF6HE6R7C88C9AE gmd 1234 milestones.ics

The command consists of the GitLab instance, a private token, the submodule name, the group id and the file name of the ICS file.

pi - project issues

Exports issues belonging to a certain project to a CSV file.

gitlab-exporter https://my-gitlab.com A2DF6HE6R7C88C9AE gi 2345 issues.csv

The command consists of the GitLab instance, a private token, the submodule name, the project id and the CSV file name.

Automate the boring stuff with Docker

If you have the CI/CD component running with GitLab you can easily have Docker build your exports from GitLab.

Further documentation is on the way...

Tests

There are some, but they will be updated to pytest as soon as possible.

License

Copyright 2019 Axel Dürkop; Hamburg University of Technology (TUHH)

This piece of software is licensed under the Apache License, Version 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitlab-exporter-0.0.7.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

gitlab_exporter-0.0.7-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page