@link-assistant/hive-mind 1.23.6 → 1.23.7

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.23.7
4
+
5
+ ### Patch Changes
6
+
7
+ - d951635: Fix --auto-restart-until-mergable false positive on empty CI checks
8
+
9
+ The `--auto-restart-until-mergable` mode was incorrectly posting "Ready to merge" when CI checks hadn't started yet. This was caused by JavaScript's vacuous truth: `[].every(fn)` returns `true`, so an empty checks array would pass all validation.
10
+
11
+ Fix: Return `pending` status when no CI checks exist yet, instead of `success`.
12
+
3
13
  ## 1.23.6
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.23.6",
3
+ "version": "1.23.7",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -340,6 +340,22 @@ export async function checkPRCIStatus(owner, repo, prNumber, verbose = false) {
340
340
  })),
341
341
  ];
342
342
 
343
+ // Issue #1304: If no checks exist yet, treat as pending
344
+ // This handles the race condition where CI hasn't started yet after a commit is pushed.
345
+ // An empty array would otherwise pass all checks due to JavaScript's vacuous truth
346
+ // ([].every(fn) returns true for any fn).
347
+ if (allChecks.length === 0) {
348
+ if (verbose) {
349
+ console.log(`[VERBOSE] /merge: PR #${prNumber} has no CI checks yet - treating as pending`);
350
+ }
351
+ return {
352
+ status: 'pending',
353
+ checks: [],
354
+ allPassed: false,
355
+ hasPending: true,
356
+ };
357
+ }
358
+
343
359
  const hasPending = allChecks.some(c => c.status !== 'completed' || c.conclusion === null);
344
360
  const allPassed = !hasPending && allChecks.every(c => c.conclusion === 'success' || c.conclusion === 'skipped' || c.conclusion === 'neutral');
345
361
  const hasFailed = allChecks.some(c => c.conclusion === 'failure' || c.conclusion === 'cancelled' || c.conclusion === 'timed_out');