Commit ea2c733
feat: weekly per-engineer PR metrics with additive migration (#49)
Adds weekly_pr_metrics table and gfa pr-metrics CLI command to aggregate
per-engineer PR activity (opens, merges, comments, reviews) by ISO week.
- New WeeklyPRMetrics ORM model keyed by (engineer_identifier, iso_week)
- _migrate_weekly_pr_metrics_v11() in _apply_migrations() — additive,
CREATE-IF-NOT-EXISTS so existing data is fully preserved
- gfa pr-metrics CLI with --week YYYY-WNN, --since YYYY-MM-DD, and
default-to-current-week; upsert semantics (re-runs are idempotent)
- reviewer list expansion for pr_reviews_given / pr_comments_given
- 17 tests: aggregation logic, week parsing, upsert idempotency,
migration safety (existing pull_request_cache rows survive migration)
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>1 parent 9f3a2da commit ea2c733
5 files changed
Lines changed: 881 additions & 1 deletion
File tree
- src/gitflow_analytics
- models
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
0 commit comments