Skip to content

Drupal-AI/ai-gitlab-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI GitLab Analytics

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.

Requirements

Setup

composer install
cp .env.example .env

Open .env and paste your token after GITLAB_TOKEN=:

GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx

The .env file is gitignored — your token never goes near a commit.

Run

php bin/export

On 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.

Exit codes

Code Meaning
0 Success
1 GITLAB_TOKEN missing or empty
2 Network or filesystem error
3 GitLab GraphQL returned an errors field

Design

The full design lives in docs/superpowers/specs/2026-04-29-gitlab-sprint-csv-export-design.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages