A small PHP/Composer script that exports every issue labelled AI Initiative Sprint from git.drupalcode.org to a timestamped CSV under output/.
The CSV has eight columns: id, title, state, status, category, updated, created, url. state is the suffix of the issue's state::* scoped label (e.g. Active); status is GitLab's native issue state (opened, closed, locked); category is AI Product Development, AI Innovation, both (joined with |), or empty.
- PHP 8.1+
- Composer
- A personal access token for
git.drupalcode.orgwith theread_apiscope. Tokens from gitlab.com will not work. Generate one at: https://git.drupalcode.org/-/user_settings/personal_access_tokens
composer install
cp .env.example .envOpen .env and paste your token after GITLAB_TOKEN=:
GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx
The .env file is gitignored — your token never goes near a commit.
php bin/exportOn success it prints the path of the CSV that was written, e.g.:
Wrote /path/to/output/ai-initiative-sprint-2026-04-29-143052.csv
Each run produces a new file (date and time in the filename), so repeat runs never overwrite each other. The output/ directory is gitignored except for .gitkeep, so generated CSVs stay out of git.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | GITLAB_TOKEN missing or empty |
| 2 | Network or filesystem error |
| 3 | GitLab GraphQL returned an errors field |
The full design lives in docs/superpowers/specs/2026-04-29-gitlab-sprint-csv-export-design.md.