ralph-hero-mcp-server 2.4.80 → 2.4.85
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/dist/lib/dashboard.js +11 -3
- package/dist/lib/helpers.js +5 -3
- package/package.json +1 -1
package/dist/lib/dashboard.js
CHANGED
|
@@ -30,6 +30,13 @@ function priorityRank(p) {
|
|
|
30
30
|
// Oversized estimate helpers
|
|
31
31
|
// ---------------------------------------------------------------------------
|
|
32
32
|
const OVERSIZED_ESTIMATES = new Set(["M", "L", "XL"]);
|
|
33
|
+
const ESTIMATE_POINTS = {
|
|
34
|
+
XS: 1,
|
|
35
|
+
S: 2,
|
|
36
|
+
M: 3,
|
|
37
|
+
L: 4,
|
|
38
|
+
XL: 5,
|
|
39
|
+
};
|
|
33
40
|
// ---------------------------------------------------------------------------
|
|
34
41
|
// Phase ordering: STATE_ORDER + extras (Human Needed, Canceled)
|
|
35
42
|
// ---------------------------------------------------------------------------
|
|
@@ -106,6 +113,7 @@ function buildSnapshot(state, items, now) {
|
|
|
106
113
|
return {
|
|
107
114
|
state,
|
|
108
115
|
count: sorted.length,
|
|
116
|
+
estimatePoints: sorted.reduce((sum, item) => sum + (item.estimate ? (ESTIMATE_POINTS[item.estimate] ?? 0) : 0), 0),
|
|
109
117
|
issues: sorted.map((item) => ({
|
|
110
118
|
number: item.number,
|
|
111
119
|
title: item.title,
|
|
@@ -440,8 +448,8 @@ export function formatMarkdown(data, issuesPerPhase = 10) {
|
|
|
440
448
|
lines.push(`**Total issues**: ${data.totalIssues}`);
|
|
441
449
|
lines.push("");
|
|
442
450
|
// Phase table
|
|
443
|
-
lines.push("| Phase | Count | Issues |");
|
|
444
|
-
lines.push("
|
|
451
|
+
lines.push("| Phase | Count | Points | Issues |");
|
|
452
|
+
lines.push("|-------|------:|-------:|--------|");
|
|
445
453
|
for (const phase of data.phases) {
|
|
446
454
|
const issueList = phase.issues
|
|
447
455
|
.slice(0, issuesPerPhase)
|
|
@@ -457,7 +465,7 @@ export function formatMarkdown(data, issuesPerPhase = 10) {
|
|
|
457
465
|
const truncated = phase.issues.length > issuesPerPhase
|
|
458
466
|
? `${issueList}; ... +${phase.issues.length - issuesPerPhase} more`
|
|
459
467
|
: issueList;
|
|
460
|
-
lines.push(`| ${phase.state} | ${phase.count} | ${truncated} |`);
|
|
468
|
+
lines.push(`| ${phase.state} | ${phase.count} | ${phase.estimatePoints} | ${truncated} |`);
|
|
461
469
|
}
|
|
462
470
|
// Health section
|
|
463
471
|
lines.push("");
|
package/dist/lib/helpers.js
CHANGED
|
@@ -224,7 +224,7 @@ export async function queryProjectRepositories(client, owner, projectNumber) {
|
|
|
224
224
|
* - If client.config.repo is already set → return it (env var takes precedence)
|
|
225
225
|
* - If exactly 1 repo linked → use it, cache in client.config.repo
|
|
226
226
|
* - If 0 repos linked → throw with bootstrap instructions
|
|
227
|
-
* - If 2+ repos linked →
|
|
227
|
+
* - If 2+ repos linked → warn and return undefined, leaving client.config.repo unset
|
|
228
228
|
*/
|
|
229
229
|
export async function resolveRepoFromProject(client) {
|
|
230
230
|
if (client.config.repo)
|
|
@@ -249,8 +249,10 @@ export async function resolveRepoFromProject(client) {
|
|
|
249
249
|
return inferred.repo;
|
|
250
250
|
}
|
|
251
251
|
const repoList = result.repos.map(r => r.nameWithOwner).join(", ");
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
console.error(`[ralph-hero] Multiple repos linked to project: ${repoList}. ` +
|
|
253
|
+
`Set RALPH_GH_REPO to select the default repo. ` +
|
|
254
|
+
`Read-only tools will work; write tools require an explicit repo param.`);
|
|
255
|
+
return undefined;
|
|
254
256
|
}
|
|
255
257
|
// ---------------------------------------------------------------------------
|
|
256
258
|
// Helper: Resolve required owner/repo with defaults
|