Skip to content

Commit a279fc9

Browse files
authored
Merge pull request #9 from youenchene/fix
feat: Add scoped processing for import and calculate commands
2 parents f42d357 + 9c8076a commit a279fc9

4 files changed

Lines changed: 406 additions & 323 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Current sources are :
1515

1616

1717
The tools is a CLI with three subcommands :
18-
- **import**: fetches issues and timelines from GitHub and writes raw CSVs to ./data - that you can reuse apart if you want to.
19-
- **calculate**: computes aggregates (cycle time, throughput, WIP stocks) and writes CSVs to ./data - that you can reuse apart if you want to.
18+
- **import**: fetches data from GitHub and writes raw CSVs to ./data. You can scope what is imported with `--issues` and/or `--pr`.
19+
- **calculate**: computes aggregates and writes CSVs to ./data. You can scope what is calculated with `--issues` and/or `--pr`.
2020
- **web**: launch web dashboard.
2121

2222
[View full size image](docs/screen-v0.1.png)
@@ -90,13 +90,33 @@ GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . import
9090
# Import with filters
9191
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . import -since 2025-01-01 -repo repoA,repoB
9292

93+
# Import only issues scope (issues + timelines + project moves)
94+
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . import --issues
95+
96+
# Import only PR scope (pull requests + reviews for change requests)
97+
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . import --pr
98+
99+
# Import both scopes explicitly (default when no scope is provided)
100+
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . import --issues --pr
101+
93102
# Calculate KPIs (requires config file for project column mappings)
94103
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . calculate
95104

105+
# Calculate only issue-based KPIs (lead/cycle times, throughput, stocks)
106+
GITHUB_TOKEN=ghp_xxx CONFIG_PATH=./config.yml go run . calculate --issues
107+
108+
# Calculate only PR change-requests KPIs (weekly, per-repo)
109+
GITHUB_TOKEN=ghp_xxx go run . calculate --pr
110+
96111
# Serve the dashboard
97112
GITHUB_TOKEN=ghp_xxx go run . web -addr :8080 -data ./data -ui ./ui/dist
98113
```
99114

115+
Notes about scopes:
116+
- `--issues` scope handles issues, status timelines, and project moves; these power lead/cycle time, throughput, and stocks.
117+
- `--pr` scope is only about pull requests and change requests (reviews with CHANGES_REQUESTED) and powers the PR charts.
118+
- If you omit both flags, both scopes are processed (backward compatible default).
119+
100120
## How to run - developer mode
101121

102122
### Prequisites

0 commit comments

Comments
 (0)