Skip to main content

gitlab-projects-issues

Release Python Downloads License
Build Bugs Code Smells Coverage Lines of Code Quality Gate Status
pre-commit Commitizen friendly gcil pre-commit-crocodile guidelines

Generate GitLab project issues and milestones statistics automatically

Documentation: https://radiandevcore.gitlab.io/tools/gitlab-projects-issues
Package: https://pypi.org/project/gitlab-projects-issues/


Purpose

This tool can automatically generate issues and milestones statistics,
by analyzing project's issues, detecting milestones and assignees.

If issues without time estimations are found, ~? will be shown before time outputs.

Milestone statistics will automatically be injected in the milestone description,
with a markdown table of assignees, timings, progress and issues total.

The following step is required before using the tool:

  • The GitLab user tokens must be created with an api scope (a short expiration date is recommended)

Examples

# Show the helper menu
gitlab-projects-issues

# Inject milestones statistics into milestones' description
gitlab-projects-issues --milestones-statistics 'https://gitlab.com/group/project'

# Inject milestones statistics into milestones' description (with default 20h time per unestimated issues)
gitlab-projects-issues --milestones-statistics --default-estimate '20' 'https://gitlab.com/group/project'

Outputs

Milestones statistics will automatically be added to each milestone's description.

The following example shows how milestones statistics may look on a project:

Milestone statistics - MILESTONE NAME

Assignees Issues Estimated Spent Remaining Progress
Without assignee 10 18d 18d / ██████████ 100.00%
User ONE 22 42d 5d 37d █▂▁▁▁▁▁▁▁▁ 11.90%
User TWO 29 50d 2h 20d 6h 29d 4h ████▂▁▁▁▁▁ 41.29%
User THREE 7 9d 2h 3d 4h 5d 6h ███▅▁▁▁▁▁▁ 37.84%
User FOUR 6 21d / 21d ▁▁▁▁▁▁▁▁▁▁ 0.00%
Total 74 135d 4h 47d 2h 93d 2h ███▄▁▁▁▁▁▁ 34.87%

Last update using gitlab-projects-issues : 2024-06-01 19:38:48 UTC


Usage

usage: gitlab-projects-issues [-h] [--version] [--no-color] [--update-check] [--settings] [--set GROUP KEY VAL]
                              [-c FILES] [--dump] [--default-estimate ESTIMATE] [--exclude-closed-issues]
                              [--milestone MILESTONE] [--create-milestone | --get-milestone | --milestones-statistics]
                              [--exclude-closed-milestones] [--ignore-issues-without-milestone]
                              [--set-milestone-description TEXT] [--set-milestone-state STATE]
                              [--set-milestone-start-date DATE] [--set-milestone-due-date DATE] [--]
                              [url_path]

gitlab-projects-issues: Generate GitLab project issues and milestones statistics automatically

internal arguments:
  -h, --help                         # Show this help message
  --version                          # Show the current version
  --no-color                         # Disable colors outputs with 'NO_COLOR=1'
                                     # (or default settings: [themes] > no_color)
  --update-check                     # Check for newer package updates
  --settings                         # Show the current settings path and contents
  --set GROUP KEY VAL                # Set settings specific 'VAL' value to [GROUP] > KEY
                                     # or unset by using 'UNSET' as 'VAL'

credentials arguments:
  -c FILES, --config FILES           # Python GitLab configuration files (default: PYTHON_GITLAB_CFG environment)

common arguments:
  --dump                             # Dump Python objects of projects

issues arguments:
  --default-estimate ESTIMATE        # Default issue time estimate if none providedin hours (default: 8)
  --exclude-closed-issues            # Exclude issues in closed state

milestones arguments:
  --milestone MILESTONE              # Use a specific milestone by name, by ID, or "None"
  --create-milestone                 # Create a new milestone
  --get-milestone                    # Get existing milestone
  --milestones-statistics            # Inject milestones statistics into milestones description
  --exclude-closed-milestones        # Exclude milestones in closed state
  --ignore-issues-without-milestone  # Ignore issues without a milestone
  --set-milestone-description TEXT   # Set milestone description
  --set-milestone-state STATE        # Set milestone state [activate,close]
  --set-milestone-start-date DATE    # Set milestone start date
  --set-milestone-due-date DATE      # Set milestone due date

positional arguments:
  --                                 # Positional arguments separator (recommended)
  url_path                           # GitLab project path URL

environment variables:
  GITLAB_TOKEN                       # GitLab API token environment variable
  CI_JOB_TOKEN                       # GitLab CI job token environment variable (CI only)

Python GitLab configuration file

gitlab-projects-issues uses the same configuration files as the python-gitlab API,
holding domains, URL and private tokens credentials for the GitLab instances.

The default user configuration file can be created at ~/.python-gitlab.cfg.

The -c or --config parameters can provide specific configuration files,
otherwise the PYTHON_GITLAB_CFG environment variable can be used.

Example ~/.python-gitlab.cfg configuration file:

[global]
default = gitlab.com
ssl_verify = true
timeout = 5

[gitlab.com]
url = https://gitlab.com
private_token = glpat-...

[gitlab.local.dev]
url = https://gitlab.local.dev
private_token = glpat-...

[gitlab.private.dev:4243]
url = https://gitlab.private.dev:4243
private_token = glpat-...
ssl_verify = /usr/local/share/ca-certificates/gitlab.private.dev.crt

python-gitlab configuration files documentation: Getting started with the CLI / Configuration files


Userspace available settings

gitlab-projects-issues creates a settings.ini configuration file in a userspace folder.

For example, it allows to disable the automated updates daily check ([updates] > enabled)

The settings.ini file location and contents can be shown with the following command:

gitlab-projects-issues --settings

Environment available configurations

gitlab-projects-issues uses colored for colors outputs.

If colors of both outputs types do not match the terminal's theme,
an environment variable NO_COLOR=1 can be defined to disable colors.


Dependencies


References

Download files

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

Source Distribution

gitlab_projects_issues-4.2.0.tar.gz (74.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlab_projects_issues-4.2.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_projects_issues-4.2.0.tar.gz.

File metadata

  • Download URL: gitlab_projects_issues-4.2.0.tar.gz
  • Upload date:
  • Size: 74.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.15

File hashes

Hashes for gitlab_projects_issues-4.2.0.tar.gz
Algorithm Hash digest
SHA256 6e66d9f49d0896488b57d73fb4d7738a0c1c83bdca5b36883507ac5bd3af57e9
MD5 f42ce381ee934c28b3afb0c31e5b9c79
BLAKE2b-256 05ffa5f4ed82d1136518018f52aa4a009193f6f875497098697bf5fb23a16470

See more details on using hashes here.

File details

Details for the file gitlab_projects_issues-4.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gitlab_projects_issues-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ca959671f3d829dc11189d53378c2e70098d1811b2fccb915f597c6528e29d
MD5 6fc4a327fc083c4abc818fb6032e42f2
BLAKE2b-256 54cd7fc6fd877cf11bb0bff32cf7e4ed8b0564acc198a67c90eb1f2b74c0b3fa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.2.0 This release

2 files

4.1.0

2 files

4.0.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

2.2.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page