Generate a burndown chart (CSV + PNG) for a GitLab project milestone by reconstructing remaining work over time.
Find a file
2026-02-17 14:44:41 +02:00
.gitignore Refactor codebase 2026-02-17 14:35:57 +02:00
burndown.py Add support for custom done label in burndown computation and CSV output 2026-02-17 14:39:07 +02:00
cli.py Add support for custom done label in burndown computation and CSV output 2026-02-17 14:39:07 +02:00
gitlab_api.py Add support for custom done label in burndown computation and CSV output 2026-02-17 14:39:07 +02:00
gitlab_milestone_burndown.py Refactor codebase 2026-02-17 14:35:57 +02:00
LICENSE Add LICENSE and README files for project documentation 2026-02-17 14:44:41 +02:00
models.py Refactor codebase 2026-02-17 14:35:57 +02:00
README.md Add LICENSE and README files for project documentation 2026-02-17 14:44:41 +02:00
utils.py Refactor codebase 2026-02-17 14:35:57 +02:00

GitLab Milestone Burndown

Generate a burndown chart (CSV + PNG) for a GitLab project milestone by reconstructing remaining work over time. Works on GitLab Free because it does not use burndown_events.

Requirements

  • Python 3.9+
  • requests
  • matplotlib

Install deps:

pip install requests matplotlib

Usage

Run via the entrypoint script:

python3 gitlab_milestone_burndown.py \
  --base-url "https://gitlab.com" \
  --project my-group/my-project \
  --milestone-iid 5 \
  --out-prefix burndown

Authentication

Provide a token with --token or set GITLAB_TOKEN.

export GITLAB_TOKEN=YOUR_TOKEN

If you need Bearer auth:

--auth-header Bearer

Done by label (instead of closed)

Use --done-label to treat an issue as done when a specific label is first applied. This uses the issue's label events.

python3 gitlab_milestone_burndown.py \
  --base-url "https://gitlab.example.com" \
  --project my-group/my-project \
  --milestone-iid 5 \
  --done-label Done \
  --out-prefix burndown

Options

  • --milestone-id / --milestone-iid / --milestone-title (required, one of them)
  • --start and --end (override date range, format: YYYY-MM-DD)
  • --weights (use issue weights; missing weight counts as 1)
  • --done-label (use label application time as done mark)
  • --out-prefix (writes PREFIX.csv and PREFIX.png)

Outputs

  • PREFIX.csv with columns: date, remaining, ideal, added_that_day, and closed_that_day or done_that_day
  • PREFIX.png burndown chart

Project layout

  • gitlab_milestone_burndown.py entrypoint
  • cli.py argument parsing and orchestration
  • gitlab_api.py GitLab API calls
  • burndown.py burndown calculation and plotting
  • models.py dataclasses
  • utils.py time helpers