gh-tuner 0.1.3
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/README.md +94 -0
- package/bin/gh-tuner.js +2 -0
- package/dist/browser.d.ts +10 -0
- package/dist/browser.js +37 -0
- package/dist/browser.js.map +1 -0
- package/dist/config.d.ts +23 -0
- package/dist/config.js +40 -0
- package/dist/config.js.map +1 -0
- package/dist/filters.d.ts +18 -0
- package/dist/filters.js +55 -0
- package/dist/filters.js.map +1 -0
- package/dist/github.d.ts +21 -0
- package/dist/github.js +86 -0
- package/dist/github.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +152 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +22 -0
- package/dist/output.js +98 -0
- package/dist/output.js.map +1 -0
- package/dist/schedule.d.ts +4 -0
- package/dist/schedule.js +65 -0
- package/dist/schedule.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# gh-tuner
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This is a personal tool. Contributions are not accepted.
|
|
5
|
+
|
|
6
|
+
Delta-based issue triage and PR review summaries for OSS maintainers.
|
|
7
|
+
|
|
8
|
+
gh-tuner scans your GitHub repos, filters out noise, and generates a structured
|
|
9
|
+
markdown checklist of what needs your attention — aligned to your review schedule.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone git@github.com:awanlin/gh-tuner.git
|
|
15
|
+
cd gh-tuner
|
|
16
|
+
yarn install
|
|
17
|
+
yarn build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Issue triage (auto-detects delta window on Tue/Thu)
|
|
24
|
+
gh-tuner issues
|
|
25
|
+
|
|
26
|
+
# PR review checklist (auto-detects delta window on Fri)
|
|
27
|
+
gh-tuner prs
|
|
28
|
+
|
|
29
|
+
# Both
|
|
30
|
+
gh-tuner all
|
|
31
|
+
|
|
32
|
+
# Override delta window
|
|
33
|
+
gh-tuner issues --since 2026-07-01
|
|
34
|
+
|
|
35
|
+
# Save to file without opening browser
|
|
36
|
+
gh-tuner issues --no-open --output summary.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
Create a `gh-tuner.yaml` in your project root:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
user: your-github-username
|
|
45
|
+
startDate: 2026-07-07
|
|
46
|
+
|
|
47
|
+
repos:
|
|
48
|
+
- name: org/repo
|
|
49
|
+
scope: all # fetch all issues/PRs
|
|
50
|
+
cadence: weekly # weekly | biweekly | monthly
|
|
51
|
+
- name: org/other-repo
|
|
52
|
+
scope: filtered # only items involving you + label matches
|
|
53
|
+
labels:
|
|
54
|
+
- area:search
|
|
55
|
+
- area:docs
|
|
56
|
+
|
|
57
|
+
schedule:
|
|
58
|
+
tuesday:
|
|
59
|
+
mode: issues
|
|
60
|
+
since: last-thursday
|
|
61
|
+
thursday:
|
|
62
|
+
mode: issues
|
|
63
|
+
since: last-tuesday
|
|
64
|
+
friday:
|
|
65
|
+
mode: prs
|
|
66
|
+
since: last-friday
|
|
67
|
+
|
|
68
|
+
securityKeywords:
|
|
69
|
+
- security
|
|
70
|
+
- CVE
|
|
71
|
+
- GHSA
|
|
72
|
+
|
|
73
|
+
filters:
|
|
74
|
+
humanEngagementOnly: true # only surface human comments, not system activity
|
|
75
|
+
excludeAwaitingOthers: true # skip items where you're the last commenter
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Requirements
|
|
79
|
+
|
|
80
|
+
- Node.js 22 or 24 (LTS versions only — pinned via `.nvmrc` to 24)
|
|
81
|
+
- [GitHub CLI](https://cli.github.com/) (`gh`) authenticated
|
|
82
|
+
|
|
83
|
+
## CI
|
|
84
|
+
|
|
85
|
+
A GitHub Actions workflow (`.github/workflows/CI.yml`) runs on every pull request to `main`. It tests against Node 22 and 24 and runs:
|
|
86
|
+
|
|
87
|
+
1. **Type check** — `yarn build`
|
|
88
|
+
2. **Lint** — `yarn lint` (ESLint with typescript-eslint)
|
|
89
|
+
3. **Format check** — `yarn format:check` (Prettier)
|
|
90
|
+
4. **Tests** — `yarn test` (Vitest)
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT
|
package/bin/gh-tuner.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GitHubItem } from './github.js';
|
|
2
|
+
export interface OpenResult {
|
|
3
|
+
opened: number;
|
|
4
|
+
capped: boolean;
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function openItems(items: GitHubItem[], opts?: {
|
|
8
|
+
openAll?: boolean;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
}): Promise<OpenResult>;
|
package/dist/browser.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
const BATCH_SIZE = 10;
|
|
3
|
+
const AUTO_OPEN_THRESHOLD = 15;
|
|
4
|
+
const CAP_THRESHOLD = 50;
|
|
5
|
+
const CAP_LIMIT = 25;
|
|
6
|
+
const BATCH_DELAY_MS = 1500;
|
|
7
|
+
function sleep(ms) {
|
|
8
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
9
|
+
}
|
|
10
|
+
export async function openItems(items, opts = {}) {
|
|
11
|
+
const total = items.length;
|
|
12
|
+
if (total === 0) {
|
|
13
|
+
return { opened: 0, capped: false, total: 0 };
|
|
14
|
+
}
|
|
15
|
+
let toOpen = items;
|
|
16
|
+
let capped = false;
|
|
17
|
+
if (!opts.openAll && total > CAP_THRESHOLD) {
|
|
18
|
+
console.log(chalk.yellow(`Found ${total} items — opening the first ${CAP_LIMIT} (security + newest). Use --open-all to override.`));
|
|
19
|
+
toOpen = items.slice(0, CAP_LIMIT);
|
|
20
|
+
capped = true;
|
|
21
|
+
}
|
|
22
|
+
else if (total > AUTO_OPEN_THRESHOLD) {
|
|
23
|
+
console.log(chalk.blue(`Found ${total} items — opening all in batches of ${BATCH_SIZE}.`));
|
|
24
|
+
}
|
|
25
|
+
if (!opts.dryRun) {
|
|
26
|
+
const openModule = await import('open');
|
|
27
|
+
for (let i = 0; i < toOpen.length; i += BATCH_SIZE) {
|
|
28
|
+
const batch = toOpen.slice(i, i + BATCH_SIZE);
|
|
29
|
+
await Promise.all(batch.map((item) => openModule.default(item.url)));
|
|
30
|
+
if (i + BATCH_SIZE < toOpen.length) {
|
|
31
|
+
await sleep(BATCH_DELAY_MS);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { opened: toOpen.length, capped, total };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,KAAmB,EACnB,OAAgD,EAAE;IAElD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IAE3B,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,K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EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAClD,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface RepoConfig {
|
|
2
|
+
name: string;
|
|
3
|
+
scope: 'all' | 'filtered';
|
|
4
|
+
cadence?: 'weekly' | 'biweekly' | 'monthly';
|
|
5
|
+
labels?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface ScheduleEntry {
|
|
8
|
+
mode: 'issues' | 'prs';
|
|
9
|
+
since: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FilterConfig {
|
|
12
|
+
humanEngagementOnly: boolean;
|
|
13
|
+
excludeAwaitingOthers: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TunerConfig {
|
|
16
|
+
user: string;
|
|
17
|
+
startDate: string;
|
|
18
|
+
repos: RepoConfig[];
|
|
19
|
+
schedule: Record<string, ScheduleEntry>;
|
|
20
|
+
securityKeywords: string[];
|
|
21
|
+
filters: FilterConfig;
|
|
22
|
+
}
|
|
23
|
+
export declare function loadConfig(configPath: string): TunerConfig;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { parse } from 'yaml';
|
|
3
|
+
export function loadConfig(configPath) {
|
|
4
|
+
const raw = readFileSync(configPath, 'utf-8');
|
|
5
|
+
const parsed = parse(raw);
|
|
6
|
+
if (!parsed.user) {
|
|
7
|
+
throw new Error('Config missing required field: user');
|
|
8
|
+
}
|
|
9
|
+
if (!parsed.startDate) {
|
|
10
|
+
throw new Error('Config missing required field: startDate');
|
|
11
|
+
}
|
|
12
|
+
if (!Array.isArray(parsed.repos)) {
|
|
13
|
+
throw new Error('Config missing required field: repos');
|
|
14
|
+
}
|
|
15
|
+
if (!parsed.schedule || typeof parsed.schedule !== 'object') {
|
|
16
|
+
throw new Error('Config missing required field: schedule');
|
|
17
|
+
}
|
|
18
|
+
if (!parsed.filters || typeof parsed.filters !== 'object') {
|
|
19
|
+
throw new Error('Config missing required field: filters');
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
user: parsed.user,
|
|
23
|
+
startDate: parsed.startDate,
|
|
24
|
+
repos: parsed.repos.map((r) => {
|
|
25
|
+
const repo = { name: r.name, scope: r.scope };
|
|
26
|
+
if (r.cadence)
|
|
27
|
+
repo.cadence = r.cadence;
|
|
28
|
+
if (r.labels)
|
|
29
|
+
repo.labels = r.labels;
|
|
30
|
+
return repo;
|
|
31
|
+
}),
|
|
32
|
+
schedule: parsed.schedule,
|
|
33
|
+
securityKeywords: parsed.securityKeywords ?? [],
|
|
34
|
+
filters: {
|
|
35
|
+
humanEngagementOnly: parsed.filters.humanEngagementOnly ?? true,
|
|
36
|
+
excludeAwaitingOthers: parsed.filters.excludeAwaitingOthers ?? true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AA4B7B,MAAM,UAAU,UAAU,CAAC,UAAkB;IAC3C,MAAM,GAAG,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,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';
|
|
3
|
+
export declare function isBot(author: string): boolean;
|
|
4
|
+
export declare function hasHumanEngagement(item: GitHubItem, since: string): boolean;
|
|
5
|
+
export declare function isAwaitingOthers(item: GitHubItem, user: string): boolean;
|
|
6
|
+
export declare function hasSecurityKeyword(item: GitHubItem, keywords: string[]): boolean;
|
|
7
|
+
export interface FilterResult {
|
|
8
|
+
items: GitHubItem[];
|
|
9
|
+
security: GitHubItem[];
|
|
10
|
+
excludedAwaiting: number;
|
|
11
|
+
excludedSystem: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function applyFilters(items: GitHubItem[], opts: {
|
|
14
|
+
since: string;
|
|
15
|
+
user: string;
|
|
16
|
+
filters: FilterConfig;
|
|
17
|
+
securityKeywords: string[];
|
|
18
|
+
}): FilterResult;
|
package/dist/filters.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const KNOWN_BOTS = new Set([
|
|
2
|
+
'github-actions',
|
|
3
|
+
'backstage-service',
|
|
4
|
+
'copilot-pull-request-reviewer',
|
|
5
|
+
]);
|
|
6
|
+
export function isBot(author) {
|
|
7
|
+
if (author.endsWith('[bot]'))
|
|
8
|
+
return true;
|
|
9
|
+
return KNOWN_BOTS.has(author);
|
|
10
|
+
}
|
|
11
|
+
export function hasHumanEngagement(item, since) {
|
|
12
|
+
const sinceDate = new Date(since);
|
|
13
|
+
return item.comments.some((c) => !isBot(c.author) && new Date(c.createdAt) > sinceDate);
|
|
14
|
+
}
|
|
15
|
+
export function isAwaitingOthers(item, user) {
|
|
16
|
+
const humanComments = item.comments.filter((c) => !isBot(c.author));
|
|
17
|
+
if (humanComments.length === 0)
|
|
18
|
+
return false;
|
|
19
|
+
const last = humanComments[humanComments.length - 1];
|
|
20
|
+
return last.author === user;
|
|
21
|
+
}
|
|
22
|
+
export function hasSecurityKeyword(item, keywords) {
|
|
23
|
+
const text = `${item.title} ${item.comments.map((c) => c.body).join(' ')}`.toLowerCase();
|
|
24
|
+
return keywords.some((kw) => text.includes(kw.toLowerCase()));
|
|
25
|
+
}
|
|
26
|
+
export function applyFilters(items, opts) {
|
|
27
|
+
const security = [];
|
|
28
|
+
const kept = [];
|
|
29
|
+
let excludedAwaiting = 0;
|
|
30
|
+
let excludedSystem = 0;
|
|
31
|
+
for (const item of items) {
|
|
32
|
+
const isSecurity = hasSecurityKeyword(item, opts.securityKeywords);
|
|
33
|
+
if (isSecurity) {
|
|
34
|
+
security.push(item);
|
|
35
|
+
}
|
|
36
|
+
const isNew = new Date(item.createdAt) > new Date(opts.since);
|
|
37
|
+
if (isNew) {
|
|
38
|
+
if (!isSecurity)
|
|
39
|
+
kept.push(item);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (opts.filters.humanEngagementOnly && !hasHumanEngagement(item, opts.since)) {
|
|
43
|
+
excludedSystem++;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (opts.filters.excludeAwaitingOthers && isAwaitingOthers(item, opts.user)) {
|
|
47
|
+
excludedAwaiting++;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (!isSecurity)
|
|
51
|
+
kept.push(item);
|
|
52
|
+
}
|
|
53
|
+
return { items: kept, security, excludedAwaiting, excludedSystem };
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../src/filters.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACzB,gBAAgB;IAChB,mBAAmB;IACnB,+BAA+B;CAChC,CAAC,CAAC;AAEH,MAAM,UAAU,KAAK,CAAC,MAAc;IAClC,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAgB,EAAE,KAAa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C,CAAC;IACzB,IAAI,cAAc,GAAG,CAAC,CAAC;IAEvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACnE,IAAI,UAAU,EAAE,CAAC;YACf,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAE9D,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,UAAU;gBAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjC,SAAS;QACX,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,mBAAmB,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9E,cAAc,EAAE,CAAC;YACjB,SAAS;QACX,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,qBAAqB,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5E,gBAAgB,EAAE,CAAC;YACnB,SAAS;QACX,CAAC;QAED,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/github.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface GitHubComment {
|
|
2
|
+
author: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
body: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GitHubItem {
|
|
7
|
+
number: number;
|
|
8
|
+
title: string;
|
|
9
|
+
url: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
labels: string[];
|
|
13
|
+
author: string;
|
|
14
|
+
state: string;
|
|
15
|
+
isPr: boolean;
|
|
16
|
+
comments: GitHubComment[];
|
|
17
|
+
}
|
|
18
|
+
export declare function ghExec(args: string[]): string;
|
|
19
|
+
export declare function fetchIssues(repo: string, since: string): GitHubItem[];
|
|
20
|
+
export declare function fetchPrs(repo: string, since: string): GitHubItem[];
|
|
21
|
+
export declare function fetchComments(repo: string, number: number): GitHubComment[];
|
package/dist/github.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
export function ghExec(args) {
|
|
3
|
+
return execSync(`gh ${args.join(' ')}`, {
|
|
4
|
+
encoding: 'utf-8',
|
|
5
|
+
timeout: 30_000,
|
|
6
|
+
}).trim();
|
|
7
|
+
}
|
|
8
|
+
const ISSUE_FIELDS = 'number,title,url,createdAt,updatedAt,labels,author,state';
|
|
9
|
+
const PR_FIELDS = 'number,title,url,createdAt,updatedAt,labels,author,state,reviewDecision,statusCheckRollup';
|
|
10
|
+
function mapItem(item, isPr) {
|
|
11
|
+
return {
|
|
12
|
+
number: item.number,
|
|
13
|
+
title: item.title,
|
|
14
|
+
url: item.url,
|
|
15
|
+
createdAt: item.createdAt,
|
|
16
|
+
updatedAt: item.updatedAt,
|
|
17
|
+
labels: (item.labels ?? []).map((l) => l.name),
|
|
18
|
+
author: item.author?.login ?? 'unknown',
|
|
19
|
+
state: item.state,
|
|
20
|
+
isPr,
|
|
21
|
+
comments: [],
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function fetchIssues(repo, since) {
|
|
25
|
+
const sinceDate = since.slice(0, 10);
|
|
26
|
+
const raw = ghExec([
|
|
27
|
+
'issue',
|
|
28
|
+
'list',
|
|
29
|
+
'--repo',
|
|
30
|
+
repo,
|
|
31
|
+
'--state',
|
|
32
|
+
'open',
|
|
33
|
+
'--limit',
|
|
34
|
+
'200',
|
|
35
|
+
'--json',
|
|
36
|
+
ISSUE_FIELDS,
|
|
37
|
+
'--search',
|
|
38
|
+
`updated:>=${sinceDate}`,
|
|
39
|
+
]);
|
|
40
|
+
if (!raw)
|
|
41
|
+
return [];
|
|
42
|
+
return JSON.parse(raw).map((item) => mapItem(item, false));
|
|
43
|
+
}
|
|
44
|
+
export function fetchPrs(repo, since) {
|
|
45
|
+
const sinceDate = since.slice(0, 10);
|
|
46
|
+
const raw = ghExec([
|
|
47
|
+
'pr',
|
|
48
|
+
'list',
|
|
49
|
+
'--repo',
|
|
50
|
+
repo,
|
|
51
|
+
'--state',
|
|
52
|
+
'open',
|
|
53
|
+
'--limit',
|
|
54
|
+
'200',
|
|
55
|
+
'--json',
|
|
56
|
+
PR_FIELDS,
|
|
57
|
+
'--search',
|
|
58
|
+
`updated:>=${sinceDate}`,
|
|
59
|
+
]);
|
|
60
|
+
if (!raw)
|
|
61
|
+
return [];
|
|
62
|
+
return JSON.parse(raw).map((item) => mapItem(item, true));
|
|
63
|
+
}
|
|
64
|
+
export function fetchComments(repo, number) {
|
|
65
|
+
const raw = ghExec([
|
|
66
|
+
'api',
|
|
67
|
+
`repos/${repo}/issues/${number}/comments`,
|
|
68
|
+
'--paginate',
|
|
69
|
+
'--jq',
|
|
70
|
+
'.[].login = .user.login',
|
|
71
|
+
]);
|
|
72
|
+
if (!raw)
|
|
73
|
+
return [];
|
|
74
|
+
try {
|
|
75
|
+
const items = JSON.parse(`[${raw.split('\n').filter(Boolean).join(',')}]`).flat();
|
|
76
|
+
return items.map((c) => ({
|
|
77
|
+
author: c.user?.login ?? 'unknown',
|
|
78
|
+
createdAt: c.created_at,
|
|
79
|
+
body: c.body ?? '',
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1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O,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACvB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,IAAI,SAAS;YAClC,SAAS,EAAE,CAAC,CAAC,UAAU;YACvB,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE;SACnB,CAAC,CAAC,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { writeFileSync } from 'node:fs';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { loadConfig } from './config.js';
|
|
5
|
+
import { getScheduleForDay, resolveSince, isRepoIncluded } from './schedule.js';
|
|
6
|
+
import { fetchIssues, fetchPrs, fetchComments } from './github.js';
|
|
7
|
+
import { applyFilters, hasSecurityKeyword } from './filters.js';
|
|
8
|
+
import { generateMarkdown, formatAge } from './output.js';
|
|
9
|
+
import { openItems } from './browser.js';
|
|
10
|
+
async function run(mode, opts) {
|
|
11
|
+
const cfg = loadConfig(opts.config);
|
|
12
|
+
const today = new Date();
|
|
13
|
+
let sinceDate;
|
|
14
|
+
if (opts.since) {
|
|
15
|
+
sinceDate = new Date(opts.since);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
const entry = getScheduleForDay(cfg.schedule, today);
|
|
19
|
+
if (!entry) {
|
|
20
|
+
console.error(chalk.red(`No schedule entry for ${today.toLocaleDateString('en-US', { weekday: 'long' })}. Use --since to specify a date.`));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
sinceDate = resolveSince(entry.since, today);
|
|
24
|
+
}
|
|
25
|
+
const sinceStr = sinceDate.toISOString().slice(0, 10);
|
|
26
|
+
console.log(chalk.blue(`gh-tuner — ${mode} mode`));
|
|
27
|
+
console.log(chalk.blue(`Since: ${sinceStr}`));
|
|
28
|
+
const includedRepos = [];
|
|
29
|
+
let skipped = 0;
|
|
30
|
+
for (const repo of cfg.repos) {
|
|
31
|
+
if (isRepoIncluded(repo, cfg.startDate, today)) {
|
|
32
|
+
includedRepos.push(repo);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
skipped++;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
console.log(chalk.blue(`Repos: ${includedRepos.length} included, ${skipped} skipped`));
|
|
39
|
+
const allNewItems = [];
|
|
40
|
+
const allUpdatedItems = [];
|
|
41
|
+
const allSecurity = [];
|
|
42
|
+
let totalExcludedAwaiting = 0;
|
|
43
|
+
let totalExcludedSystem = 0;
|
|
44
|
+
for (const repo of includedRepos) {
|
|
45
|
+
console.log(chalk.gray(` Fetching ${repo.name}...`));
|
|
46
|
+
let items = [];
|
|
47
|
+
if (mode === 'issues' || mode === 'all') {
|
|
48
|
+
items.push(...fetchIssues(repo.name, sinceStr));
|
|
49
|
+
}
|
|
50
|
+
if (mode === 'prs' || mode === 'all') {
|
|
51
|
+
items.push(...fetchPrs(repo.name, sinceStr));
|
|
52
|
+
}
|
|
53
|
+
if (repo.scope === 'filtered' && repo.labels) {
|
|
54
|
+
items = items.filter((item) => item.labels.some((l) => repo.labels.includes(l)) ||
|
|
55
|
+
item.author === cfg.user ||
|
|
56
|
+
item.labels.includes(`involves:${cfg.user}`));
|
|
57
|
+
}
|
|
58
|
+
for (const item of items) {
|
|
59
|
+
item.comments = fetchComments(repo.name, item.number);
|
|
60
|
+
}
|
|
61
|
+
const newItems = items.filter((i) => new Date(i.createdAt) > sinceDate);
|
|
62
|
+
const updatedItems = items.filter((i) => new Date(i.createdAt) <= sinceDate);
|
|
63
|
+
for (const item of newItems) {
|
|
64
|
+
if (hasSecurityKeyword(item, cfg.securityKeywords)) {
|
|
65
|
+
allSecurity.push(item);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
allNewItems.push(...newItems);
|
|
69
|
+
const filtered = applyFilters(updatedItems, {
|
|
70
|
+
since: sinceStr,
|
|
71
|
+
user: cfg.user,
|
|
72
|
+
filters: cfg.filters,
|
|
73
|
+
securityKeywords: cfg.securityKeywords,
|
|
74
|
+
});
|
|
75
|
+
allUpdatedItems.push(...filtered.items);
|
|
76
|
+
allSecurity.push(...filtered.security);
|
|
77
|
+
totalExcludedAwaiting += filtered.excludedAwaiting;
|
|
78
|
+
totalExcludedSystem += filtered.excludedSystem;
|
|
79
|
+
}
|
|
80
|
+
const areaStats = computeAreaStats(cfg, allNewItems, allUpdatedItems, allSecurity, today);
|
|
81
|
+
const summaryInput = {
|
|
82
|
+
mode,
|
|
83
|
+
generatedDate: today,
|
|
84
|
+
sinceDate,
|
|
85
|
+
reposScanned: includedRepos.length,
|
|
86
|
+
reposSkipped: skipped,
|
|
87
|
+
newItems: allNewItems,
|
|
88
|
+
updatedItems: allUpdatedItems,
|
|
89
|
+
security: allSecurity,
|
|
90
|
+
excludedAwaiting: totalExcludedAwaiting,
|
|
91
|
+
excludedSystem: totalExcludedSystem,
|
|
92
|
+
areaStats,
|
|
93
|
+
};
|
|
94
|
+
const markdown = generateMarkdown(summaryInput);
|
|
95
|
+
if (opts.output) {
|
|
96
|
+
writeFileSync(opts.output, markdown);
|
|
97
|
+
console.log(chalk.green(`Summary written to ${opts.output}`));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
console.log(markdown);
|
|
101
|
+
}
|
|
102
|
+
if (opts.open) {
|
|
103
|
+
const allItems = [...allSecurity, ...allNewItems, ...allUpdatedItems];
|
|
104
|
+
const unique = [...new Map(allItems.map((i) => [i.url, i])).values()];
|
|
105
|
+
await openItems(unique, { openAll: opts.openAll });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function computeAreaStats(cfg, newItems, updatedItems, security, now) {
|
|
109
|
+
const allItems = [...newItems, ...updatedItems, ...security];
|
|
110
|
+
const allLabels = new Set();
|
|
111
|
+
for (const repo of cfg.repos) {
|
|
112
|
+
if (repo.labels) {
|
|
113
|
+
for (const label of repo.labels) {
|
|
114
|
+
allLabels.add(label);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const stats = [];
|
|
119
|
+
for (const area of allLabels) {
|
|
120
|
+
const areaItems = allItems.filter((i) => i.labels.includes(area));
|
|
121
|
+
if (areaItems.length === 0)
|
|
122
|
+
continue;
|
|
123
|
+
const issues = areaItems.filter((i) => !i.isPr);
|
|
124
|
+
const prs = areaItems.filter((i) => i.isPr);
|
|
125
|
+
const oldest = areaItems.reduce((prev, curr) => new Date(prev.createdAt) < new Date(curr.createdAt) ? prev : curr);
|
|
126
|
+
stats.push({
|
|
127
|
+
area,
|
|
128
|
+
openIssues: issues.length,
|
|
129
|
+
openPrs: prs.length,
|
|
130
|
+
oldest: formatAge(oldest.createdAt, now),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return stats.sort((a, b) => a.area.localeCompare(b.area));
|
|
134
|
+
}
|
|
135
|
+
function addCommonOptions(cmd) {
|
|
136
|
+
return cmd
|
|
137
|
+
.option('--config <path>', 'Path to config file', './gh-tuner.yaml')
|
|
138
|
+
.option('--since <date>', 'Override delta window start (ISO date)')
|
|
139
|
+
.option('--output <path>', 'Write markdown to file')
|
|
140
|
+
.option('--no-open', 'Skip opening items in browser')
|
|
141
|
+
.option('--open-all', 'Override the >50 item cap');
|
|
142
|
+
}
|
|
143
|
+
const program = new Command();
|
|
144
|
+
program
|
|
145
|
+
.name('gh-tuner')
|
|
146
|
+
.description('Delta-based issue triage and PR review summaries for OSS maintainers')
|
|
147
|
+
.version('0.1.0');
|
|
148
|
+
addCommonOptions(program.command('issues').description('Generate issue triage summary')).action(async (opts) => run('issues', opts));
|
|
149
|
+
addCommonOptions(program.command('prs').description('Generate PR review checklist')).action(async (opts) => run('prs', opts));
|
|
150
|
+
addCommonOptions(program.command('all').description('Generate both issue and PR summaries')).action(async (opts) => run('all', opts));
|
|
151
|
+
program.parse();
|
|
152
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAoC,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,KAAK,UAAU,GAAG,CAAC,IAAU,EAAE,IAAa;IAC1C,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IAEzB,IAAI,SAAe,CAAC;IACpB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,SAAS,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,iBAAiB,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CACP,yBAAyB,KAAK,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,OAAO,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AC;SAClE,MAAM,CAAC,iBAAiB,EAAE,wBAAwB,CAAC;SACnD,MAAM,CAAC,WAAW,EAAE,+BAA+B,CAAC;SACpD,MAAM,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,sEAAsE,CAAC;KACnF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC,CAAC,MAAM,CAC7F,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CACpC,CAAC;AAEF,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,8BAA8B,CAAC,CAAC,CAAC,MAAM,CACzF,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CACjC,CAAC;AAEF,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,sCAAsC,CAAC,CAAC,CAAC,MAAM,CACjG,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CACjC,CAAC;AAEF,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/output.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { GitHubItem } from './github.js';
|
|
2
|
+
export interface AreaStat {
|
|
3
|
+
area: string;
|
|
4
|
+
openIssues: number;
|
|
5
|
+
openPrs: number;
|
|
6
|
+
oldest: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SummaryInput {
|
|
9
|
+
mode: 'issues' | 'prs' | 'all';
|
|
10
|
+
generatedDate: Date;
|
|
11
|
+
sinceDate: Date;
|
|
12
|
+
reposScanned: number;
|
|
13
|
+
reposSkipped: number;
|
|
14
|
+
newItems: GitHubItem[];
|
|
15
|
+
updatedItems: GitHubItem[];
|
|
16
|
+
security: GitHubItem[];
|
|
17
|
+
excludedAwaiting: number;
|
|
18
|
+
excludedSystem: number;
|
|
19
|
+
areaStats: AreaStat[];
|
|
20
|
+
}
|
|
21
|
+
export declare function formatAge(createdAt: string, now?: Date): string;
|
|
22
|
+
export declare function generateMarkdown(input: SummaryInput): string;
|
package/dist/output.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const DAYS_OF_WEEK = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
2
|
+
export function formatAge(createdAt, now = new Date()) {
|
|
3
|
+
const created = new Date(createdAt);
|
|
4
|
+
const diffMs = now.getTime() - created.getTime();
|
|
5
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
6
|
+
if (diffDays < 7)
|
|
7
|
+
return `${diffDays}d old`;
|
|
8
|
+
if (diffDays < 56)
|
|
9
|
+
return `${Math.floor(diffDays / 7)}w old`;
|
|
10
|
+
return `${Math.floor(diffDays / 30)}mo old`;
|
|
11
|
+
}
|
|
12
|
+
function formatDate(date) {
|
|
13
|
+
return `${date.toISOString().slice(0, 10)} (${DAYS_OF_WEEK[date.getUTCDay()]})`;
|
|
14
|
+
}
|
|
15
|
+
function repoFromUrl(url) {
|
|
16
|
+
const match = url.match(/github\.com\/([^/]+\/[^/]+)\//);
|
|
17
|
+
return match ? match[1] : 'unknown';
|
|
18
|
+
}
|
|
19
|
+
function groupByRepo(items) {
|
|
20
|
+
const map = new Map();
|
|
21
|
+
for (const item of items) {
|
|
22
|
+
const repo = repoFromUrl(item.url);
|
|
23
|
+
if (!map.has(repo))
|
|
24
|
+
map.set(repo, []);
|
|
25
|
+
map.get(repo).push(item);
|
|
26
|
+
}
|
|
27
|
+
for (const group of map.values()) {
|
|
28
|
+
group.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());
|
|
29
|
+
}
|
|
30
|
+
return map;
|
|
31
|
+
}
|
|
32
|
+
function formatItem(item, now) {
|
|
33
|
+
const age = formatAge(item.createdAt, now);
|
|
34
|
+
const labels = item.labels.length > 0 ? ` ${item.labels.map((l) => `\`${l}\``).join(' ')}` : '';
|
|
35
|
+
const commentCount = item.comments.length;
|
|
36
|
+
const extras = [age];
|
|
37
|
+
if (commentCount > 0) {
|
|
38
|
+
extras.push(`${commentCount} comment${commentCount > 1 ? 's' : ''}`);
|
|
39
|
+
}
|
|
40
|
+
return `- [ ] [#${item.number}](${item.url}) — ${item.title}${labels} (${extras.join(', ')})`;
|
|
41
|
+
}
|
|
42
|
+
function renderSection(title, items, now) {
|
|
43
|
+
if (items.length === 0)
|
|
44
|
+
return '';
|
|
45
|
+
const grouped = groupByRepo(items);
|
|
46
|
+
const lines = [`## ${title} (${items.length})`, ''];
|
|
47
|
+
for (const [repo, repoItems] of grouped) {
|
|
48
|
+
lines.push(`### ${repo} (${repoItems.length})`);
|
|
49
|
+
for (const item of repoItems) {
|
|
50
|
+
lines.push(formatItem(item, now));
|
|
51
|
+
}
|
|
52
|
+
lines.push('');
|
|
53
|
+
}
|
|
54
|
+
return lines.join('\n');
|
|
55
|
+
}
|
|
56
|
+
export function generateMarkdown(input) {
|
|
57
|
+
const modeLabel = input.mode === 'prs' ? 'PR Review' : input.mode === 'all' ? 'Full' : 'Issue Triage';
|
|
58
|
+
const itemLabel = input.mode === 'prs' ? 'PRs' : input.mode === 'all' ? 'items' : 'issues';
|
|
59
|
+
const lines = [];
|
|
60
|
+
lines.push(`# gh-tuner — ${modeLabel} Summary`);
|
|
61
|
+
lines.push(`**Generated:** ${formatDate(input.generatedDate)}`);
|
|
62
|
+
lines.push(`**Delta since:** ${formatDate(input.sinceDate)}`);
|
|
63
|
+
lines.push(`**Repos scanned:** ${input.reposScanned} (${input.reposSkipped} skipped — biweekly/monthly not due)`);
|
|
64
|
+
lines.push('');
|
|
65
|
+
if (input.security.length > 0) {
|
|
66
|
+
lines.push('## Security');
|
|
67
|
+
for (const item of input.security) {
|
|
68
|
+
lines.push(formatItem(item, input.generatedDate));
|
|
69
|
+
}
|
|
70
|
+
lines.push('');
|
|
71
|
+
}
|
|
72
|
+
const newLabel = input.mode === 'prs' ? 'New PRs' : input.mode === 'all' ? 'New Items' : 'New Issues';
|
|
73
|
+
const newSection = renderSection(newLabel, input.newItems, input.generatedDate);
|
|
74
|
+
if (newSection)
|
|
75
|
+
lines.push(newSection);
|
|
76
|
+
const updatedLabel = input.mode === 'prs'
|
|
77
|
+
? 'Updated PRs — Human Engagement'
|
|
78
|
+
: input.mode === 'all'
|
|
79
|
+
? 'Updated Items — Human Engagement'
|
|
80
|
+
: 'Updated Issues — Human Engagement';
|
|
81
|
+
const updatedSection = renderSection(updatedLabel, input.updatedItems, input.generatedDate);
|
|
82
|
+
if (updatedSection)
|
|
83
|
+
lines.push(updatedSection);
|
|
84
|
+
lines.push('---');
|
|
85
|
+
lines.push(`*${input.excludedAwaiting} ${itemLabel} excluded (awaiting others) · ${input.excludedSystem} system-only updates filtered*`);
|
|
86
|
+
lines.push('');
|
|
87
|
+
if (input.areaStats.length > 0) {
|
|
88
|
+
lines.push('## Area Stats');
|
|
89
|
+
lines.push('| Area | Open Issues | Open PRs | Oldest |');
|
|
90
|
+
lines.push('|------|-------------|----------|--------|');
|
|
91
|
+
for (const stat of input.areaStats) {
|
|
92
|
+
lines.push(`| ${stat.area} | ${stat.openIssues} | ${stat.openPrs} | ${stat.oldest} |`);
|
|
93
|
+
}
|
|
94
|
+
lines.push('');
|
|
95
|
+
}
|
|
96
|
+
return lines.join('\n');
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAu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CAAC,IAAI,KAAK,KAAK;QAClB,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK;YACpB,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,mCAAmC,CAAC;IAC5C,MAAM,cAAc,GAAG,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5F,IAAI,cAAc;QAAE,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAE/C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CACR,IAAI,KAAK,CAAC,gBAAgB,IAAI,SAAS,iCAAiC,KAAK,CAAC,cAAc,gCAAgC,CAC7H,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;QACzD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,UAAU,MAAM,IAAI,CAAC,OAAO,MAAM,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;QACzF,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RepoConfig, ScheduleEntry } from './config.js';
|
|
2
|
+
export declare function resolveSince(sinceRef: string, today?: Date): Date;
|
|
3
|
+
export declare function getScheduleForDay(schedule: Record<string, ScheduleEntry>, today?: Date): ScheduleEntry | null;
|
|
4
|
+
export declare function isRepoIncluded(repo: RepoConfig, startDate: string, today?: Date): boolean;
|
package/dist/schedule.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
|
|
2
|
+
const DAY_INDICES = {
|
|
3
|
+
sunday: 0,
|
|
4
|
+
monday: 1,
|
|
5
|
+
tuesday: 2,
|
|
6
|
+
wednesday: 3,
|
|
7
|
+
thursday: 4,
|
|
8
|
+
friday: 5,
|
|
9
|
+
saturday: 6,
|
|
10
|
+
};
|
|
11
|
+
export function resolveSince(sinceRef, today = new Date()) {
|
|
12
|
+
const match = sinceRef.match(/^last-(\w+)$/);
|
|
13
|
+
if (!match) {
|
|
14
|
+
throw new Error(`Invalid since reference: ${sinceRef}. Expected format: last-<dayname>`);
|
|
15
|
+
}
|
|
16
|
+
const targetDay = DAY_INDICES[match[1]];
|
|
17
|
+
if (targetDay === undefined) {
|
|
18
|
+
throw new Error(`Unknown day name in since reference: ${match[1]}`);
|
|
19
|
+
}
|
|
20
|
+
const currentDay = today.getUTCDay();
|
|
21
|
+
let daysBack = currentDay - targetDay;
|
|
22
|
+
if (daysBack <= 0) {
|
|
23
|
+
daysBack += 7;
|
|
24
|
+
}
|
|
25
|
+
const result = new Date(today);
|
|
26
|
+
result.setUTCDate(result.getUTCDate() - daysBack);
|
|
27
|
+
result.setUTCHours(0, 0, 0, 0);
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
export function getScheduleForDay(schedule, today = new Date()) {
|
|
31
|
+
const dayName = DAYS[today.getUTCDay()];
|
|
32
|
+
return schedule[dayName] ?? null;
|
|
33
|
+
}
|
|
34
|
+
export function isRepoIncluded(repo, startDate, today = new Date()) {
|
|
35
|
+
if (repo.scope === 'filtered')
|
|
36
|
+
return true;
|
|
37
|
+
const cadence = repo.cadence ?? 'weekly';
|
|
38
|
+
if (cadence === 'weekly')
|
|
39
|
+
return true;
|
|
40
|
+
const start = new Date(startDate);
|
|
41
|
+
start.setUTCHours(0, 0, 0, 0);
|
|
42
|
+
const current = new Date(today);
|
|
43
|
+
current.setUTCHours(0, 0, 0, 0);
|
|
44
|
+
if (cadence === 'biweekly') {
|
|
45
|
+
const msPerWeek = 7 * 24 * 60 * 60 * 1000;
|
|
46
|
+
const weeksDiff = Math.floor((current.getTime() - start.getTime()) / msPerWeek);
|
|
47
|
+
return weeksDiff % 2 === 0;
|
|
48
|
+
}
|
|
49
|
+
if (cadence === 'monthly') {
|
|
50
|
+
const startMonth = start.getUTCFullYear() * 12 + start.getUTCMonth();
|
|
51
|
+
const currentMonth = current.getUTCFullYear() * 12 + current.getUTCMonth();
|
|
52
|
+
const monthsDiff = currentMonth - startMonth;
|
|
53
|
+
if (monthsDiff === 0) {
|
|
54
|
+
const startWeek = getWeekOfMonth(start);
|
|
55
|
+
const currentWeek = getWeekOfMonth(current);
|
|
56
|
+
return currentWeek === startWeek;
|
|
57
|
+
}
|
|
58
|
+
return getWeekOfMonth(current) === getWeekOfMonth(start);
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
function getWeekOfMonth(date) {
|
|
63
|
+
return Math.floor((date.getUTCDate() - 1) / 7);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../src/schedule.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAE5F,MAAM,WAAW,GAA2B;IAC1C,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;IACZ,Q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C,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;YAC5C,OAAO,WAAW,KAAK,SAAS,CAAC;QACnC,CAAC;QAED,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gh-tuner",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Delta-based issue triage and PR review summaries for OSS maintainers",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": "./bin/gh-tuner.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"bin"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"tsc": "tsc",
|
|
13
|
+
"tsc:full": "tsc --skipLibCheck false --incremental false",
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"format:check": "prettier --check .",
|
|
16
|
+
"format": "prettier --write .",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/awanlin/gh-tuner.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [],
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": "22 || 24"
|
|
29
|
+
},
|
|
30
|
+
"packageManager": "yarn@4.4.1",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/awanlin/gh-tuner/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/awanlin/gh-tuner#readme",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eslint/js": "^10.0.1",
|
|
37
|
+
"@types/node": "^26.0.1",
|
|
38
|
+
"eslint": "^10.6.0",
|
|
39
|
+
"prettier": "^3.9.3",
|
|
40
|
+
"typescript": "^6.0.3",
|
|
41
|
+
"typescript-eslint": "^8.62.1",
|
|
42
|
+
"vite": "^7.3.6",
|
|
43
|
+
"vitest": "^5.0.0-beta.5"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"chalk": "^5.6.2",
|
|
47
|
+
"commander": "^15.0.0",
|
|
48
|
+
"open": "^11.0.0",
|
|
49
|
+
"yaml": "^2.9.0"
|
|
50
|
+
}
|
|
51
|
+
}
|