Generate a burndown chart (CSV + PNG) for a GitLab project milestone by reconstructing remaining work over time.
- Python 100%
| .gitignore | ||
| burndown.py | ||
| cli.py | ||
| gitlab_api.py | ||
| gitlab_milestone_burndown.py | ||
| LICENSE | ||
| models.py | ||
| README.md | ||
| utils.py | ||
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+
requestsmatplotlib
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)--startand--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.csvwith columns:date,remaining,ideal,added_that_day, andclosed_that_dayordone_that_dayPREFIX.pngburndown chart
Project layout
gitlab_milestone_burndown.pyentrypointcli.pyargument parsing and orchestrationgitlab_api.pyGitLab API callsburndown.pyburndown calculation and plottingmodels.pydataclassesutils.pytime helpers