@0xbigboss/gh-pulse 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/src/index.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xbigboss/gh-pulse",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"description": "GitHub analytics CLI for engineering visibility - PR metrics, contribution stats, team health",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -21,6 +22,6 @@
|
|
|
21
22
|
"bun": ">=1.0.0"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@0xbigboss/gh-pulse-core": "^1.
|
|
25
|
+
"@0xbigboss/gh-pulse-core": "^1.1.0"
|
|
25
26
|
}
|
|
26
27
|
}
|
package/src/index.ts
CHANGED
|
@@ -95,6 +95,7 @@ async function main(): Promise<void> {
|
|
|
95
95
|
|
|
96
96
|
const config = await loadConfig(args.configPath ? { path: args.configPath } : {})
|
|
97
97
|
const github = new GitHubClient({ token: config.github_token })
|
|
98
|
+
const cache = await Cache.open({ path: config.cache.path })
|
|
98
99
|
|
|
99
100
|
const target = await resolveTarget(args.forTarget, github)
|
|
100
101
|
const orgOverrides = args.orgs
|
|
@@ -113,21 +114,22 @@ async function main(): Promise<void> {
|
|
|
113
114
|
const repos = await resolveRepos({
|
|
114
115
|
config,
|
|
115
116
|
github,
|
|
117
|
+
cache,
|
|
116
118
|
orgs: orgOverrides,
|
|
117
119
|
repoPatterns,
|
|
118
120
|
strict: true,
|
|
121
|
+
forceSync: args.sync,
|
|
119
122
|
...(onProgress ? { onProgress } : {}),
|
|
120
123
|
})
|
|
121
124
|
|
|
122
125
|
if (repos.length === 0) {
|
|
123
126
|
console.log('No repositories matched the current configuration.')
|
|
127
|
+
cache.close()
|
|
124
128
|
return
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
const now = new Date()
|
|
128
132
|
const timeRange = resolveTimeRange(args, config.timezone, now)
|
|
129
|
-
|
|
130
|
-
const cache = await Cache.open({ path: config.cache.path })
|
|
131
133
|
try {
|
|
132
134
|
await syncRepos({
|
|
133
135
|
repos,
|
|
@@ -154,6 +156,7 @@ async function main(): Promise<void> {
|
|
|
154
156
|
stale_days: config.thresholds.stale_days,
|
|
155
157
|
stuck_days: config.thresholds.stuck_days,
|
|
156
158
|
large_pr_lines: config.thresholds.large_pr_lines ?? 500,
|
|
159
|
+
blocker_max_age_days: config.thresholds.blocker_max_age_days,
|
|
157
160
|
},
|
|
158
161
|
...(target.user ? { subjectUser: target.user } : {}),
|
|
159
162
|
}
|