@yemi33/minions 0.1.739 → 0.1.740

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.740 (2026-04-09)
4
+
5
+ ### Features
6
+ - add prNumber field to pull-requests.json records (#711)
7
+
3
8
  ## 0.1.739 (2026-04-09)
4
9
 
5
10
  ### Fixes
package/engine/ado.js CHANGED
@@ -561,10 +561,14 @@ async function reconcilePrs(config) {
561
561
  const confirmedItemId = linkedItem ? linkedItemId : null;
562
562
 
563
563
  if (existingIds.has(prId)) {
564
+ const existing = existingPrs.find(p => p.id === prId);
565
+ // Backfill prNumber for existing records missing it
566
+ if (existing && existing.prNumber == null) {
567
+ existing.prNumber = adoPr.pullRequestId;
568
+ }
564
569
  // PR already tracked — write link to pr-links.json if we can extract an ID
565
570
  if (confirmedItemId) {
566
571
  addPrLink(prId, confirmedItemId);
567
- const existing = existingPrs.find(p => p.id === prId);
568
572
  if (existing && !(existing.prdItems || []).includes(confirmedItemId)) {
569
573
  existing.prdItems = Array.isArray(existing.prdItems) ? existing.prdItems : [];
570
574
  existing.prdItems.push(confirmedItemId);
@@ -582,6 +586,7 @@ async function reconcilePrs(config) {
582
586
  const prUrl = project.prUrlBase ? project.prUrlBase + adoPr.pullRequestId : '';
583
587
  existingPrs.push({
584
588
  id: prId,
589
+ prNumber: adoPr.pullRequestId,
585
590
  title: (adoPr.title || `PR #${adoPr.pullRequestId}`).slice(0, 120),
586
591
  agent: (linkedItem?.dispatched_to || adoPr.createdBy?.displayName || 'unknown').toLowerCase(),
587
592
  branch,
@@ -597,6 +602,14 @@ async function reconcilePrs(config) {
597
602
  log('info', `PR reconciliation: added ${prId} (branch: ${branch}, linked to ${confirmedItemId}) to ${project.name}`);
598
603
  }
599
604
 
605
+ // Backfill prNumber from pr.id for any PR missing it (e.g. created before prNumber was stored)
606
+ for (const pr of existingPrs) {
607
+ if (pr.prNumber == null) {
608
+ const derived = parseInt((pr.id || '').replace(/^PR-/, ''), 10);
609
+ if (derived) pr.prNumber = derived;
610
+ }
611
+ }
612
+
600
613
  // Backfill prdItems from pr-links for any PR with empty array
601
614
  const prLinks = shared.getPrLinks();
602
615
  let backfilled = 0;
package/engine/github.js CHANGED
@@ -562,9 +562,13 @@ async function reconcilePrs(config) {
562
562
  const confirmedItemId = linkedItem ? linkedItemId : null;
563
563
 
564
564
  if (existingIds.has(prId)) {
565
+ const existing = currentPrs.find(p => p.id === prId);
566
+ // Backfill prNumber for existing records missing it
567
+ if (existing && existing.prNumber == null) {
568
+ existing.prNumber = ghPr.number;
569
+ }
565
570
  if (confirmedItemId) {
566
571
  addPrLink(prId, confirmedItemId);
567
- const existing = currentPrs.find(p => p.id === prId);
568
572
  if (existing && !(existing.prdItems || []).includes(confirmedItemId)) {
569
573
  existing.prdItems = Array.isArray(existing.prdItems) ? existing.prdItems : [];
570
574
  existing.prdItems.push(confirmedItemId);
@@ -580,6 +584,7 @@ async function reconcilePrs(config) {
580
584
 
581
585
  currentPrs.push({
582
586
  id: prId,
587
+ prNumber: ghPr.number,
583
588
  title: (ghPr.title || `PR #${ghPr.number}`).slice(0, 120),
584
589
  agent: (linkedItem?.dispatched_to || ghPr.user?.login || 'unknown').toLowerCase(),
585
590
  branch,
@@ -596,6 +601,14 @@ async function reconcilePrs(config) {
596
601
  log('info', `GitHub PR reconciliation: added ${prId} (branch: ${branch}, linked to ${confirmedItemId}) to ${project.name}`);
597
602
  }
598
603
 
604
+ // Backfill prNumber from pr.id for any PR missing it (e.g. created before prNumber was stored)
605
+ for (const pr of currentPrs) {
606
+ if (pr.prNumber == null) {
607
+ const derived = parseInt((pr.id || '').replace(/^PR-/, ''), 10);
608
+ if (derived) pr.prNumber = derived;
609
+ }
610
+ }
611
+
599
612
  // Backfill prdItems from pr-links for any PR with empty array
600
613
  const prLinks = getPrLinks();
601
614
  let backfilled = 0;
@@ -666,6 +666,7 @@ function syncPrsFromOutput(output, agentId, meta, config) {
666
666
  prId, fullId,
667
667
  entry: {
668
668
  id: fullId,
669
+ prNumber: parseInt(prId, 10) || prId,
669
670
  title: (title || `PR created by ${agentName}`).slice(0, 120),
670
671
  agent: agentName,
671
672
  branch: meta?.branch || '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.739",
3
+ "version": "0.1.740",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"