Giter VIP home page Giter VIP logo

gitlab-report-generator's Introduction

Gitlab Report Generator

Description

This tool takes a issue list from gitlab, and allow to produce a markdown table with all these issues, and to apply different filters, an sorts to it. You can also select which columns will be displayed.

Cli reference

This generator can be used either by passing a JSON to stdin, or a file path as argument. It just can't do much yet.

Using file path

./gitlab-report-generator-exe --input-file <pathtofile>

Using stdin

# This actually only work with a maximum of 100 issues
curl --header "PRIVATE-TOKEN: <yourgitlabAPItoken>" "https://<GITLAB_INSTANCE>/api/v3/projects/<GROUPNAME/USERNAME>%2F<PROJECTNAME>/issues?per_page=100" 2> /dev/null| iconv -t UTF-8 | ./gitlab-report-generator-exe

Arguments: --input-file <file_path> open this file instead of using stdin --filters <filters> comma separated list of filters --sort-keys <keys> keys on which we should sort issues --columns <keys> fields to use as table headers

Sort

You can sort the output by providing the keys on which you want the output to be sorted. You can specify several keys, which will be used in order. Keys are provided as a comma separated list of strings.

Example:

  • "assignee.username,title" -> Will sort by assignee, and display in alphabetical order.
  • "assignee.username,#title" -> Will sort by assignee, and display in reverse alphabetical order.

Filters

You can apply filters on the issue list using the argument --filters. You can specify several filters as a comma separated list. The default is "".

Predefined

  • open
  • closed
  • assigned
  • unassigned
  • active
  • inactive

Dynamic

The parser support "dynamic" filters, which are basics expressions on the value of a field. It uses the stringified value of the field to produce the result. The defaut is "title".

Examples:

  • "id>4" --> Return all issues where id > 4
  • "id=4" --> Return all issues where id == 4
  • "id<4" --> Return all issues where id < 4
  • "id~4" --> Return all issues where id =! 4
  • "id>4,id<10" --> Return all issues where id > 4 and id < 10
  • "#id>4" --> Return all issues where not (id > 4)
  • "description~" --> Return all issues with empty description
  • "assignee.username=jbond" --> Return all issues assigned to jbond
  • "milestone=Nothing" --> Return all issues not linked to a milestone

Table headers

To select which fields are displayed in the table, use the --columns argument. It is a comma-separated list of strings. The default is "title,state".

Example:

  • "title,assignee.username,milestone.due_date" --> Display 3 columns

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.