@link-assistant/hive-mind 1.23.2 → 1.23.4
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/CHANGELOG.md +33 -0
- package/package.json +1 -1
- package/src/telegram-merge-queue.lib.mjs +22 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.23.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 22a1940: fix: display skip/fail reasons in merge queue Telegram messages (#1294)
|
|
8
|
+
|
|
9
|
+
Previously, when PRs were skipped or failed during merge queue processing, the Telegram message only showed the PR number without explaining why it was skipped. This left users unable to understand what action was required to resolve the issue.
|
|
10
|
+
|
|
11
|
+
Now the merge queue displays the reason for each skipped or failed PR in both:
|
|
12
|
+
- Progress messages (during processing)
|
|
13
|
+
- Final report messages (after completion)
|
|
14
|
+
|
|
15
|
+
Example output:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Results:
|
|
19
|
+
⏭️ #1241 (Issue #1240): PR has merge conflicts
|
|
20
|
+
⏭️ #1257 (Issue #1256): PR has merge conflicts
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This change follows UX best practices for error messages by:
|
|
24
|
+
- Showing the specific reason for each failure
|
|
25
|
+
- Using clear, human-readable language
|
|
26
|
+
- Helping users understand what action is needed
|
|
27
|
+
|
|
28
|
+
## 1.23.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- a797e56: fix: escape owner/repo names for Telegram MarkdownV2 in /merge command
|
|
33
|
+
|
|
34
|
+
Fixed the `/merge` command silently failing when updating Telegram messages for repositories with hyphens in their names (e.g., `link-assistant/hive-mind`). The issue was caused by unescaped special characters in MarkdownV2 format.
|
|
35
|
+
|
|
3
36
|
## 1.23.2
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -440,7 +440,8 @@ export class MergeQueueProcessor {
|
|
|
440
440
|
const update = this.getProgressUpdate();
|
|
441
441
|
|
|
442
442
|
let message = `*Merge Queue*\n`;
|
|
443
|
-
|
|
443
|
+
// Issue #1292: Escape owner/repo for MarkdownV2 (may contain hyphens, underscores, etc.)
|
|
444
|
+
message += `${this.escapeMarkdown(this.owner)}/${this.escapeMarkdown(this.repo)}\n\n`;
|
|
444
445
|
|
|
445
446
|
// Progress bar in code block for better style
|
|
446
447
|
const progressBar = getProgressBar(update.progress.percentage);
|
|
@@ -461,15 +462,17 @@ export class MergeQueueProcessor {
|
|
|
461
462
|
message += `${statusEmoji} ${update.current}\n\n`;
|
|
462
463
|
}
|
|
463
464
|
|
|
464
|
-
// Show errors/failures inline so user gets immediate feedback (Issue #1269)
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
465
|
+
// Show errors/failures/skips inline so user gets immediate feedback (Issue #1269, #1294)
|
|
466
|
+
// Include both FAILED and SKIPPED items with their reasons
|
|
467
|
+
const problemItems = update.items.filter(item => (item.status === MergeItemStatus.FAILED || item.status === MergeItemStatus.SKIPPED) && item.error);
|
|
468
|
+
if (problemItems.length > 0) {
|
|
469
|
+
message += `⚠️ *Issues:*\n`;
|
|
470
|
+
for (const item of problemItems.slice(0, 5)) {
|
|
471
|
+
const statusEmoji = item.status === MergeItemStatus.FAILED ? '❌' : '⏭️';
|
|
472
|
+
message += ` ${statusEmoji} \\#${item.prNumber}: ${this.escapeMarkdown(item.error.substring(0, 50))}${item.error.length > 50 ? '...' : ''}\n`;
|
|
470
473
|
}
|
|
471
|
-
if (
|
|
472
|
-
message += ` _...and ${
|
|
474
|
+
if (problemItems.length > 5) {
|
|
475
|
+
message += ` _...and ${problemItems.length - 5} more issues_\n`;
|
|
473
476
|
}
|
|
474
477
|
message += '\n';
|
|
475
478
|
}
|
|
@@ -515,7 +518,8 @@ export class MergeQueueProcessor {
|
|
|
515
518
|
}
|
|
516
519
|
|
|
517
520
|
let message = `${statusEmoji} *Merge Queue ${statusText}*\n`;
|
|
518
|
-
|
|
521
|
+
// Issue #1292: Escape owner/repo for MarkdownV2 (may contain hyphens, underscores, etc.)
|
|
522
|
+
message += `${this.escapeMarkdown(this.owner)}/${this.escapeMarkdown(this.repo)}\n\n`;
|
|
519
523
|
|
|
520
524
|
// Final progress bar in code block
|
|
521
525
|
const percentage = report.stats.total > 0 ? Math.round((report.stats.merged / report.stats.total) * 100) : 0;
|
|
@@ -536,7 +540,14 @@ export class MergeQueueProcessor {
|
|
|
536
540
|
message += `*Results:*\n`;
|
|
537
541
|
for (const item of report.items) {
|
|
538
542
|
const issueRef = item.issueNumber ? ` \\(Issue \\#${item.issueNumber}\\)` : '';
|
|
539
|
-
|
|
543
|
+
// Issue #1294: Show skip/fail reason so users understand what action is required
|
|
544
|
+
let reasonText = '';
|
|
545
|
+
if (item.error && (item.status === MergeItemStatus.SKIPPED || item.status === MergeItemStatus.FAILED)) {
|
|
546
|
+
// Truncate long reasons and escape for MarkdownV2
|
|
547
|
+
const truncatedReason = item.error.length > 50 ? item.error.substring(0, 47) + '...' : item.error;
|
|
548
|
+
reasonText = `: ${this.escapeMarkdown(truncatedReason)}`;
|
|
549
|
+
}
|
|
550
|
+
message += `${item.emoji} \\#${item.prNumber}${issueRef}${reasonText}\n`;
|
|
540
551
|
}
|
|
541
552
|
}
|
|
542
553
|
|