@oss-autopilot/core 0.41.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/LICENSE +21 -0
- package/README.md +85 -0
- package/dist/cli.bundle.cjs +17657 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.js +325 -0
- package/dist/commands/check-integration.d.ts +10 -0
- package/dist/commands/check-integration.js +192 -0
- package/dist/commands/comments.d.ts +24 -0
- package/dist/commands/comments.js +311 -0
- package/dist/commands/config.d.ts +11 -0
- package/dist/commands/config.js +82 -0
- package/dist/commands/daily.d.ts +29 -0
- package/dist/commands/daily.js +433 -0
- package/dist/commands/dashboard-data.d.ts +45 -0
- package/dist/commands/dashboard-data.js +132 -0
- package/dist/commands/dashboard-templates.d.ts +23 -0
- package/dist/commands/dashboard-templates.js +1627 -0
- package/dist/commands/dashboard.d.ts +18 -0
- package/dist/commands/dashboard.js +134 -0
- package/dist/commands/dismiss.d.ts +13 -0
- package/dist/commands/dismiss.js +49 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.js +27 -0
- package/dist/commands/local-repos.d.ts +14 -0
- package/dist/commands/local-repos.js +155 -0
- package/dist/commands/parse-list.d.ts +13 -0
- package/dist/commands/parse-list.js +139 -0
- package/dist/commands/read.d.ts +12 -0
- package/dist/commands/read.js +33 -0
- package/dist/commands/search.d.ts +10 -0
- package/dist/commands/search.js +74 -0
- package/dist/commands/setup.d.ts +15 -0
- package/dist/commands/setup.js +276 -0
- package/dist/commands/shelve.d.ts +13 -0
- package/dist/commands/shelve.js +49 -0
- package/dist/commands/snooze.d.ts +18 -0
- package/dist/commands/snooze.js +83 -0
- package/dist/commands/startup.d.ts +33 -0
- package/dist/commands/startup.js +197 -0
- package/dist/commands/status.d.ts +10 -0
- package/dist/commands/status.js +43 -0
- package/dist/commands/track.d.ts +16 -0
- package/dist/commands/track.js +59 -0
- package/dist/commands/validation.d.ts +43 -0
- package/dist/commands/validation.js +112 -0
- package/dist/commands/vet.d.ts +10 -0
- package/dist/commands/vet.js +36 -0
- package/dist/core/checklist-analysis.d.ts +17 -0
- package/dist/core/checklist-analysis.js +39 -0
- package/dist/core/ci-analysis.d.ts +78 -0
- package/dist/core/ci-analysis.js +163 -0
- package/dist/core/comment-utils.d.ts +15 -0
- package/dist/core/comment-utils.js +52 -0
- package/dist/core/concurrency.d.ts +5 -0
- package/dist/core/concurrency.js +15 -0
- package/dist/core/daily-logic.d.ts +77 -0
- package/dist/core/daily-logic.js +512 -0
- package/dist/core/display-utils.d.ts +10 -0
- package/dist/core/display-utils.js +100 -0
- package/dist/core/errors.d.ts +24 -0
- package/dist/core/errors.js +34 -0
- package/dist/core/github-stats.d.ts +73 -0
- package/dist/core/github-stats.js +272 -0
- package/dist/core/github.d.ts +19 -0
- package/dist/core/github.js +60 -0
- package/dist/core/http-cache.d.ts +97 -0
- package/dist/core/http-cache.js +269 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.js +15 -0
- package/dist/core/issue-conversation.d.ts +29 -0
- package/dist/core/issue-conversation.js +231 -0
- package/dist/core/issue-discovery.d.ts +85 -0
- package/dist/core/issue-discovery.js +589 -0
- package/dist/core/issue-filtering.d.ts +51 -0
- package/dist/core/issue-filtering.js +103 -0
- package/dist/core/issue-scoring.d.ts +40 -0
- package/dist/core/issue-scoring.js +92 -0
- package/dist/core/issue-vetting.d.ts +49 -0
- package/dist/core/issue-vetting.js +536 -0
- package/dist/core/logger.d.ts +21 -0
- package/dist/core/logger.js +49 -0
- package/dist/core/maintainer-analysis.d.ts +10 -0
- package/dist/core/maintainer-analysis.js +59 -0
- package/dist/core/pagination.d.ts +11 -0
- package/dist/core/pagination.js +20 -0
- package/dist/core/pr-monitor.d.ts +109 -0
- package/dist/core/pr-monitor.js +594 -0
- package/dist/core/review-analysis.d.ts +72 -0
- package/dist/core/review-analysis.js +163 -0
- package/dist/core/state.d.ts +371 -0
- package/dist/core/state.js +1089 -0
- package/dist/core/types.d.ts +507 -0
- package/dist/core/types.js +34 -0
- package/dist/core/utils.d.ts +249 -0
- package/dist/core/utils.js +422 -0
- package/dist/formatters/json.d.ts +269 -0
- package/dist/formatters/json.js +88 -0
- package/package.json +67 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CI Analysis - Classification and analysis of CI check runs and combined statuses.
|
|
3
|
+
* Extracted from PRMonitor to isolate CI-related logic (#263).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Known CI check name patterns that indicate fork limitations rather than real failures (#81).
|
|
7
|
+
* These are deployment/preview services that require repo-level secrets unavailable in forks.
|
|
8
|
+
*/
|
|
9
|
+
export const FORK_LIMITATION_PATTERNS = [
|
|
10
|
+
/vercel/i,
|
|
11
|
+
/netlify/i,
|
|
12
|
+
/\bpreview\s*deploy/i,
|
|
13
|
+
/\bdeploy\s*preview/i,
|
|
14
|
+
/storybook/i,
|
|
15
|
+
/chromatic/i,
|
|
16
|
+
/percy/i,
|
|
17
|
+
/cloudflare pages/i,
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Known CI check name patterns that indicate authorization gates (#81).
|
|
21
|
+
* These require maintainer approval and are not real failures.
|
|
22
|
+
*/
|
|
23
|
+
export const AUTH_GATE_PATTERNS = [/authoriz/i, /approval/i, /\bcla\b/i, /license\/cla/i];
|
|
24
|
+
/**
|
|
25
|
+
* Known CI check name patterns that indicate infrastructure/transient failures (#145).
|
|
26
|
+
* These are runner issues, dependency install problems, or service outages — not code failures.
|
|
27
|
+
*/
|
|
28
|
+
export const INFRASTRUCTURE_PATTERNS = [
|
|
29
|
+
/\binstall\s*(os\s*)?dep(endenc|s\b)/i,
|
|
30
|
+
/\bsetup\s+fail(ed|ure)?\b/i,
|
|
31
|
+
/\bservice\s*unavailable/i,
|
|
32
|
+
/\binfrastructure/i,
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* Classify a failing CI check as actionable, fork_limitation, auth_gate, or infrastructure (#81, #145).
|
|
36
|
+
* Default is 'actionable' — only known patterns get reclassified.
|
|
37
|
+
* When conclusion is provided (cancelled, timed_out), the check is classified as infrastructure.
|
|
38
|
+
*/
|
|
39
|
+
export function classifyCICheck(name, description, conclusion) {
|
|
40
|
+
// Infrastructure: cancelled or timed_out jobs are transient failures (#145)
|
|
41
|
+
if (conclusion === 'cancelled' || conclusion === 'timed_out')
|
|
42
|
+
return 'infrastructure';
|
|
43
|
+
const nameLower = name.toLowerCase();
|
|
44
|
+
// Check name first (more reliable than description)
|
|
45
|
+
if (AUTH_GATE_PATTERNS.some((p) => p.test(nameLower)))
|
|
46
|
+
return 'auth_gate';
|
|
47
|
+
if (FORK_LIMITATION_PATTERNS.some((p) => p.test(nameLower)))
|
|
48
|
+
return 'fork_limitation';
|
|
49
|
+
if (INFRASTRUCTURE_PATTERNS.some((p) => p.test(nameLower)))
|
|
50
|
+
return 'infrastructure';
|
|
51
|
+
// Fall through to description only if name was not classified
|
|
52
|
+
if (description) {
|
|
53
|
+
const descLower = description.toLowerCase();
|
|
54
|
+
if (AUTH_GATE_PATTERNS.some((p) => p.test(descLower)))
|
|
55
|
+
return 'auth_gate';
|
|
56
|
+
if (FORK_LIMITATION_PATTERNS.some((p) => p.test(descLower)))
|
|
57
|
+
return 'fork_limitation';
|
|
58
|
+
if (INFRASTRUCTURE_PATTERNS.some((p) => p.test(descLower)))
|
|
59
|
+
return 'infrastructure';
|
|
60
|
+
}
|
|
61
|
+
return 'actionable';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Classify all failing checks and return both the flat names array and classified array (#81, #145).
|
|
65
|
+
* Accepts optional conclusion data to detect infrastructure failures.
|
|
66
|
+
*/
|
|
67
|
+
export function classifyFailingChecks(failingCheckNames, conclusions) {
|
|
68
|
+
return failingCheckNames.map((name) => {
|
|
69
|
+
const conclusion = conclusions?.get(name);
|
|
70
|
+
return {
|
|
71
|
+
name,
|
|
72
|
+
category: classifyCICheck(name, undefined, conclusion),
|
|
73
|
+
conclusion,
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Analyze check runs (GitHub Actions, etc.) and categorize them.
|
|
79
|
+
* Returns flags for failing/pending/success and lists of failing check names + conclusions.
|
|
80
|
+
*/
|
|
81
|
+
export function analyzeCheckRuns(checkRuns) {
|
|
82
|
+
let hasFailingChecks = false;
|
|
83
|
+
let hasPendingChecks = false;
|
|
84
|
+
let hasSuccessfulChecks = false;
|
|
85
|
+
const failingCheckNames = [];
|
|
86
|
+
const failingCheckConclusions = new Map();
|
|
87
|
+
for (const check of checkRuns) {
|
|
88
|
+
if (check.conclusion === 'failure' || check.conclusion === 'cancelled' || check.conclusion === 'timed_out') {
|
|
89
|
+
hasFailingChecks = true;
|
|
90
|
+
failingCheckNames.push(check.name);
|
|
91
|
+
failingCheckConclusions.set(check.name, check.conclusion);
|
|
92
|
+
}
|
|
93
|
+
else if (check.conclusion === 'action_required') {
|
|
94
|
+
hasPendingChecks = true; // Maintainer approval gate, not a real failure
|
|
95
|
+
}
|
|
96
|
+
else if (check.status === 'in_progress' || check.status === 'queued') {
|
|
97
|
+
hasPendingChecks = true;
|
|
98
|
+
}
|
|
99
|
+
else if (check.conclusion === 'success') {
|
|
100
|
+
hasSuccessfulChecks = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return { hasFailingChecks, hasPendingChecks, hasSuccessfulChecks, failingCheckNames, failingCheckConclusions };
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Analyze combined status API results (Travis, CircleCI, etc.).
|
|
107
|
+
* Filters out authorization-gate statuses and determines the effective combined state.
|
|
108
|
+
* Returns failing status context names in the result (does not mutate caller arrays).
|
|
109
|
+
*/
|
|
110
|
+
export function analyzeCombinedStatus(combinedStatus) {
|
|
111
|
+
// Filter out authorization-gate statuses (e.g., Vercel "Authorization required to deploy")
|
|
112
|
+
// These are permission gates, not real CI failures
|
|
113
|
+
const realStatuses = combinedStatus.statuses.filter((s) => {
|
|
114
|
+
const desc = (s.description || '').toLowerCase();
|
|
115
|
+
return !(s.state === 'failure' && (desc.includes('authorization required') || desc.includes('authorize')));
|
|
116
|
+
});
|
|
117
|
+
const hasRealFailure = realStatuses.some((s) => s.state === 'failure' || s.state === 'error');
|
|
118
|
+
const hasRealPending = realStatuses.some((s) => s.state === 'pending');
|
|
119
|
+
const hasRealSuccess = realStatuses.some((s) => s.state === 'success');
|
|
120
|
+
const effectiveCombinedState = hasRealFailure
|
|
121
|
+
? 'failure'
|
|
122
|
+
: hasRealPending
|
|
123
|
+
? 'pending'
|
|
124
|
+
: hasRealSuccess
|
|
125
|
+
? 'success'
|
|
126
|
+
: realStatuses.length === 0
|
|
127
|
+
? 'success' // All statuses were auth gates; don't inherit original failure
|
|
128
|
+
: combinedStatus.state;
|
|
129
|
+
const hasStatuses = combinedStatus.statuses.length > 0;
|
|
130
|
+
// Collect failing status names from combined status API
|
|
131
|
+
const failingStatusNames = [];
|
|
132
|
+
for (const s of realStatuses) {
|
|
133
|
+
if (s.state === 'failure' || s.state === 'error') {
|
|
134
|
+
failingStatusNames.push(s.context);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return { effectiveCombinedState, hasStatuses, failingStatusNames };
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Merge check run analysis and combined status analysis into a final CIStatusResult.
|
|
141
|
+
* Priority: failing > pending > passing > unknown.
|
|
142
|
+
*/
|
|
143
|
+
export function mergeStatuses(checkRunAnalysis, combinedAnalysis, checkRunCount) {
|
|
144
|
+
const { hasFailingChecks, hasPendingChecks, hasSuccessfulChecks, failingCheckNames, failingCheckConclusions } = checkRunAnalysis;
|
|
145
|
+
const { effectiveCombinedState, hasStatuses, failingStatusNames } = combinedAnalysis;
|
|
146
|
+
// Merge failing names from both check runs and combined statuses
|
|
147
|
+
const allFailingNames = [...failingCheckNames, ...failingStatusNames];
|
|
148
|
+
// Safety net: If we have ANY failing checks, report as failing
|
|
149
|
+
if (hasFailingChecks || effectiveCombinedState === 'failure' || effectiveCombinedState === 'error') {
|
|
150
|
+
return { status: 'failing', failingCheckNames: allFailingNames, failingCheckConclusions };
|
|
151
|
+
}
|
|
152
|
+
if (hasPendingChecks || effectiveCombinedState === 'pending') {
|
|
153
|
+
return { status: 'pending', failingCheckNames: [], failingCheckConclusions: new Map() };
|
|
154
|
+
}
|
|
155
|
+
if (hasSuccessfulChecks || effectiveCombinedState === 'success') {
|
|
156
|
+
return { status: 'passing', failingCheckNames: [], failingCheckConclusions: new Map() };
|
|
157
|
+
}
|
|
158
|
+
// No checks found at all - this is common for repos without CI
|
|
159
|
+
if (!hasStatuses && checkRunCount === 0) {
|
|
160
|
+
return { status: 'unknown', failingCheckNames: [], failingCheckConclusions: new Map() };
|
|
161
|
+
}
|
|
162
|
+
return { status: 'unknown', failingCheckNames: [], failingCheckConclusions: new Map() };
|
|
163
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared comment utility functions used by both PRMonitor and IssueConversationMonitor.
|
|
3
|
+
* Extracted to avoid circular dependencies between the two modules.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check if a comment author is a bot account.
|
|
7
|
+
* Matches the [bot] suffix convention and known bot usernames (case-insensitive).
|
|
8
|
+
*/
|
|
9
|
+
export declare function isBotAuthor(author: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Detect acknowledgment comments that don't require a response.
|
|
12
|
+
* Returns true only when: no question mark, matches an acknowledgment keyword, and under 100 chars.
|
|
13
|
+
* Conservative -- missing a real acknowledgment (false negative) is safer than suppressing a substantive response (false positive).
|
|
14
|
+
*/
|
|
15
|
+
export declare function isAcknowledgmentComment(body: string): boolean;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared comment utility functions used by both PRMonitor and IssueConversationMonitor.
|
|
3
|
+
* Extracted to avoid circular dependencies between the two modules.
|
|
4
|
+
*/
|
|
5
|
+
// Bot accounts that don't follow the [bot] suffix convention
|
|
6
|
+
const KNOWN_BOT_USERNAMES = new Set([
|
|
7
|
+
'allcontributors',
|
|
8
|
+
'changeset-bot',
|
|
9
|
+
'claassistant',
|
|
10
|
+
'codecov-commenter',
|
|
11
|
+
'greenkeeper',
|
|
12
|
+
'imgbot',
|
|
13
|
+
'netlify',
|
|
14
|
+
'renovate',
|
|
15
|
+
'snyk-bot',
|
|
16
|
+
'sonarcloud',
|
|
17
|
+
'stale',
|
|
18
|
+
'vercel',
|
|
19
|
+
]);
|
|
20
|
+
/**
|
|
21
|
+
* Check if a comment author is a bot account.
|
|
22
|
+
* Matches the [bot] suffix convention and known bot usernames (case-insensitive).
|
|
23
|
+
*/
|
|
24
|
+
export function isBotAuthor(author) {
|
|
25
|
+
return author.includes('[bot]') || KNOWN_BOT_USERNAMES.has(author.toLowerCase());
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Detect acknowledgment comments that don't require a response.
|
|
29
|
+
* Returns true only when: no question mark, matches an acknowledgment keyword, and under 100 chars.
|
|
30
|
+
* Conservative -- missing a real acknowledgment (false negative) is safer than suppressing a substantive response (false positive).
|
|
31
|
+
*/
|
|
32
|
+
export function isAcknowledgmentComment(body) {
|
|
33
|
+
if (!body || body.length > 100)
|
|
34
|
+
return false;
|
|
35
|
+
if (body.includes('?'))
|
|
36
|
+
return false;
|
|
37
|
+
const lower = body.toLowerCase();
|
|
38
|
+
const ackKeywords = [
|
|
39
|
+
'thanks',
|
|
40
|
+
'thank you',
|
|
41
|
+
'lgtm',
|
|
42
|
+
'looks good',
|
|
43
|
+
'will review',
|
|
44
|
+
"we'll review",
|
|
45
|
+
"we'll get to this",
|
|
46
|
+
'noted',
|
|
47
|
+
'got it',
|
|
48
|
+
'will look',
|
|
49
|
+
'will check',
|
|
50
|
+
];
|
|
51
|
+
return ackKeywords.some((kw) => lower.includes(kw));
|
|
52
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs a worker pool that processes items with bounded concurrency.
|
|
3
|
+
* N workers consume from a shared index — simpler than Promise.race + splice.
|
|
4
|
+
*/
|
|
5
|
+
export declare function runWorkerPool<T>(items: T[], worker: (item: T) => Promise<void>, concurrency: number): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs a worker pool that processes items with bounded concurrency.
|
|
3
|
+
* N workers consume from a shared index — simpler than Promise.race + splice.
|
|
4
|
+
*/
|
|
5
|
+
export async function runWorkerPool(items, worker, concurrency) {
|
|
6
|
+
let index = 0;
|
|
7
|
+
const poolWorker = async () => {
|
|
8
|
+
while (index < items.length) {
|
|
9
|
+
const item = items[index++];
|
|
10
|
+
await worker(item);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const workerCount = Math.min(concurrency, items.length);
|
|
14
|
+
await Promise.all(Array.from({ length: workerCount }, () => poolWorker()));
|
|
15
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain logic extracted from src/commands/daily.ts.
|
|
3
|
+
*
|
|
4
|
+
* Pure or near-pure functions that operate on FetchedPR data:
|
|
5
|
+
* - computeRepoSignals / groupPRsByRepo — per-repo aggregations
|
|
6
|
+
* - assessCapacity — capacity assessment against active PRs
|
|
7
|
+
* - collectActionableIssues — ordered list of issues needing attention
|
|
8
|
+
* - computeActionMenu — pre-computed action menu for orchestration
|
|
9
|
+
* - toShelvedPRRef — lightweight projection for digest display
|
|
10
|
+
* - formatActionHint — human-readable maintainer action hint label
|
|
11
|
+
* - formatBriefSummary / formatSummary / printDigest — rendering
|
|
12
|
+
*/
|
|
13
|
+
import type { FetchedPR, FetchedPRStatus, DailyDigest, ShelvedPRRef, MaintainerActionHint, ComputedRepoSignals, RepoGroup, CommentedIssue, CommentedIssueWithResponse } from './types.js';
|
|
14
|
+
import type { CapacityAssessment, ActionableIssue, ActionMenu } from '../formatters/json.js';
|
|
15
|
+
/**
|
|
16
|
+
* Statuses indicating maintainer engagement or action needed from the contributor.
|
|
17
|
+
* Used both for auto-unshelving shelved PRs and for counting critical issues in capacity assessment.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CRITICAL_STATUSES: ReadonlySet<FetchedPRStatus>;
|
|
20
|
+
/** Statuses indicating active maintainer engagement (reviews, feedback, merges). */
|
|
21
|
+
export declare const ACTIVE_MAINTAINER_STATUSES: ReadonlySet<FetchedPRStatus>;
|
|
22
|
+
/** Statuses indicating staleness — maintainer comments during these statuses don't count as responsive. */
|
|
23
|
+
export declare const STALE_STATUSES: ReadonlySet<FetchedPRStatus>;
|
|
24
|
+
/**
|
|
25
|
+
* Map a full FetchedPR to a lightweight ShelvedPRRef for digest output.
|
|
26
|
+
* Only the fields needed for display are retained, reducing JSON payload size.
|
|
27
|
+
*/
|
|
28
|
+
export declare function toShelvedPRRef(pr: FetchedPR): ShelvedPRRef;
|
|
29
|
+
/**
|
|
30
|
+
* Group PRs by repository (#80).
|
|
31
|
+
* Ensures one agent per repo during parallel dispatch, preventing branch checkout conflicts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function groupPRsByRepo(prs: FetchedPR[]): RepoGroup[];
|
|
34
|
+
/**
|
|
35
|
+
* Compute per-repo maintainer signals from observed open PR data.
|
|
36
|
+
* - isResponsive: true if any PR in the repo has a maintainer comment and status
|
|
37
|
+
* is not in STALE_STATUSES
|
|
38
|
+
* - hasActiveMaintainers: true if any PR in the repo has a status in ACTIVE_MAINTAINER_STATUSES
|
|
39
|
+
*/
|
|
40
|
+
export declare function computeRepoSignals(prs: FetchedPR[]): Map<string, ComputedRepoSignals>;
|
|
41
|
+
/**
|
|
42
|
+
* Assess whether user has capacity for new issues.
|
|
43
|
+
* Only active (non-shelved) PRs count against the limit.
|
|
44
|
+
*/
|
|
45
|
+
export declare function assessCapacity(activePRs: FetchedPR[], maxActivePRs: number, shelvedPRCount: number): CapacityAssessment;
|
|
46
|
+
/**
|
|
47
|
+
* Collect all actionable issues across PRs for the action-first flow.
|
|
48
|
+
* Order: Needs response -> Needs changes -> CI failing -> Merge conflicts -> Incomplete checklist
|
|
49
|
+
*
|
|
50
|
+
* Note: Recently closed PRs are informational only and excluded from this list.
|
|
51
|
+
* They are available separately in digest.recentlyClosedPRs (#156).
|
|
52
|
+
*/
|
|
53
|
+
export declare function collectActionableIssues(prs: FetchedPR[], snoozedUrls?: Set<string>): ActionableIssue[];
|
|
54
|
+
/**
|
|
55
|
+
* Format a maintainer action hint as a human-readable label
|
|
56
|
+
*/
|
|
57
|
+
export declare function formatActionHint(hint: MaintainerActionHint): string;
|
|
58
|
+
/**
|
|
59
|
+
* Compute the action menu from PR data and capacity.
|
|
60
|
+
* The orchestration layer can insert issue-list options (e.g., "Pick from list")
|
|
61
|
+
* using the context flags.
|
|
62
|
+
*/
|
|
63
|
+
export declare function computeActionMenu(actionableIssues: ActionableIssue[], capacity: CapacityAssessment, commentedIssues?: CommentedIssue[]): ActionMenu;
|
|
64
|
+
/**
|
|
65
|
+
* Format a brief one-liner summary for the action-first flow
|
|
66
|
+
*/
|
|
67
|
+
export declare function formatBriefSummary(digest: DailyDigest, issueCount: number, issueResponseCount?: number): string;
|
|
68
|
+
/**
|
|
69
|
+
* Format summary as markdown (used in JSON output for Claude to display verbatim)
|
|
70
|
+
*/
|
|
71
|
+
export declare function formatSummary(digest: DailyDigest, capacity: CapacityAssessment, issueResponses?: CommentedIssueWithResponse[]): string;
|
|
72
|
+
/**
|
|
73
|
+
* Print digest to console (simple text output).
|
|
74
|
+
* Unified renderer: uses the same section ordering as formatSummary
|
|
75
|
+
* but outputs plain text with console.log instead of markdown links.
|
|
76
|
+
*/
|
|
77
|
+
export declare function printDigest(digest: DailyDigest, capacity: CapacityAssessment, commentedIssues?: CommentedIssue[]): void;
|