@yemi33/minions 0.1.2353 → 0.1.2354
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/dashboard.js +71 -19
- package/docs/README.md +2 -0
- package/docs/kb-dedup-duplicate-pair-investigation.md +138 -0
- package/docs/kb-sweep.md +13 -1
- package/docs/live-checkout-mode.md +7 -4
- package/engine/cli.js +4 -0
- package/engine/lifecycle.js +55 -22
- package/engine/live-checkout.js +30 -5
- package/engine/playbook.js +1 -0
- package/engine/pr-action.js +12 -7
- package/engine/process-utils.js +700 -0
- package/engine/shared.js +39 -666
- package/engine.js +78 -0
- package/package.json +1 -1
- package/playbooks/plan-to-prd.md +2 -0
package/engine/pr-action.js
CHANGED
|
@@ -85,16 +85,20 @@ const PR_ACTION_FOLLOWUPS = Object.freeze([
|
|
|
85
85
|
{ kind: 'track-auto-fix', label: 'Track for auto-fix' },
|
|
86
86
|
]);
|
|
87
87
|
|
|
88
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Canonical `host:slug#number` id for a record/ref, or '' when unknowable.
|
|
90
|
+
*
|
|
91
|
+
* Thin wrapper over prResolve.prIdFromRef: normalizes the heterogeneous
|
|
92
|
+
* record shapes buildPrActionFollowups is called with — an explicit
|
|
93
|
+
* `record.prId`, a `record.ref` ref object, or a bare ref-shaped object
|
|
94
|
+
* (`{host, slug, number}`/`{id}`) — into the ref shape prIdFromRef expects,
|
|
95
|
+
* then delegates so the `host:slug#number` template literal has one owner.
|
|
96
|
+
*/
|
|
89
97
|
function _prIdForRecord(record) {
|
|
90
98
|
if (!record) return '';
|
|
91
99
|
if (record.prId) return record.prId;
|
|
92
100
|
const ref = record.ref || record;
|
|
93
|
-
|
|
94
|
-
if (ref && ref.host && ref.slug && (ref.number || ref.number === 0)) {
|
|
95
|
-
return `${ref.host}:${ref.slug}#${ref.number}`;
|
|
96
|
-
}
|
|
97
|
-
return '';
|
|
101
|
+
return prResolve.prIdFromRef(ref) || '';
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
/**
|
|
@@ -364,7 +368,8 @@ function buildPrActionPrompt(action, payload) {
|
|
|
364
368
|
number: payload && payload.number,
|
|
365
369
|
id: payload && payload.prId,
|
|
366
370
|
};
|
|
367
|
-
const prId =
|
|
371
|
+
const prId = prResolve.prIdFromRef(ref)
|
|
372
|
+
|| (payload && payload.slug ? `${payload.slug}#${payload.number}` : 'the pull request');
|
|
368
373
|
const guidance = PR_ACTION_GUIDANCE[act] || PR_ACTION_GUIDANCE.review;
|
|
369
374
|
|
|
370
375
|
const sections = [
|